Re: It seems no Windows buildfarm members are running find_typedefs - Mailing list pgsql-hackers

From Wim Lewis
Subject Re: It seems no Windows buildfarm members are running find_typedefs
Date
Msg-id 79C706D5-CCFC-4287-A44D-05529BA5D60B@omnigroup.com
Whole thread Raw
In response to Re: It seems no Windows buildfarm members are running find_typedefs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: It seems no Windows buildfarm members are running find_typedefs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2 Apr 2014, at 5:43 PM, Tom Lane wrote:
> I poked around a bit, and so far as I can tell, OS X does not store debug
> symbol tables in executables.  It looks like gdb goes to the .o files when
> it wants debug info.  What's in the .o files is good ol' DWARF (at least
> in reasonably recent OS X releases), so it's not any harder to pull out
> the typedef names than it is on Linux.  The problem is that you gotta
> iterate over all the .o files in the build tree rather than the installed
> executables.  I looked at fixing find_typedefs but it seems like it's
> pretty fixated on the latter approach; any thoughts on how to revise it?

The Apple development tools gather the debug information during the final link stage (the one that produces the
executableor shared object) using "dsymutil", which simply iterates over all of the .o files and links the debug info
intoa separate object, foo.dSYM. Apple's gdb and lldb then find the relevant .dSYM file using a per-build UUID embedded
inthe executable/library/debug symbol file. 

The dSYM file is a normal object file which has the DWARF sections but not the usual text/data sections, so if it can
begenerated/found, it should be possible to dump the DWARF data from it and look for typedefs that way. 

(I'm pretty sure that if you were to run dsymutil and then merge the resulting object file's sections into the
executable/shlib,you'd get a perfectly functional and debuggable result without having to look for or cart around the
extradSYM file--- I haven't tried this though.) 





pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: It seems no Windows buildfarm members are running find_typedefs
Next
From: Tom Lane
Date:
Subject: Re: It seems no Windows buildfarm members are running find_typedefs