Re: typedefs for indent - Mailing list pgsql-hackers

From Tom Lane
Subject Re: typedefs for indent
Date
Msg-id 17119.1237753662@sss.pgh.pa.us
Whole thread Raw
In response to Re: typedefs for indent  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: typedefs for indent  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
After doing some further digging I've concluded that the typedefs that
are missing from dungbeetle's list are those that are declared, but are
never used as the type of anything.  For instance
AfterTriggerEventDataOneCtid is only used in a sizeof() computation,
and there are quite a few enums for which no variable is ever declared
as being of the enum type.  So Alvaro seems to be right that these are
getting optimized out of the debug info.  The good news is that as far
as I can think at the moment, that means we don't really care whether
pg_indent knows they are typedef names or not --- they aren't getting
used in any contexts where it would matter for indenting purposes.

However, this does complicate the matter of comparing the typedef
lists to identify how many symbols are platform-specific or
compile-option-specific typedefs.

BTW, is dungbeetle still running Fedora 6?  On my F-10 machine the
output of objdump seems to be formatted differently than your script
is expecting, eg

$ objdump -W postgres | egrep -A3 '(DW_TAG_typedef|DW_TAG_structure_type|DW_TAG_union_type)' | grep AfterTriggerEvent
<19ac75>  DW_AT_name        : (indirect string, offset: 0x1c1ad): AfterTriggerEvent   <19ac87>   DW_AT_name        :
(indirectstring, offset: 0x1bffc): AfterTriggerEventData   <19acc2>   DW_AT_name        : (indirect string, offset:
0x1bffc):AfterTriggerEventData   <19acce>   DW_AT_name        : (indirect string, offset: 0x1c891):
AfterTriggerEventChunk  <19ad1e>   DW_AT_name        : (indirect string, offset: 0x1c891): AfterTriggerEventChunk
<19ad2a>  DW_AT_name        : (indirect string, offset: 0x1c166): AfterTriggerEventList   <19ad6b>   DW_AT_name
:(indirect string, offset: 0x1c166): AfterTriggerEventList
 

        regards, tom lane


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: contrib function naming, and upgrade issues
Next
From: Tom Lane
Date:
Subject: Re: contrib function naming, and upgrade issues