Article View: gnu.g++.bug
Article #2027Re: bug in sdbout.c, sdbout_params
From: Michael Meissner
Date: Tue, 23 May 1989 15:25
Date: Tue, 23 May 1989 15:25
75 lines
2649 bytes
2649 bytes
In article <GRUNWALD.89May17164336@flute.cs.uiuc.edu>
grunwald@flute.cs.uiuc.edu (Dirk Grunwald) writes:
| This is w.r.t 1.35
|
| Not certain if this is a gcc or g++ bug.
|
| in sdbout.c, sdbout_parms, there is no check for DECL_NAME(parms) being
| null, as is done in dbxout.c, dbxout_parms. The following is a guess
| as to what should be done in that case; a higher level blessing is
| needed.
|
| This corrects the problem (in g++ at least) of -g0 producing lines such
| as
| .def _^R; .tag etc etc etc
...
| static void
| sdbout_parms (parms1)
| tree parms1;
| {
| tree type;
| tree parms;
|
| for (parms = parms1; parms; parms = TREE_CHAIN (parms))
| {
| int current_sym_value = DECL_OFFSET (parms) / BITS_PER_UNIT;
|
| if (DECL_NAME(parms))
| {
| PUT_SDB_DEF (IDENTIFIER_POINTER (DECL_NAME (parms)));
| }
| else
| {
| PUT_SDB_DEF ("$anon");
| }
...
Rather than hard coding the name to '$anon', which might be used by
the programmer if DOLLARS_IN_IDENTIFIERS is used, you might want to
consider using the same logic that creates the .<n>fake names used for
tags. For example:
static void
sdbout_parms (parms1)
tree parms1;
{
tree type;
tree parms;
char *name;
for (parms = parms1; parms; parms = TREE_CHAIN (parms))
{
int current_sym_value = DECL_OFFSET (parms) / BITS_PER_UNIT;
name = IDENTIFIER_POINTER (DECL_NAME (parms));
if (name == (char *)0 || *name == '\0')
name = gen_fake_label ();
PUT_SDB_DEF (name);
...
By the way, as long as I'm talking about GCC and sdb, I should warn
people that I had problems with `sdbout_reg_parms' generating the
wrong information for parameters passed in registers. I've fixed the
problem locally, and hope to give the changes back to GNU central
shortly.
--
Michael Meissner, Data General.
Uucp: ...!mcnc!rti!xyzzy!meissner If compiles were much
Internet: meissner@dg-rtp.DG.COM faster, when would we
Old Internet: meissner%dg-rtp.DG.COM@relay.cs.net have time for netnews?
Technical Details
Message-ID:
<6367@xyzzy.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!xanth!mcnc!rti!xyzzy!tiktok!meissnerReferences:
<GRUNWALD.89May17164336@flute.cs.uiuc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!xanth!mcnc!rti!xyzzy!tiktok!meissner From: meissner@tiktok.dg.com (Michael Meissner) Newsgroups: gnu.g++.bug,gnu.gcc.bug Subject: Re: bug in sdbout.c, sdbout_params Message-ID: <6367@xyzzy.UUCP> Date: 23 May 89 15:25:02 GMT References: <GRUNWALD.89May17164336@flute.cs.uiuc.edu> Sender: usenet@xyzzy.UUCP Reply-To: meissner@tiktok.UUCP (Michael Meissner) Distribution: gnu Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 74