This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: [RFA] Insight fix for missing tick marks.
- To: Keith Seitz <keiths at cygnus dot com>
- Subject: Re: [RFA] Insight fix for missing tick marks.
- From: Don Howard <dhoward at redhat dot com>
- Date: Wed, 28 Mar 2001 10:26:33 +0000 (PDT)
- cc: "John R. Moore" <jmoore at redhat dot com>, insight at sources dot redhat dot com
I believe this fixes a bug that I was looking into (Thanks John!) where the
break_rgn_tag was not being set on the text in the source window. This made
it impossible to set breakpoints via the gui. I had traced it down and found
that it was due to bogus linetable info in gdb_loadfile().
On Wed, 28 Mar 2001, Keith Seitz wrote:
> On Wed, 28 Mar 2001, John R. Moore wrote:
>
> > Index: gdb/gdbtk/generic/gdbtk-cmds.c
> > ===================================================================
> > RCS file: /cvs/cvsfiles/devo/gdb/gdbtk/generic/gdbtk-cmds.c,v
> > retrieving revision 1.17
> > diff -p -u -r1.17 gdbtk-cmds.c
> > --- gdb/gdbtk/generic/gdbtk-cmds.c 2001/03/26 19:55:12 1.17
> > +++ gdb/gdbtk/generic/gdbtk-cmds.c 2001/03/28 17:27:25
> > @@ -4696,7 +4696,7 @@ full_lookup_symtab (file)
> > else
> > fullname = st->fullname;
> >
> > - if (!strcmp (file, fullname))
> > + if (st->linetable->nitems > 0 && !strcmp (file, fullname))
> > return st;
>
> Can you add a comment explaining why we need to check for the linetable?
> It is not obvious at all why this should be done.
>
> Also, you should use gdb's accessor macros/functions when possible:
>
> if (LINETABLE (st)->nitems > 0 && ...)
>
> Keith
>
>
>
--
-Don
dhoward@redhat.com