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: "John R. Moore" <jmoore at redhat dot com>
- Subject: Re: [RFA] Insight fix for missing tick marks.
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Wed, 28 Mar 2001 10:05:36 -0800 (PST)
- cc: insight at sources dot redhat dot com
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