Fix crash in symtab.c.
This commit is contained in:
parent
bcc82369d2
commit
09bcec8017
|
@ -1,3 +1,7 @@
|
|||
2004-07-08 Bob Rossi <bob@brasko.net>
|
||||
|
||||
* symtab.c (lookup_symtab): check return value of symtab_to_fullname
|
||||
|
||||
2004-07-06 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* language.h (struct_language_defn): Add new function pointer:
|
||||
|
|
26
gdb/symtab.c
26
gdb/symtab.c
|
@ -181,21 +181,25 @@ got_symtab:
|
|||
|
||||
if (full_path != NULL)
|
||||
{
|
||||
const char *fp = symtab_to_fullname (s);
|
||||
if (FILENAME_CMP (full_path, fp) == 0)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
const char *fp = symtab_to_fullname (s);
|
||||
if (fp != NULL && 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;
|
||||
}
|
||||
char *fullname = symtab_to_fullname (s);
|
||||
if (fullname != NULL)
|
||||
{
|
||||
char *rp = gdb_realpath (fullname);
|
||||
make_cleanup (xfree, rp);
|
||||
if (FILENAME_CMP (real_path, rp) == 0)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue