This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[Patch Darwin] be more friendly to gdb


As things stand, Darwin's 'as' cannot produce dwarf debug.

Unfortunately, if "-g" is given to -x assembler-with-cpp ... this results in 'as' being called with --stabs.

So, it can be the case that an exe ends up with some stabs debug in it - usually with a source file of "{standard input}" (and without an OSO entry).

This upsets the OSO parser in machoread.c (in gdb) causing gdb to fail with an OSO != NULL assert.

===

This patch prevents "as" being asked to give debug output unless stabs is the chosen debug scheme (so for the default on Darwin >= 9 asm files will not get any debug data).

It doesn't prevent the scenario completely - the user could still produce the situation manually (I have a gdb patch to work around it) ...

===

However, this does mean that a standard (ppc) build of gcc doesn't abort gdb (because the .S files in libgcc_s are causing this on ppc).

OK for trunk?
Iain

Attachment: 181436-as-debug-diff.txt
Description: Text document






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