aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-05-16 07:02:43 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-05-16 07:02:43 +0000
commitb8fea896feba38994f3889cfcae047730b78eba4 (patch)
treea277eaa702488a790b54ad2b9f58588f39c67e35 /gdb/ada-lang.c
parentd5c48113b656f1f2bd67d64a44d2b6c8cc50e8d9 (diff)
downloadgdb-b8fea896feba38994f3889cfcae047730b78eba4.zip
gdb-b8fea896feba38994f3889cfcae047730b78eba4.tar.gz
gdb-b8fea896feba38994f3889cfcae047730b78eba4.tar.bz2
Missing do_cleanups in ada_make_symbol_completion_list.
This results in an internal-warning when trying the completion when in Ada mode: (gdb) b simple<TAB> /[...]/cleanups.c:265: internal-warning: restore_my_cleanups has found a stale cleanup A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) gdb/ChangeLog: * ada-lang.c (ada_make_symbol_completion_list): Make sure all cleanups are done before returning from this function. gdb/testsuite/ChangeLog: * gdb.ada/complete.exp: Add test verifying completion using the "tab" key.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 3510750..fa6db0f 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5841,6 +5841,7 @@ ada_make_symbol_completion_list (const char *text0, const char *word,
struct block *b, *surrounding_static_block = 0;
int i;
struct block_iterator iter;
+ struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
gdb_assert (code == TYPE_CODE_UNDEF);
@@ -5941,6 +5942,7 @@ ada_make_symbol_completion_list (const char *text0, const char *word,
}
}
+ do_cleanups (old_chain);
return completions;
}