This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -file-list-exec-source-files


On Sun, Jun 27, 2004 at 08:06:13PM +0200, Andreas Schwab wrote:
> Bob Rossi <bob@brasko.net> writes:
> 
> > +/* Finds the fullname that a symtab represents.
> > +
> > +   If this functions finds the fullname, it will save it in ps->fullname
> > +   and it will also return the value.
> >  
> > +   If this function fails to find the file that this symtab represents,
> > +   NULL will be returned and ps->fullname will be set to NULL.  */
> 
> This causes gdb to crash in lookup_symtab.
> 
>     if (full_path != NULL)
>       {
> 	const char *fp = symtab_to_fullname (s);
> 	if (FILENAME_CMP (full_path, fp) == 0)
> 	  {
> 	    return s;
> 	  }
>       }
> 
>     if (real_path != NULL)
>       {
> 	char *rp = gdb_realpath (symtab_to_fullname (s));
>         make_cleanup (xfree, rp);
> 	if (FILENAME_CMP (real_path, rp) == 0)
> 	  {
> 	    return s;
> 	  }
>       }
> 
> Neither of these places expect symtab_to_fullname to return NULL.

Is that repeatable with a small example?
I'd be happy to take a look at it.

Bob Rossi


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