Lines Matching defs:inferior
1 /* Target-struct-independent code to start (run) and stop an inferior
27 #include "inferior.h"
100 static void wait_for_inferior (inferior *inf);
103 inferior *inf = nullptr);
159 inferior stopped in a different thread than it had been running in.
195 gdb_printf (file, _("Inferior debugging is %s.\n"), value);
239 error (_("Cannot change this setting while the inferior is running."));
250 _("Controlling the inferior in non-stop mode is %s.\n"),
268 error (_("Cannot change this setting while the inferior is running."));
433 /* Handle changes to the inferior list based on the type of fork,
437 followed inferior. */
471 inferior *parent_inf = current_inferior ();
472 inferior *child_inf = nullptr;
580 /* Add the new inferior first, so that the target_detach below
619 /* The parent inferior is still the current one, so keep things
635 /* If we are setting up an inferior for the child, target_follow_fork is
636 responsible for pushing the appropriate targets on the new inferior's
639 If we are not setting up an inferior for the child (because following
647 /* target_follow_fork must leave the parent as the current inferior. If we
651 /* If there is a child inferior, target_follow_fork must have created a thread
712 /* If we ended up creating a new inferior, call post_create_inferior to inform
716 /* If FOLLOW_CHILD, we leave CHILD_INF as the current inferior
717 (do not restore the parent as the current inferior). */
740 if the inferior should be resumed; false, if the target for some
751 /* Copy user stepping state to the new inferior thread. FIXME: the
795 /* Set up inferior(s) as specified by the caller, and
880 /* If handling a vfork, stop all the inferior's threads, they will be
887 /* Set up inferior(s) as specified by the caller, and tell the
1019 struct inferior *inf = current_inferior ();
1023 inferior *resume_parent = nullptr;
1027 inferior *vfork_parent = inf->vfork_parent;
1105 preparing to start a new inferior. But, since we don't
1108 inferior. */
1117 /* Switch back to the vfork child inferior. Switch to no-thread
1156 /* We only care about this event if inferior::thread_waiting_for_vfork_done is
1160 If an inferior has vforked and we are debugging the child, we don't use
1163 inferior::vfork_{parent,child} fields are used instead. See
1171 /* We stopped all threads (other than the vforking thread) of the inferior in
1181 /* On non-stop targets, we stopped all the inferior's threads in follow_fork,
1234 since the exec() transformed our inferior into a fresh set
1297 /* We've followed the inferior through an exec. Therefore, the
1298 inferior has essentially been killed & reborn. */
1322 inferior *execing_inferior = current_inferior ();
1323 inferior *following_inferior;
1327 /* The user wants to keep the old inferior and program spaces
1330 /* Do exit processing for the original inferior before setting the new
1331 inferior's pid. Having two inferiors with the same pid would confuse
1333 old to the new inferior. */
1344 inferior. */
1350 this on "follow-exec-mode new", as the old inferior stays
1386 /* The next resume of this inferior should bring it to the shlib
1628 displaced_step_in_progress (inferior *inf)
1638 for (inferior *inf : all_non_exited_inferiors ())
1648 infrun_inferior_exit (struct inferior *inf)
1655 infrun_inferior_execd (inferior *exec_inf, inferior *follow_inf)
1657 /* If some threads where was doing a displaced step in this inferior at the
1737 /* If displaced stepping failed before for this inferior, don't bother trying
2027 inferior *parent_inf = event_thread->inf;
2088 child hasn't been added to the inferior list yet at this
2201 for this inferior. Just leave the thread in THREADS_TO_STEP, it
2363 default; otherwise, resume only threads of the current inferior
2414 /* The inferior thread is evaluating a BP condition. Other threads
2454 for (inferior *inf : all_non_exited_inferiors ())
2460 inferior *cur_inf = current_inferior ();
2487 for this inferior (well, program space in fact). We don't want to resume
2500 - All threads of inferior 1
2533 /* Install inferior's terminal modes. */
2534 target_terminal::inferior ();
2638 /* Resume the inferior. SIG is the signal to give the inferior
2736 /* We have a signal to pass to the inferior. The resume
2992 /* Resume the inferior. SIG is the signal to give the inferior
3023 to tell whether a command has proceeded the inferior past the
3024 current location. This allows e.g., inferior function calls in
3026 call finishes successfully, the inferior is standing at the same
3047 /* Clear out all variables saying what to do when inferior is continued.
3144 struct inferior *inferior;
3153 inferior = current_inferior ();
3154 inferior->control.stop_soon = NO_STOP_QUIETLY;
3226 (i.e. when performing an inferior call) then a pending event on some
3228 state for the thread performing the inferior call, then the inferior
3236 for (inferior *inf : all_non_exited_inferiors ())
3243 inferior sharing the process_stratum target. */
3293 for (inferior *inf : all_non_exited_inferiors ())
3325 for (inferior *inf : all_non_exited_inferiors ())
3370 for (inferior *inf : all_non_exited_inferiors ())
3428 for (inferior *inf : all_non_exited_inferiors ())
3456 /* The first inferior we see with a target that does not work in
3458 inferior *first_not_non_stop = nullptr;
3460 for (inferior *inf : all_non_exited_inferiors ())
3524 the parent inferior. In this case we should take care to only resume
3537 from the inferior (well, program space in fact), so it is
3542 infrun_debug_printf ("[%s] thread %s of this inferior is "
3552 /* For all-stop targets, when we attempt to resume the inferior,
3569 inferior. Once the child has either exited or execd then GDB will
3683 inferior function, as in that case we pretend the inferior
3696 inferior. */
3699 /* Since we've marked the inferior running, give it the terminal. A
3703 target_terminal::inferior ();
3812 inferior *inf = current_inferior ();
3831 /* Now that the inferior has stopped, do any bookkeeping like
3839 /* Initialize static vars when a new inferior begins. */
4003 random_pending_event_thread (inferior *inf, ptid_t waiton_ptid)
4024 more events. INF is the inferior we're using to call target_wait
4028 do_target_wait_1 (inferior *inf, ptid_t ptid,
4033 /* We know that we are looking for an event in the target of inferior
4159 /* For fairness, we pick the first inferior/target to poll at random
4161 polling the rest of the inferior list starting from that one in a
4165 auto inferior_matches = [&wait_ptid_pid] (inferior *inf)
4172 for (inferior *inf : all_inferiors ())
4182 /* Now randomly pick an inferior out of those that matched. */
4190 /* Select the Nth inferior that matched. */
4192 inferior *selected = nullptr;
4194 for (inferior *inf : all_inferiors ())
4202 /* Now poll for events out of each of the matching inferior's
4205 auto do_wait = [&] (inferior *inf)
4217 intrusive_list_iterator<inferior> start
4220 for (intrusive_list_iterator<inferior> it = start;
4224 inferior *inf = &*it;
4230 for (intrusive_list_iterator<inferior> it = inferior_list.begin ();
4234 inferior *inf = &*it;
4261 /* Prepare and stabilize the inferior for detaching it. E.g.,
4269 struct inferior *inf = current_inferior ();
4289 thread stepping belongs to the inferior we're detaching, we need
4368 /* Wait for control to return from inferior to debugger.
4370 If inferior gets a signal, we may decide to start it up again
4372 When this function actually returns it means the inferior
4376 wait_for_inferior (inferior *inf)
4540 /* A quit_handler callback installed while we're handling inferior
4584 report to the user that the inferior has stopped, and do the
4616 forwarded to the inferior if the inferior has the terminal, or,
4657 /* Is the current thread performing an inferior function call as part
4676 /* Switch to the inferior that generated the event, so we can do
4707 struct inferior *inf = find_inferior_ptid (ecs.target, ecs.ptid);
4725 /* If the thread that stopped just completed an inferior
4738 likely a failed inferior call. As the stop has already
4752 /* We may not find an inferior if this was a process exit. */
4791 For example, the exit of an inferior that was automatically added. Try
4794 Note that this never removes the current inferior. Therefore, call this
4795 after RESTORE_THREAD went out of scope, in case the event inferior (which was
4796 temporarily made the current inferior) is meant to be deleted.
5123 It returns true if the inferior should keep going (and GDB
5218 /* Return the STOP_SOON field of the inferior pointed at by ECS. */
5223 struct inferior *inf = find_inferior_ptid (ecs->target, ecs->ptid);
5260 for (inferior *inf : all_inferiors ())
5291 for (inferior *inf : all_inferiors ())
5397 inferior/thread to another fork. We haven't mourned yet at
5416 cancel/finish it, and unless the thread's inferior is being
5446 inferior *inf = find_inferior_pid (event.target, pid);
5454 have to be appended to a per-inferior event list,
5457 resume such an inferior). We assert here instead
5506 /* This may be the first time we see the inferior report
5632 for (inferior *inf : all_inferiors ())
5649 stop_all_threads (const char *reason, inferior *inf)
5849 inferior *curr_inf = current_inferior ();
5857 - the current inferior is native, and
5858 - the current inferior is the one which has the terminal, and
5864 interrupt the program. To address this, if the current inferior
5866 other inferior that has at least one thread executing. */
5882 target_terminal::inferior ();
5987 inferior *inf = ecs->event_thread->inf;
6058 an event from the inferior, figure out what it means and take
6082 /* We had an event in the inferior, but we are not interested in
6087 inferior produces output for the console. The inferior has
6166 /* Ignore gracefully during startup of the inferior, as it might
6277 inferior *inf = find_inferior_ptid (ecs->target, ecs->ptid);
6294 /* Also record this in the inferior itself. */
6310 which holds the signal uncaught by the inferior. */
6407 inferior *inf = ecs->event_thread->inf;
6496 previously locked inferior. */
6504 don't yet know the inferior's post-exec architecture.
6591 restart_threads (struct thread_info *event_thread, inferior *inf)
6609 infrun_debug_printf ("restart threads: [%s] inferior detaching",
6912 See more comments in inferior.h. On the other hand, if we
6924 the target to stop all threads of the inferior, in case the
7007 the inferior over it. If we have non-steppable watchpoints,
7134 at one stage in the past included checks for an inferior
7258 target_terminal::inferior ();
7301 /* The inferior is about to take a signal that will take it
7304 will eventually return) and then allow the inferior to
7324 (leaving the inferior at the step-resume-breakpoint without
7394 stop, or whether we should resume the inferior (transparently).
7768 /* The inferior, while doing a "step" or "next", has ended up in
7771 inferior leaves the trampoline (either by calling the handler
8057 /* The inferior just stepped into, or returned to, an
8060 inferior stopped). Since we want to skip this kind of code,
8061 we keep going until the inferior returns from this
8312 thread. Returns true we set the inferior running, false if we left
8466 current inferior may no longer have a process_stratum target
8619 /* Inferior has stepped into a subroutine call with source code that
8696 /* Inferior has stepped backward into a subroutine call with source
8874 breakpoint for the current inferior thread. */
8911 for the current inferior thread. */
8989 /* Let callers know we don't want to wait for the inferior anymore. */
8993 /* Like keep_going, but passes the signal to the inferior, even if the
9016 are supposed to pass through to the inferior. Simply
9113 /* Called when we should continue running the inferior, because the
9158 /* Several print_*_reason functions to print why the inferior has stopped.
9159 We always print something when the inferior exits, or receives a signal.
9193 struct inferior *inf = current_inferior ();
9203 uiout->message ("[Inferior %s (%s) exited with code %pF]\n",
9212 uiout->message ("[Inferior %s (%s) exited normally]\n",
9418 /* The inferior that caused the stop. */
9480 inferior when we get a process exit event. E.g., for
9513 the inferior actually stops.
9515 There's no point in saying anything if the inferior has exited.
9595 also restores inferior state prior to the call (struct
9627 gone. Likewise if the command switches thread or inferior --
9629 thread/inferior. */
9759 /* Specify how various signals in the inferior should be handled. */
10091 This state must be restored regardless of how the inferior function call
10099 once the inferior function call has finished. */
10157 /* The inferior can be gone if the user types "print exit(0)"
10165 /* How the current thread stopped before the inferior function call was
10169 /* The registers before the inferior function call was executed. */
10175 /* The inferior format depends on SIGINFO_GDBARCH and it has a length of
10193 starting an inferior function call, and run_inferior_call will not use
10200 /* Restore inferior session state to INF_STATE. */
10226 inferior itself like stepping control. It also contains session state like
10238 /* ID and level of the selected frame when the inferior function
10244 /* Save all of the information associated with the inferior<==>gdb
10252 struct inferior *inf = current_inferior ();
10276 /* Restore inferior session state to INF_STATUS. */
10282 struct inferior *inf = current_inferior ();
10540 _("Set inferior debugging."),
10541 _("Show inferior debugging."),
10542 _("When non-zero, inferior specific debugging is enabled."),
10547 Set whether gdb controls the inferior in non-stop mode."), _("\
10548 Show whether gdb controls the inferior in non-stop mode."), _("\
10659 new - the debugger creates a new inferior and rebinds the process\n\
10660 to this new inferior. The program the process was running before\n\
10662 inferior.\n\
10664 same - the debugger keeps the process bound to the same inferior.\n\
10666 the inferior. Restarting the inferior after the exec call restarts\n\
10669 By default, the debugger will use the same inferior."),
10773 Set whether gdb controls the inferior in observer mode."), _("\
10774 Show whether gdb controls the inferior in observer mode."), _("\
10775 In observer mode, GDB can get data from the inferior, but not\n\