This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fixes for Mac OS X/x86 building/running



On 11 Mar 2009, at 20:41, Jonas Maebe wrote:


* machoread.c.patch fixes a crash caused by a missing function pointer field (sym_read_psymbols) initializer in the middle of macho's struct sym_fns (so the subsequent function pointer initializers were all shifted). I've simply copied the elfread.c implementation of read_psyms (because it appeared to be generic) and it seems to work fine (if it's called at all). I guess this needs to be solved in a better way though (maybe a NULL pointer would be enough). I'm not sure why I didn't see this crash when I built gdb last time (on January 17 from the archer-jankratochvil-vla banch), as this field was already added on 2008-09-09 (by Tom Tromey) according to git.

With these two patches applied, the Mac OS X build and works fine again on i386 (at least in my cursory testing).

Less cursory testing shows that it doesn't work fine. The problem is that the addresses for variables are read wrongly from the DWARF2 sections (code addresses are correct). I guess it's related to this comment in machoread.c:


/* Do not try to read .eh_frame/.debug_frame as they are not relocated
and dwarf2_build_frame_info cannot deal with unrelocated sections. */


in combination with the new sym_read_psymbols()/read_psyms() call (which also calls dwarf2_build_frame_info). Commenting it out everything in the read_psyms() function I added doesn't solve it however. Anyway, I'm afraid that's for someone else to solve...


Jonas



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]