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

Andreas Schwab
2004-06-27T18:12:28Z

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.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃŸe 5, 90409 NÃ¼rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."