From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: typedefs for indent |
Date: | 2009-03-22 17:54:04 |
Message-ID: | 49C67B3C.8020907@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> [ typedef lists ]
>>
>
> Hmm ... the windows members are claiming that "int", "char", "float",
> "double" etc are typedefs, which doesn't exactly match up with my
> mental model of C. On the other hand, dungbeetle is failing to report
> a whole bunch of typedefs that it should report, for example
> AfterTriggerEventDataOneCtid which comes from entirely non platform
> specific code in commands/trigger.c.
>
> In short, I don't think I trust this data at all...
>
>
>
Well, the procedure for generating it is quite public.
The relevant piece of perl is this - feel free to suggest improvements:
if (@err == 1) # Linux
{
@dumpout = `objdump -W $bin 2>/dev/null | egrep -A3
'(DW_TAG_typedef|DW_TAG_structure_type|DW_TAG_union_type)' 2>/dev/null`;
foreach (@dumpout)
{
@flds = split;
next if ($flds[0] ne 'DW_AT_name' || $flds[-1] =~
/^DW_FORM_str/);
$syms{$flds[-1]} =1;
}
}
else
{
@dumpout = `objdump --stabs $bin 2>/dev/null`;
foreach (@dumpout)
{
@flds = split;
next if (@flds < 7);
next if ($flds[1] ne 'LSYM' || $flds[6] !~ /([^:]+):[tT]/);
$syms{$1} =1;
}
}
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-22 18:09:17 | Re: poor wording on SSPI error message |
Previous Message | Tom Lane | 2009-03-22 17:44:57 | Re: typedefs for indent |