find_typedef alternative that works on mainstream systems

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: find_typedef alternative that works on mainstream systems
Date: 2008-01-22 02:43:23
Message-ID: 20080122024323.GA20416@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I just came across objdump -W which dumps the DWARF info from a object
file. This is useful to build a typedef file for pgindent. It can be
used like this:

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 am disappointed by the fact that our current find_typedef script only
works on Bruce's rare platforms -- and we stopped shipping a "standard"
typedef file, which makes the problem worse.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-01-22 03:05:08 Re: find_typedef alternative that works on mainstream systems
Previous Message Tom Lane 2008-01-22 02:40:08 Re: Makefile support for Mac OS X Fat Binaries?