Re: typedefs for indent
От | Tom Lane |
---|---|
Тема | Re: typedefs for indent |
Дата | |
Msg-id | 17119.1237753662@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: typedefs for indent (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: typedefs for indent
|
Список | 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 по дате отправления: