This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] Insight fix for missing tick marks.


John,

Can you please add a comment before the test explaining when that situation (i.e. nitems == 0) can happen.

Thanks.
Fernando


"John R. Moore" wrote:
> 
> The following was tested on Linux using latest branch for gcc
> on RedHat 7 with kernels 2.2.16 and 2.4.2.
> 
> 2001-03-28  John R. Moore  <jmoore@cygnus.com>
> 
>         * gdbtk-cmds.c (full_lookup_symtab): Check for non-zero
>         nitems in selecting symtab in addition to matching just
>         fullname.
> 
> 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;
>        }
>    }
> @@ -4710,7 +4710,7 @@ full_lookup_symtab (file)
>         if (st)
>           {
>             fullname = symtab_to_filename (st);
> -           if (!strcmp (file, fullname))
> +           if (st->linetable->nitems > 0 && !strcmp (file, fullname))
>               return st;
>           }
>        }

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]