[patch] Fix glitch with DW_AT_MIPS_linkage_name
Eric Botcazou
ebotcazou@adacore.com
Sun Jun 6 17:13:00 GMT 2010
Hi,
if a symbol is prefixed with '*', it will be assembled verbatim:
/* Output to FILE (an assembly file) a reference to NAME. If NAME
starts with a *, the rest of NAME is output verbatim. Otherwise
NAME is transformed in a target-specific way (usually by the
addition of an underscore). */
void
assemble_name_raw (FILE *file, const char *name)
{
if (name[0] == '*')
fputs (&name[1], file);
else
ASM_OUTPUT_LABELREF (file, name);
}
We use this in Ada for the Link_Name of pragma Export. The problem is that
the '*' is then emitted in the debug info:
.long .LASF9 # DW_AT_name: "pck__one_global_buffer"
.byte 0x3 # DW_AT_decl_file (pck.ads)
.byte 0xa # DW_AT_decl_line
.long .LASF10 # DW_AT_MIPS_linkage_name: "*ONE_GLOBAL_BUFFER"
which confuses GDB.
Tested on i586-suse-linux, OK for mainline?
2010-06-06 Eric Botcazou <ebotcazou@adacore.com>
* dwarf2out.c (add_name_and_src_coords_attributes): Skip a leading '*'
in the DW_AT_MIPS_linkage_name.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 710 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100606/47e6a9af/attachment.bin>
More information about the Gcc-patches
mailing list