Macro code crasher on re-run
Daniel Jacobowitz
drow@mvista.com
Mon Nov 3 21:04:00 GMT 2003
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.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gdb
mailing list