X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Ftarget.c;h=6babfc562563d6d09dddcbb955ecaa11a9171fb6;hb=ff5404f5b37484567a19603769a2c0e56f108272;hp=1f0741471d829294ddbbca17c55ac564908b305e;hpb=e97007b64a388ece1789f6c2cd51d2768e3b4829;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/target.c b/gdb/target.c index 1f0741471d..6babfc5625 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -872,7 +872,7 @@ The first argument is the type or protocol of the target machine.\n\ Remaining arguments are interpreted by the target protocol. For more\n\ information on the arguments for a particular protocol, type\n\ `help target ' followed by the protocol name."), - &targetlist, "target ", 0, &cmdlist); + &targetlist, 0, &cmdlist); c = add_cmd (t.shortname, no_class, t.doc, &targetlist); set_cmd_context (c, (void *) &t); set_cmd_sfunc (c, open_target); @@ -1214,7 +1214,7 @@ target_stack::unpush (target_ops *t) m_stack[stratum] = NULL; if (m_top == stratum) - m_top = t->beneath ()->stratum (); + m_top = this->find_beneath (t)->stratum (); /* Finally close the target, if there are no inferiors referencing this target still. Note we do this after unchaining, @@ -2718,12 +2718,14 @@ target_follow_fork (bool follow_child, bool detach_fork) return target->follow_fork (follow_child, detach_fork); } -/* Target wrapper for follow exec hook. */ +/* See target.h. */ void -target_follow_exec (struct inferior *inf, const char *execd_pathname) +target_follow_exec (inferior *follow_inf, ptid_t ptid, + const char *execd_pathname) { - current_inferior ()->top_target ()->follow_exec (inf, execd_pathname); + current_inferior ()->top_target ()->follow_exec (follow_inf, ptid, + execd_pathname); } static void @@ -3734,7 +3736,8 @@ debug_target::info () const void target_close (struct target_ops *targ) { - gdb_assert (!current_inferior ()->target_is_pushed (targ)); + for (inferior *inf : all_inferiors ()) + gdb_assert (!inf->target_is_pushed (targ)); fileio_handles_invalidate_target (targ);