From: Jim Blandy <jimb@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>, Andrew Cagney <cagney@gnu.org>
Cc: gdb@sources.redhat.com
Subject: Re: Macro code crasher on re-run
Date: Mon, 03 Nov 2003 21:34:00 -0000 [thread overview]
Message-ID: <vt2llqxuog7.fsf@zenia.home> (raw)
In-Reply-To: <20031103210453.GA17444@nevyn.them.org>
Daniel Jacobowitz <drow@mvista.com> writes:
> On Mon, Nov 03, 2003 at 03:59:41PM -0500, Jim Blandy wrote:
> >
> > Daniel Jacobowitz <drow@mvista.com> writes:
> > > > I don't follow. All default_macro_scope's callers check for null
> > > > return; it's documented to return zero at times. So you must be
> > > > talking about that code in sal_macro_scope itself. Line 39 refers to
> > > > sal.symtab, initialized by line 115, so you must be talking about line
> > > > 40. But sal.symtab must be non-zero, or else we wouldn't reach the
> > > > right operand of the ||.
> > > >
> > > > Or should I sleep and try again?
> > > >
> > >
> > > Right. sal.symtab is nonzero. sal.symtab->macro_table, however, is
> > > uninitialized. The short-circuit if on line 40 does not trigger, but
> > > the remainder of sal_macro_scope assumes that sal.symtab->macro_table
> > > is valid.
> > >
> > > In my case it happens to be 0xB.
> >
> > Every symtab's macro_table field should be initialized, at least to
> > zero. Which symtab is it? Who creates it?
>
> If you thought I wasn't making sense, you were right. I really needed
> some sleep when I wrote that.
>
> My best guess is that the returned symtab belongs to the old (already
> unloaded) binary. Which would put the bug somewhere else.
I haven't debugged it (only Daniel J. has seen the problem, as far as
I know), but I kind of suspect this change:
2003-10-22 Andrew Cagney <cagney@redhat.com>
* target.c (target_close): New function.
(debug_to_close): Use "target_close".
(push_target): Use "target_close".
(unpush_target): Use "target_close".
(pop_target): Use "target_close".
* target.h (struct target_ops): Add "to_xclose".
(target_open): Delete macro. Move comment to "to_open".
(target_close): Replace macro with function that takes a target.
* top.c (quit_target): Pass "current_target" to "target_close".
The to_close method of the "exec" target calls free_objfile, which
assumes that its callers call clear_symtab_users at some appropriate
time. This change seems to have introduced several new callers to
target_close, so it may have broken that assumption.
Having free_objfile require its callers to take care of things this
way is not very nice.
next prev parent reply other threads:[~2003-11-03 21:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-03 4:07 Daniel Jacobowitz
2003-11-03 4:48 ` Jim Blandy
2003-11-03 4:56 ` Daniel Jacobowitz
2003-11-03 21:00 ` Jim Blandy
2003-11-03 21:04 ` Daniel Jacobowitz
2003-11-03 21:34 ` Jim Blandy [this message]
2003-11-03 21:37 ` Daniel Jacobowitz
2003-11-03 23:51 ` Jim Blandy
2003-11-07 16:29 ` Daniel Jacobowitz
2003-11-10 23:38 ` Jim Blandy
2003-11-03 21:46 ` David Carlton
2003-11-03 22:01 ` Andrew Cagney
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=vt2llqxuog7.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=cagney@gnu.org \
--cc=drow@mvista.com \
--cc=gdb@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).