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]

Re: killing ASM_IDENTIFY_GCC [branch]


Your patch is wrong.

In config/dbxelf.h you delete the ASM_IDENTIFY_GCC_AFTER_SOURCE macro.
This is required for proper operation of gdb.

Note the distinction between a gcc2_compiled label, emitted by
ASM_IDENTIFY_GCC, which is bad, and the gcc2_compiled stab, emitted by
ASM_IDENTIFY_GCC_AFTER_SOURCE which is good.

The proper place to put extra info for gdb is in the debug info not the symbol
table.  Thus the stab is good, but the label is bad.

I see that various other config files are defining ASM_IDENTIFY_GCC to emit
a stab instead of a label, these need to be kept also.  It is rather curious
that some files claim the gcc2_compiled stab has to be before the N_SO, and
others claim that it has to be after the N_SO.  I believe the Solaris choice is
the right one, which means after the N_SO.  Probably when the Solaris port was
fixed, the same fix was not propagated to other ports that also needed it.
Changing dbxout.c to unconditionally emit the gcc2_compiled stab after the N_SO
is probably OK.  It seems pretty unlikely that an extra stab would confuse
other debuggers.

Jim


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