From: David Carlton <carlton@math.stanford.edu>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] ALL_OBJFILE_MSYMBOLS
Date: Fri, 31 Jan 2003 20:42:00 -0000 [thread overview]
Message-ID: <ro1n0lhf3vc.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <vt2el6t84x7.fsf@zenia.red-bean.com>
On 31 Jan 2003 15:01:24 -0500, Jim Blandy <jimb@redhat.com> said:
> I think I'd prefer the patch below. Could you try it out and see if
> it works as well?
Yes, it also fixes the bug I'm seeing.
> This was messier than I had expected.
Yah.
> (Which is a great example of one reason C macros suck and Lisp
> macros don't --- in case that's an emotionally charged issue for
> anyone else out there like it is for me. :) )
I thought for a while about good responses to this, but I think I'll
just leave it alone for now. :-)
> But it would be better anyway for an empty minsym table to have a
> single, consistent representation.
That was my first reaction, too. But while I was thinking about how
to do that, I noticed that ALL_MSYMBOLS already dealt with the
possibility of a NULL entry, so I just went with that out of laziness.
Like you, trusting the count sounds like a good idea. And, even if
you go with a terminating entry, having it be a fake symbol instead
of, say, a NULL pointer is pretty weird, too. But making either of
those changes sounds like too much (fallible) work for too little
benefit.
> So here's a patch which simply ensures that every objfile's minsym
> table has a terminating entry, and makes some appropriate accompanying
> changes. The tests are still running, but I haven't noticed any
> regressions yet.
Seems sensible to me. I didn't do a full testsuite run, but I did
apply it to my branch and try to trigger the bug I'd been seeing
there, and your patch does protect against the bug.
David Carlton
carlton@math.stanford.edu
next prev parent reply other threads:[~2003-01-31 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 22:39 David Carlton
2003-01-28 23:29 ` Tom Tromey
2003-01-31 20:06 ` Jim Blandy
2003-01-31 20:42 ` David Carlton [this message]
2003-02-03 20:40 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ro1n0lhf3vc.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox