Re: find_typedef alternative that works on mainstream systems
| От | Alvaro Herrera |
|---|---|
| Тема | Re: find_typedef alternative that works on mainstream systems |
| Дата | |
| Msg-id | 20080122030508.GB20416@alvh.no-ip.org обсуждение исходный текст |
| Ответ на | find_typedef alternative that works on mainstream systems (Alvaro Herrera <alvherre@commandprompt.com>) |
| Ответы |
Re: find_typedef alternative that works on
mainstream systems
|
| Список | pgsql-hackers |
Alvaro Herrera wrote:
> objdump -W $object_file | \
> awk '/DW_TAG_/ { grab=0 } /DW_TAG_typedef/ { grab=1 } /DW_AT_name/ { if (grab) { print $0 } }' | \
> sed -e 's/^.*: \([^ ]*\)/\1/' | \
> sort | \
> uniq
I oversimplified the awk line, causing some garbage to appear at the end
:-( The full awk line I am using is
awk '
/^Contents of / { if (read) exit }
/^The section / { if (read) exit }
/^The section .debug_info contains:/ { read=1 }
/DW_TAG_/ { grab=0 }
/DW_TAG_typedef/ { grab=1 }
/DW_AT_name/ { if (read && grab) { print $0 } }
'
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: