gdb/
* symtab.c (iterate_over_some_symtabs): New variable cleanups, initialize it by existing make_cleanup. Call new do_cleanups.
This commit is contained in:
parent
aebb1cc98b
commit
c89ffd8620
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* symtab.c (iterate_over_some_symtabs): New variable cleanups,
|
||||
initialize it by existing make_cleanup. Call new do_cleanups.
|
||||
|
||||
2013-01-17 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* cp-abi.c (cp_abi_completer): New function.
|
||||
|
|
|
@ -241,20 +241,27 @@ iterate_over_some_symtabs (const char *name,
|
|||
{
|
||||
const char *fullname = symtab_to_fullname (s);
|
||||
char *rp = gdb_realpath (fullname);
|
||||
struct cleanup *cleanups = make_cleanup (xfree, rp);
|
||||
|
||||
make_cleanup (xfree, rp);
|
||||
if (FILENAME_CMP (real_path, rp) == 0)
|
||||
{
|
||||
if (callback (s, data))
|
||||
{
|
||||
do_cleanups (cleanups);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_abs && compare_filenames_for_search (rp, name))
|
||||
{
|
||||
if (callback (s, data))
|
||||
{
|
||||
do_cleanups (cleanups);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
do_cleanups (cleanups);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue