jonathan@comp.vuw.ac.nz (Jonathan) (12/18/88)
Symptom::
Gdb 2.7 exits when trying to read symbols from a Pyramid gcc-1.30
stageN, N > 2. It encounters a symbol definition it doesn't understand.
Repeat-By::
Dunno, unless you have a copy of the Pyramid machine description.
Diagnosis::
Gcc 1.30 appears to occasionally produce output debugging
information that gdb 2.7 doesn't grok.
This happens for pointer parameters passed in registers instead of
on the stack.
I found this with my own gcc/gdb machine descriptions for Pyramid
Technology processors some time ago. Perhaps it's been fixed
already for SPARC?
If not, the code in gcc/dbxout.c producing the contentious output is:
current_sym_nchars = 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms)));
fprintf (asmfile, ".stabs \"%s:P",
IDENTIFIER_POINTER (DECL_NAME (parms)));
dbxout_type (DECL_ARG_TYPE (parms), 0);
dbxout_finish_symbol ();
Gdb 2.7 has no idea how do deal with such a symbol (ie, an N_RSYM
with code 'P').
Fix-By::
I'm not sure whether gcc is correct in doing this, and if so, what
gdb should do with it. I merely #ifdef'ed the gcc source to output a
'p' instead of a 'P', which isn't entirely satisfactory.
Which should be/has been fixed, gdb or gcc? Or both??