* target.h (pop_all_targets): Declare.
* target.c (pop_all_targets): New. * top.c (quit_target): Pop all targets instead of just closing the current.
This commit is contained in:
parent
311a4e6b7b
commit
aa76d38d1d
4 changed files with 35 additions and 2 deletions
18
gdb/target.c
18
gdb/target.c
|
@ -821,6 +821,24 @@ pop_target (void)
|
|||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
}
|
||||
|
||||
void
|
||||
pop_all_targets (int quitting)
|
||||
{
|
||||
while ((int) (current_target.to_stratum) > (int) dummy_stratum)
|
||||
{
|
||||
target_close (¤t_target, quitting);
|
||||
if (!unpush_target (target_stack))
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"pop_all_targets couldn't find target %s\n",
|
||||
current_target.to_shortname);
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Using the objfile specified in OBJFILE, find the address for the
|
||||
current thread's thread-local storage with offset OFFSET. */
|
||||
CORE_ADDR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue