61#include "gdbsupport/event-loop.h"
63#include "gdbsupport/enum-flags.h"
65#include "gdbsupport/gdb_optional.h"
67#include "gdbsupport/scope-exit.h"
68#include "gdbsupport/forward-scope-exit.h"
69#include "gdbsupport/gdb_select.h"
70#include <unordered_map>
72#include "gdbsupport/selftest.h"
75#include "gdbsupport/common-debug.h"
76#include "gdbsupport/buildargv.h"
99static void resume (gdb_signal sig);
205 _(
"Disabling randomization of debuggee's "
206 "virtual address space is %s.\n"),
209 gdb_puts (_(
"Disabling randomization of debuggee's "
210 "virtual address space is unsupported on\n"
211 "this platform.\n"), file);
219 error (_(
"Disabling randomization of debuggee's "
220 "virtual address space is unsupported on\n"
236 error (_(
"Cannot change this setting while the inferior is running."));
247 _(
"Controlling the inferior in non-stop mode is %s.\n"),
265 error (_(
"Cannot change this setting while the inferior is running."));
319 (newval ?
"on" :
"off"));
340#define SET_SIGS(nsigs,sigs,flags) \
342 int signum = (nsigs); \
343 while (signum-- > 0) \
344 if ((sigs)[signum]) \
345 (flags)[signum] = 1; \
348#define UNSET_SIGS(nsigs,sigs,flags) \
350 int signum = (nsigs); \
351 while (signum-- > 0) \
352 if ((sigs)[signum]) \
353 (flags)[signum] = 0; \
367#define RESUME_ALL minus_one_ptid
391 gdb_printf (file, _(
"Stopping for shared library events is %s.\n"),
423 _(
"Debugger response to a program "
424 "call of fork or vfork is \"%s\".\n"),
461Can not resume the parent process over vfork in the foreground while\n\
462holding the child stopped. Try \"set detach-on-fork\" or \
463\"set schedule-multiple\".\n"));
493 ptid_t process_ptid = ptid_t (
child_ptid.pid ());
496 gdb_printf (_(
"[Detaching after %s from child %s]\n"),
497 has_vforked ?
"vfork" :
"fork",
553 (
"parent_inf->thread_waiting_for_vfork_done == %s",
557 ->
ptid.to_string ().c_str ())));
570 gdb_printf (_(
"[Attaching after %s %s to child %s]\n"),
572 has_vforked ?
"vfork" :
"fork",
649 if (child_inf !=
nullptr)
666 gdb_assert (parent_thread !=
nullptr);
696 ptid_t process_ptid = ptid_t (parent_ptid.pid ());
710 if (child_inf !=
nullptr)
714 gdb::optional<scoped_restore_current_thread> maybe_restore;
717 maybe_restore.emplace ();
745 bool should_resume =
true;
751 struct breakpoint *step_resume_breakpoint =
nullptr;
752 struct breakpoint *exception_resume_breakpoint =
nullptr;
753 CORE_ADDR step_range_start = 0;
754 CORE_ADDR step_range_end = 0;
755 int current_line = 0;
756 symtab *current_symtab =
nullptr;
757 struct frame_id step_frame_id = { 0 };
787 tp->ptid.to_string ().c_str ());
800 should_resume =
false;
843 ptid_t parent, child;
844 std::unique_ptr<struct thread_fsm>
thread_fsm;
848 if (follow_child && should_resume)
857 exception_resume_breakpoint
905 = step_resume_breakpoint;
912 = exception_resume_breakpoint;
923 warning (_(
"Not resuming: switched threads "
924 "before following fork child."));
937 internal_error (
"Unexpected pending_follow.kind %d\n",
944 return should_resume;
999 thread->
ptid.to_string ().c_str ());
1003 proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
1017 if (
inf->vfork_parent)
1024 inf->vfork_parent->vfork_child =
nullptr;
1025 inf->vfork_parent =
nullptr;
1056 pspace =
inf->pspace;
1057 aspace =
inf->aspace;
1058 inf->aspace =
nullptr;
1059 inf->pspace =
nullptr;
1071 "after child exec]\n"), pidstr.c_str ());
1076 "after child exit]\n"), pidstr.c_str ());
1083 inf->pspace = pspace;
1084 inf->aspace = aspace;
1091 inf->aspace =
inf->pspace->aspace;
1092 inf->removable =
true;
1095 resume_parent = vfork_parent;
1115 inf->aspace =
inf->pspace->aspace;
1117 inf->removable =
true;
1121 resume_parent = vfork_parent;
1126 if (
non_stop && resume_parent !=
nullptr)
1133 resume_parent->
pid);
1214 int pid = ptid.pid ();
1215 ptid_t process_ptid;
1264 if (th->ptid.pid () ==
pid && th->ptid != ptid)
1286 process_ptid = ptid_t (
pid);
1287 gdb_printf (_(
"%s is executing new program: %s\n"),
1296 gdb::unique_xmalloc_ptr<char> exec_file_host
1303 if (exec_file_host ==
nullptr)
1304 warning (_(
"Could not load symbols for executable %s.\n"
1305 "Do you need \"set sysroot\"?"),
1333 following_inferior->
pid =
pid;
1339 following_inferior = execing_inferior;
1613 gdb_assert (
thread !=
nullptr);
1615 return thread->displaced_step_state.in_progress ();
1623 return inf->displaced_step_state.in_progress_count > 0;
1643 inf->displaced_step_state.reset ();
1644 inf->thread_waiting_for_vfork_done =
nullptr;
1657 thread->displaced_step_state.reset ();
1683 _(
"Debugger's willingness to use displaced stepping "
1684 "to step over breakpoints is %s (currently %s).\n"),
1688 _(
"Debugger's willingness to use displaced stepping "
1689 "to step over breakpoints is %s.\n"),
value);
1743 displaced->
reset ();
1792 gdb_assert (!disp_step_thread_state.
in_progress ());
1800 tp->
ptid.to_string ().c_str ());
1807 tp->
ptid.to_string ().c_str ());
1814 CORE_ADDR displaced_pc;
1825 gdb::byte_vector insn_buf (dislen);
1826 read_memory (original_pc, insn_buf.data (), insn_buf.size ());
1828 std::string insn_bytes = bytes_to_string (insn_buf);
1832 insn_bytes.c_str (),
1833 tmp_stream.
string ().c_str ());
1846 tp->
ptid.to_string ().c_str ());
1856 "deferring step of %s",
1857 tp->
ptid.to_string ().c_str ());
1873 "original_pc=%s, displaced_pc=%s",
1874 tp->
ptid.to_string ().c_str (),
1882 CORE_ADDR addr = displaced_pc;
1901 (
"replacement insn %s: invalid length: %d",
1906 gdb::byte_vector insn_buf (dislen);
1907 read_memory (addr, insn_buf.data (), insn_buf.size ());
1909 std::string insn_bytes = bytes_to_string (insn_buf);
1910 std::string insn_str = tmp_stream.
release ();
1913 insn_bytes.c_str (),
1935 catch (
const gdb_exception_error &ex)
1937 if (ex.error != MEMORY_ERROR
1938 && ex.error != NOT_SUPPORTED_ERROR)
1948 warning (_(
"disabling displaced stepping: %s"),
1992 event_thread, event_status);
2054 bool started =
false;
2061 if (threads_to_step.empty ())
2069 (std::move (threads_to_step));
2078 step_over_what step_what;
2079 int must_be_in_line;
2081 gdb_assert (!tp->stop_requested);
2083 if (tp->inf->displaced_step_state.unavailable)
2091 if (tp->inf->thread_waiting_for_vfork_done !=
nullptr)
2107 threads_to_step.erase (threads_to_step.iterator_to (*tp));
2123 if (tp->control.trap_expected
2125 || tp->executing ())
2127 internal_error (
"[%s] has inconsistent state: "
2128 "trap_expected=%d, resumed=%d, executing=%d\n",
2129 tp->ptid.to_string ().c_str (),
2130 tp->control.trap_expected,
2136 tp->ptid.to_string ().c_str ());
2152 error (_(
"Command aborted."));
2159 tp->ptid.to_string ().c_str ());
2165 tp->ptid.to_string ().c_str ());
2172 gdb_assert (tp->control.trap_expected);
2181 gdb_assert (tp->control.trap_expected
2182 || tp->step_after_step_resume_breakpoint);
2204 ptid_t old_ptid, ptid_t new_ptid)
2230 _(
"Mode for locking scheduler "
2231 "during execution is \"%s\".\n"),
2241 error (_(
"Target '%s' cannot support this command."),
2259 bool hw_step =
true;
2315 return (resume_ptid == minus_one_ptid &&
sched_multi
2331 if (
inf->thread_waiting_for_vfork_done !=
nullptr)
2332 return inf->thread_waiting_for_vfork_done;
2337 if (
cur_inf->thread_waiting_for_vfork_done !=
nullptr)
2338 return cur_inf->thread_waiting_for_vfork_done;
2442 resume_ptid.to_string ().c_str (),
2443 step, gdb_signal_to_symbol_string (sig));
2476 (
"thread %s has pending wait "
2477 "status %s (currently_stepping=%d).",
2478 tp->
ptid.to_string ().c_str (),
2488 if (sig != GDB_SIGNAL_0)
2490 warning (_(
"Couldn't deliver signal %s to %s."),
2491 gdb_signal_to_name (sig),
2492 tp->
ptid.to_string ().c_str ());
2531 "current thread [%s] at %s",
2532 step, gdb_signal_to_symbol_string (sig),
2543 if (sig != GDB_SIGNAL_0)
2560 "deliver signal first");
2631 && sig == GDB_SIGNAL_0
2667 gdb_assert_not_reached (
"Invalid displaced_step_prepare_status "
2700 && sig != GDB_SIGNAL_0
2776 tp->
ptid.to_string ().c_str ());
2812 catch (
const gdb_exception &ex)
2871 tp->
ptid.to_string ().c_str ());
2879 (
"thread %s has pending wait status %s (currently_stepping=%d).",
2880 tp->
ptid.to_string ().c_str (),
2994static step_over_what
2997 step_over_what what = 0;
3048 "%s, no resumed threads",
3060 " thread has a pending waitstatus",
3070 "target has pending events",
3113 (
const char *reason)
3114 : m_reason (reason),
3193 (
const char *reason)
3194 : m_reason (reason),
3244 if (!
non_stop && resume_target ==
nullptr)
3254 inferior *first_not_non_stop =
nullptr;
3267 first_not_non_stop =
inf;
3269 if (first_connection ==
nullptr)
3270 first_connection = proc_target;
3271 else if (first_connection != proc_target
3272 && first_not_non_stop !=
nullptr)
3278 error (_(
"Connection %d (%s) does not support "
3279 "multi-target resumption."),
3298 tp->
ptid.to_string ().c_str ());
3305 tp->
ptid.to_string ().c_str ());
3313 tp->
ptid.to_string ().c_str ());
3339 "waiting for vfork-done",
3340 tp->
ptid.to_string ().c_str (),
3342 ->
ptid.to_string ().c_str ());
3371 tp->
ptid.to_string ().c_str (),
3377 tp->
ptid.to_string ().c_str ());
3383 error (_(
"Command aborted."));
3442 if (addr == (CORE_ADDR) -1)
3469 if (siggnal != GDB_SIGNAL_DEFAULT)
3488 gdb_signal_to_symbol_string (siggnal),
3489 resume_ptid.to_string ().c_str ());
3534 tp->ptid.to_string ().c_str ());
3572 (
"resuming threads, all-stop-on-top-of-non-stop");
3589 finish_state.release ();
3687 if (tp->executing ())
3700 if (!tp->has_pending_waitstatus ())
3704 tp->set_pending_waitstatus (ws);
3721 tp->set_resumed (
true);
3787 waiton_ptid.to_string ().c_str (),
3790 result_ptid.to_string ().c_str (),
3805 if (thread ==
nullptr)
3812 gdb_assert (thread->
resumed ());
3837 if (ptid == minus_one_ptid || ptid.is_pid ())
3844 ptid.to_string ().c_str ());
3847 tp =
inf->find_thread (ptid);
3848 gdb_assert (tp !=
nullptr);
3867 tp->
ptid.to_string ().c_str (),
3875 tp->
ptid.to_string ().c_str (),
3884 tp->
ptid.to_string ().c_str ());
3898 tp->
ptid.to_string ().c_str ());
3939 options &= ~TARGET_WNOHANG;
3951 int num_inferiors = 0;
3952 int random_selector;
3961 return inf->process_target () !=
nullptr;
3966 if (inferior_matches (
inf))
3969 if (num_inferiors == 0)
3976 random_selector = (int)
3977 ((num_inferiors * (
double) rand ()) / (RAND_MAX + 1.0));
3979 if (num_inferiors > 1)
3981 num_inferiors, random_selector);
3988 if (inferior_matches (
inf))
3989 if (random_selector-- == 0)
4010 intrusive_list_iterator<inferior> start
4013 for (intrusive_list_iterator<inferior> it = start;
4019 if (inferior_matches (
inf) && do_wait (
inf))
4023 for (intrusive_list_iterator<inferior> it =
inferior_list.begin ();
4029 if (inferior_matches (
inf) && do_wait (
inf))
4062 ptid_t pid_ptid = ptid_t (
inf->
pid);
4065 scoped_restore restore_detaching = make_scoped_restore (&
inf->detaching,
true);
4076 tp->ptid.to_string ().c_str ());
4117 if (thr->displaced_step_state.in_progress ())
4119 if (thr->executing ())
4121 if (!thr->stop_requested)
4124 thr->stop_requested =
true;
4128 thr->set_resumed (
false);
4178 (
inf->process_target (), minus_one_ptid);
4208 finish_state.release ();
4261 if (thr->thread_fsm () ==
nullptr)
4267 thr->thread_fsm ()->clean_up (thr);
4376 scoped_restore save_pagination
4383 scoped_restore restore_quit_handler
4402 gdb::optional<scoped_restore_current_traceframe> maybe_restore_traceframe;
4405 maybe_restore_traceframe.emplace ();
4422 scoped_restore save_exec_dir
4441 if (ecs.
ptid != null_ptid
4442 && ecs.
ptid != minus_one_ptid)
4458 auto defer_bpstat_clear
4460 auto defer_delete_threads
4471 bool should_stop =
true;
4476 if (thr !=
nullptr && thr->
thread_fsm () !=
nullptr)
4485 bool should_notify_stop =
true;
4486 bool proceeded =
false;
4501 should_notify_stop =
false;
4504 else if (thr !=
nullptr && thr->
thread_fsm () !=
nullptr)
4508 if (should_notify_stop)
4536 defer_delete_threads.release ();
4537 defer_bpstat_clear.release ();
4540 finish_state.release ();
4589 (
"symtab = %s, line = %d, step_frame_id = %s, step_stack_frame_id = %s",
4624 if (target !=
nullptr)
4626 if (ptid !=
nullptr)
4653 ecs->
ptid.to_string ().c_str ());
4670 CORE_ADDR breakpoint_pc, decr_pc;
4696 if (ws.
sig () != GDB_SIGNAL_TRAP)
4775 gdb::optional<scoped_restore_tmpl<int>> restore_operation_disable;
4778 restore_operation_disable.emplace
4801 && thread->
prev_pc == breakpoint_pc))
4839 const char *fn =
nullptr;
4952 if (
block !=
nullptr
4981 gdb_assert (
inf !=
nullptr);
4982 return inf->control.stop_soon;
5019 if (target ==
nullptr
5050 if (target ==
nullptr
5056 FD_SET (fd, &readfds);
5066 return {
nullptr, minus_one_ptid, std::move (ws)};
5077 perror_with_name (
"interruptible_select");
5089 tp->
ptid.to_string ().c_str ());
5095 && ws.
sig () == GDB_SIGNAL_TRAP)
5138 mark_ptid = minus_one_ptid;
5156 mark_ptid = ptid_t (event_ptid.pid ());
5159 mark_ptid = event_ptid;
5180 event.
ptid.to_string ().c_str ());
5197 if (event.
ptid.is_pid ())
5213 gdb_assert (t !=
nullptr);
5216 (
"using %s", t->
ptid.to_string ().c_str ());
5220 t =
event.target->find_thread (event.
ptid);
5259 && event.
ws.
sig () == GDB_SIGNAL_0)
5269 (
"displaced-step of %s canceled",
5270 t->
ptid.to_string ().c_str ());
5282 (
"target_wait %s, saving status for %s",
5284 t->
ptid.to_string ().c_str ());
5302 "(currently_stepping=%d)",
5304 t->
ptid.to_string ().c_str (),
5324 inf !=
nullptr ?
inf->num : -1);
5334 if (
inf !=
nullptr &&
inf->process_target () != target)
5346 if (
inf !=
nullptr &&
inf->process_target () != target)
5356 debug_prefixed_printf (
"infrun",
"stop_all_threads",
"done");
5364 for (pass = 0; pass < 2; pass++, iterations++)
5369 int waits_needed = 0;
5373 if (
inf !=
nullptr &&
inf->process_target () != target)
5384 if (
inf !=
nullptr && t->inf !=
inf)
5398 if (t->executing ())
5402 if (!t->stop_requested)
5405 t->ptid.to_string ().c_str ());
5407 t->stop_requested = 1;
5412 t->ptid.to_string ().c_str ());
5415 if (t->stop_requested)
5421 t->ptid.to_string ().c_str ());
5425 t->set_resumed (
false);
5429 if (waits_needed == 0)
5438 for (
int i = 0; i < waits_needed; i++)
5455 bool any_sync =
false;
5529 bool swap_terminal =
true;
5533 bool ignore_event =
false;
5537 if (swap_terminal && thread->executing ())
5539 if (thread->inf != curr_inf)
5546 swap_terminal =
false;
5549 if (!ignore_event && thread->resumed ())
5556 "(ignoring: found resumed)");
5558 ignore_event =
true;
5561 if (ignore_event && !swap_terminal)
5671 && (ecs->
ws.
sig () == GDB_SIGNAL_ILL
5672 || ecs->
ws.
sig () == GDB_SIGNAL_SEGV
5673 || ecs->
ws.
sig () == GDB_SIGNAL_EMT))
5764 internal_error (_(
"unhandled stop_soon: %d"), (
int) stop_soon);
5884 CORE_ADDR parent_pc;
6147 event_thread->
ptid.to_string ().c_str (),
6148 inf !=
nullptr ?
inf->num : -1);
6157 if (
inf !=
nullptr && tp->inf !=
inf)
6160 if (tp->inf->detaching)
6163 tp->ptid.to_string ().c_str ());
6169 if (tp == event_thread)
6172 tp->ptid.to_string ().c_str ());
6179 tp->ptid.to_string ().c_str ());
6186 tp->ptid.to_string ().c_str ());
6187 gdb_assert (tp->executing () || tp->has_pending_waitstatus ());
6194 tp->ptid.to_string ().c_str ());
6195 gdb_assert (!tp->resumed ());
6200 if (tp->has_pending_waitstatus ())
6203 tp->ptid.to_string ().c_str ());
6204 tp->set_resumed (
true);
6208 gdb_assert (!tp->stop_requested);
6215 internal_error (
"thread [%s] needs a step-over, but not in "
6216 "step-over queue\n",
6217 tp->ptid.to_string ().c_str ());
6223 tp->ptid.to_string ().c_str ());
6229 tp->ptid.to_string ().c_str ());
6260 if (had_step_over_info)
6319 "pending events, saving status");
6336 "(currently_stepping=%d)",
6338 tp->
ptid.to_string ().c_str (),
6390 int stopped_by_watchpoint;
6508 ecs->
ptid.to_string ().c_str ());
6515 ecs->
ptid.to_string ().c_str ());
6523 stopped_by_watchpoint = 0;
6529 if (stopped_by_watchpoint
6571 bpstat *stop_chain =
nullptr;
6627 int step_through_delay
6630 if (step_through_delay)
6634 && step_through_delay)
6642 else if (step_through_delay)
6676 && stopped_by_watchpoint)
6723 gdb::optional<scoped_restore_tmpl<int>>
6724 restore_operation_disable;
6727 restore_operation_disable.emplace
6765 random_signal = !stopped_by_watchpoint;
6784 gdb_signal_to_symbol_string (stop_signal));
6901 CORE_ADDR jmp_buf_pc;
6939 struct value *arg_value;
6952 frame, &jmp_buf_pc))
6955 "(!gdbarch_get_longjmp_target)");
7127 if (sr_bp !=
nullptr
7190 (
"stepping inside range [%s-%s]",
7235 CORE_ADDR pc_after_resolver =
7240 if (pc_after_resolver)
7245 sr_sal.
pc = pc_after_resolver;
7293 CORE_ADDR real_stop_pc
7303 sr_sal.
pc = real_stop_pc;
7347 CORE_ADDR real_stop_pc;
7421 if (real_stop_pc == 0)
7423 if (real_stop_pc != 0)
7449 if (tmp_sal.
line != 0
7544 && stop_pc_sal.
line == 0)
7602 if (stop_pc_sal.
line == 0)
7681 bool refresh_step_info =
true;
7707 refresh_step_info =
false;
7709 "it's not the start of a statement");
7720 stop_pc_sal.
line = 0;
7722 "it's not the start of a statement");
7744 (
"updated step range, start = %s, end = %s, may_range_step = %d",
7748 if (refresh_step_info)
7756 ptid_t resume_ptid);
7785 (
"need to finish step-over of [%s]",
7796 ecs->
ptid.to_string ().c_str ());
7807 (
"thread [%s] still needs step-over",
7861 if (tp->has_pending_waitstatus ())
7867 && (tp->inf->process_target () != resume_target
7868 || tp->inf->pid != resume_ptid.pid ()))
7871 if (tp->control.trap_expected)
7885 if (tp->has_pending_waitstatus ())
7891 && (tp->inf->process_target () != resume_target
7892 || tp->inf->pid != resume_ptid.pid ()))
7896 if (tp->control.step_range_end)
7931 if (thr->executing ())
7936 if (thr->resumed () && thr->has_pending_waitstatus ())
8089 if (stop_func_sal.
end
8193 gdb_assert (
inferior_thread ()->control.step_resume_breakpoint ==
nullptr);
8223 gdb_assert (return_frame !=
nullptr);
8281 gdb_assert (
inferior_thread ()->control.exception_resume_breakpoint ==
nullptr);
8298 const struct block *b,
8318 (
unsigned long) handler);
8333 catch (
const gdb_exception_error &e)
8347 struct value *arg_value;
8396 const struct block *b;
8413 b =
func->value_block ();
8416 if (!sym->is_argument ())
8429 catch (
const gdb_exception_error &e)
8461 "resuming to collect trap",
8462 tp->
ptid.to_string ().c_str ());
8481 "step-over for %s deferred",
8482 tp->
ptid.to_string ().c_str ());
8487 tp->
ptid.to_string ().c_str ());
8494 step_over_what step_what;
8531 else if (remove_wps)
8547 catch (
const gdb_exception_error &e)
8626 uiout->
text (
"\nProgram terminated with signal ");
8629 gdb_signal_to_name (siggnal));
8634 gdb_signal_to_string (siggnal));
8636 uiout->
text (
".\n");
8637 uiout->
text (
"The program no longer exists.\n");
8651 std::string exit_code_str
8652 = string_printf (
"0%o", (
unsigned int) exitstatus);
8653 uiout->
message (
"[Inferior %s (%s) exited with code %pF]\n",
8654 plongest (
inf->num), pidstr.c_str (),
8662 uiout->
message (
"[Inferior %s (%s) exited normally]\n",
8663 plongest (
inf->num), pidstr.c_str ());
8680 uiout->
text (
"\nThread ");
8684 if (
name !=
nullptr)
8686 uiout->
text (
" \"");
8692 uiout->
text (
"\nProgram");
8694 if (siggnal == GDB_SIGNAL_0 && !uiout->
is_mi_like_p ())
8695 uiout->
text (
" stopped");
8698 uiout->
text (
" received signal ");
8703 uiout->
field_string (
"signal-name", gdb_signal_to_name (siggnal));
8707 uiout->
field_string (
"signal-meaning", gdb_signal_to_string (siggnal));
8716 uiout->
text (
".\n");
8725 uiout->
text (
"\nNo more reverse-execution history.\n");
8738 int do_frame_printing = 1;
8773 do_frame_printing = 0;
8776 internal_error (_(
"Unknown value."));
8784 if (do_frame_printing)
8799 scoped_restore save_uiout = make_scoped_restore (&
current_uiout, uiout);
8830 gdb_printf (_(
"Cannot remove breakpoints because "
8831 "program is no longer writable.\nFurther "
8832 "execution is probably impossible.\n"));
8912 ptid_t finish_ptid = null_ptid;
8915 finish_ptid = minus_one_ptid;
8930 gdb::optional<scoped_finish_thread_state> maybe_finish_thread_state;
8931 if (finish_ptid != null_ptid)
8933 maybe_finish_thread_state.emplace
8992 gdb_printf (_(
"No unwaited-for children left.\n"));
9011 maybe_finish_thread_state.reset ();
9049 catch (
const gdb_exception_error &ex)
9052 "Error while running hook_stop:\n");
9107 for (signo = 0; signo < (int) GDB_SIGNAL_LAST; signo++)
9157 for (i = 0; i < GDB_SIGNAL_LAST; ++i)
9167 "to program\tDescription\n"));
9173 const char *
name = gdb_signal_to_name (oursig);
9174 int name_padding = 13 - strlen (
name);
9176 if (name_padding <= 0)
9180 gdb_printf (
"%*.*s ", name_padding, name_padding,
" ");
9184 gdb_printf (
"%s\n", gdb_signal_to_string (oursig));
9192 int digits, wordlen;
9193 int sigfirst, siglast;
9194 enum gdb_signal oursig;
9197 if (args ==
nullptr)
9204 const size_t nsigs = GDB_SIGNAL_LAST;
9205 unsigned char sigs[nsigs] {};
9209 gdb_argv built_argv (args);
9216 for (
char *arg : built_argv)
9218 wordlen = strlen (arg);
9219 for (digits = 0; isdigit (arg[digits]); digits++)
9223 sigfirst = siglast = -1;
9225 if (wordlen >= 1 && !strncmp (arg,
"all", wordlen))
9231 siglast = nsigs - 1;
9233 else if (wordlen >= 1 && !strncmp (arg,
"stop", wordlen))
9238 else if (wordlen >= 1 && !strncmp (arg,
"ignore", wordlen))
9242 else if (wordlen >= 2 && !strncmp (arg,
"print", wordlen))
9246 else if (wordlen >= 2 && !strncmp (arg,
"pass", wordlen))
9250 else if (wordlen >= 3 && !strncmp (arg,
"nostop", wordlen))
9254 else if (wordlen >= 3 && !strncmp (arg,
"noignore", wordlen))
9258 else if (wordlen >= 4 && !strncmp (arg,
"noprint", wordlen))
9263 else if (wordlen >= 4 && !strncmp (arg,
"nopass", wordlen))
9267 else if (digits > 0)
9275 sigfirst = siglast = (int)
9277 if (arg[digits] ==
'-')
9282 if (sigfirst > siglast)
9285 std::swap (sigfirst, siglast);
9290 oursig = gdb_signal_from_name (arg);
9291 if (oursig != GDB_SIGNAL_UNKNOWN)
9293 sigfirst = siglast = (int) oursig;
9298 error (_(
"Unrecognized or ambiguous flag word: \"%s\"."), arg);
9305 for (
int signum = sigfirst; signum >= 0 && signum <= siglast; signum++)
9307 switch ((
enum gdb_signal) signum)
9309 case GDB_SIGNAL_TRAP:
9310 case GDB_SIGNAL_INT:
9311 if (!allsigs && !sigs[signum])
9313 if (
query (_(
"%s is used by the debugger.\n\
9314Are you sure you want to change it? "),
9315 gdb_signal_to_name ((
enum gdb_signal) signum)))
9320 gdb_printf (_(
"Not confirmed, unchanged.\n"));
9324 case GDB_SIGNAL_DEFAULT:
9325 case GDB_SIGNAL_UNKNOWN:
9335 for (
int signum = 0; signum < nsigs; signum++)
9346 for (; signum < nsigs; signum++)
9360 const char *text,
const char *word)
9362 static const char *
const keywords[] =
9383 if (num >= 1 && num <= 15)
9384 return (
enum gdb_signal) num;
9385 error (_(
"Only signals 1-15 are valid as numeric signals.\n\
9386Use \"info signals\" for a list of symbolic signals."));
9397 enum gdb_signal oursig;
9404 oursig = gdb_signal_from_name (signum_exp);
9405 if (oursig == GDB_SIGNAL_UNKNOWN)
9417 for (oursig = GDB_SIGNAL_FIRST;
9418 (int) oursig < (
int) GDB_SIGNAL_LAST;
9419 oursig = (
enum gdb_signal) ((
int) oursig + 1))
9423 if (oursig != GDB_SIGNAL_UNKNOWN
9424 && oursig != GDB_SIGNAL_DEFAULT && oursig != GDB_SIGNAL_0)
9428 gdb_printf (_(
"\nUse the \"handle\" command "
9429 "to change these tables.\n"));
9448 LONGEST transferred;
9463 error (_(
"Unable to read siginfo"));
9472 LONGEST transferred;
9485 if (transferred != fromval->
type ()->
length ())
9486 error (_(
"Unable to write siginfo"));
9499static struct value *
9534 gdb::unique_xmalloc_ptr<gdb_byte> siginfo_data;
9541 siginfo_data.reset ((gdb_byte *)
xmalloc (len));
9545 siginfo_data.get (), 0, len) != len)
9548 siginfo_data.reset (
nullptr);
9681 inf_status->thread_control = tp->
control;
9682 inf_status->inferior_control =
inf->control;
9698 &inf_status->selected_frame_level);
9792 error (_(
"Target does not support this operation."));
9808 internal_error (_(
"bogus execution_direction value: %d"),
9817 gdb_printf (file, _(
"Resuming the execution of threads "
9818 "of all processes is %s.\n"),
value);
9856 scoped_mock_context<test_target_ops> target1 (arch);
9857 scoped_mock_context<test_target_ops> target2 (arch);
9859 ptid_t old_ptid (111, 222);
9860 ptid_t new_ptid (111, 333);
9862 target1.mock_inferior.pid = old_ptid.pid ();
9863 target1.mock_thread.ptid = old_ptid;
9864 target1.mock_inferior.ptid_thread_map.clear ();
9865 target1.mock_inferior.ptid_thread_map[old_ptid] = &target1.mock_thread;
9867 target2.mock_inferior.pid = old_ptid.pid ();
9868 target2.mock_thread.ptid = old_ptid;
9869 target2.mock_inferior.ptid_thread_map.clear ();
9870 target2.mock_inferior.ptid_thread_map[old_ptid] = &target2.mock_thread;
9872 auto restore_inferior_ptid = make_scoped_restore (&
inferior_ptid, old_ptid);
9885 scoped_mock_context<test_target_ops> target1 (arch);
9886 scoped_mock_context<test_target_ops> target2 (arch);
9888 ptid_t old_ptid (111, 222);
9889 ptid_t new_ptid (111, 333);
9891 target1.mock_inferior.pid = old_ptid.pid ();
9892 target1.mock_thread.ptid = old_ptid;
9893 target1.mock_inferior.ptid_thread_map.clear ();
9894 target1.mock_inferior.ptid_thread_map[old_ptid] = &target1.mock_thread;
9896 target2.mock_inferior.pid = old_ptid.pid ();
9897 target2.mock_thread.ptid = old_ptid;
9898 target2.mock_inferior.ptid_thread_map.clear ();
9899 target2.mock_inferior.ptid_thread_map[old_ptid] = &target2.mock_thread;
9901 auto restore_inferior_ptid = make_scoped_restore (&
inferior_ptid, old_ptid);
9927What debugger does when program gets various signals.\n\
9928Specify a signal as argument to print info on that signal only."));
9932Specify how to handle signals.\n\
9933Usage: handle SIGNAL [ACTIONS]\n\
9934Args are signals and actions to apply to those signals.\n\
9935If no actions are specified, the current settings for the specified signals\n\
9936will be displayed instead.\n\
9938Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\
9939from 1-15 are allowed for compatibility with old versions of GDB.\n\
9940Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
9941The special arg \"all\" is recognized to mean all signals except those\n\
9942used by the debugger, typically SIGTRAP and SIGINT.\n\
9944Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\
9945\"pass\", \"nopass\", \"ignore\", or \"noignore\".\n\
9946Stop means reenter debugger if this signal happens (implies print).\n\
9947Print means print a message if this signal happens.\n\
9948Pass means let program see this signal; otherwise program doesn't know.\n\
9949Ignore is a synonym for nopass and noignore is a synonym for pass.\n\
9950Pass and Stop may be combined.\n\
9952Multiple signals may be specified. Signal numbers and signal names\n\
9953may be interspersed with actions, with the actions being performed for\n\
9954all signals cumulatively specified."));
9959There is no `stop' command, but you can set a hook on `stop'.\n\
9960This allows you to set a list of commands to be run each time execution\n\
9961of the program stops."), &
cmdlist);
9965 _(
"Set inferior debugging."),
9966 _(
"Show inferior debugging."),
9967 _(
"When non-zero, inferior specific debugging is enabled."),
9972Set whether gdb controls the inferior in non-stop mode."), _(
"\
9973Show whether gdb controls the inferior in non-stop mode."), _(
"\
9974When debugging a multi-threaded program and this setting is\n\
9975off (the default, also called all-stop mode), when one thread stops\n\
9976(for a breakpoint, watchpoint, exception, or similar events), GDB stops\n\
9977all other threads in the program while you interact with the thread of\n\
9978interest. When you continue or step a thread, you can allow the other\n\
9979threads to run, or have them remain stopped, but while you inspect any\n\
9980thread's state, all threads stop.\n\
9982In non-stop mode, when one thread stops, other threads can continue\n\
9983to run freely. You'll be able to step each thread independently,\n\
9984leave it stopped or free to run as needed."),
9990 for (
size_t i = 0; i < GDB_SIGNAL_LAST; i++)
10052Set stopping for shared library events."), _(
"\
10053Show stopping for shared library events."), _(
"\
10054If nonzero, gdb will give control to the user when the dynamic linker\n\
10055notifies gdb of shared library events. The most common event of interest\n\
10056to the user would be loading/unloading of a new library."),
10064Set debugger response to a program call of fork or vfork."), _(
"\
10065Show debugger response to a program call of fork or vfork."), _(
"\
10066A fork or vfork creates a new process. follow-fork-mode can be:\n\
10067 parent - the original process is debugged after a fork\n\
10068 child - the new process is debugged after a fork\n\
10069The unfollowed process will continue to run.\n\
10070By default, the debugger will follow the parent process."),
10078Set debugger response to a program call of exec."), _(
"\
10079Show debugger response to a program call of exec."), _(
"\
10080An exec call replaces the program image of a process.\n\
10082follow-exec-mode can be:\n\
10084 new - the debugger creates a new inferior and rebinds the process\n\
10085to this new inferior. The program the process was running before\n\
10086the exec call can be restarted afterwards by restarting the original\n\
10089 same - the debugger keeps the process bound to the same inferior.\n\
10090The new executable image replaces the previous executable loaded in\n\
10091the inferior. Restarting the inferior after the exec call restarts\n\
10092the executable the process was running after the exec call.\n\
10094By default, the debugger will use the same inferior."),
10101Set mode for locking scheduler during execution."), _(
"\
10102Show mode for locking scheduler during execution."), _(
"\
10103off == no locking (threads may preempt at any time)\n\
10104on == full locking (no thread except the current thread may run)\n\
10105 This applies to both normal execution and replay mode.\n\
10106step == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
10107 In this mode, other threads may run during other commands.\n\
10108 This applies to both normal execution and replay mode.\n\
10109replay == scheduler locked in replay mode and unlocked during normal execution."),
10115Set mode for resuming threads of all processes."), _(
"\
10116Show mode for resuming threads of all processes."), _(
"\
10117When on, execution commands (such as 'continue' or 'next') resume all\n\
10118threads of all processes. When off (which is the default), execution\n\
10119commands only resume the threads of the current process. The set of\n\
10120threads that are resumed is further refined by the scheduler-locking\n\
10121mode (see help set scheduler-locking)."),
10127Set mode of the step operation."), _(
"\
10128Show mode of the step operation."), _(
"\
10129When set, doing a step over a function without debug line information\n\
10130will stop at the first instruction of that function. Otherwise, the\n\
10131function is skipped and the step command stops at a different source line."),
10138Set debugger's willingness to use displaced stepping."), _(
"\
10139Show debugger's willingness to use displaced stepping."), _(
"\
10140If on, gdb will use displaced stepping to step over breakpoints if it is\n\
10141supported by the target architecture. If off, gdb will not use displaced\n\
10142stepping to step over breakpoints, even if such is supported by the target\n\
10143architecture. If auto (which is the default), gdb will use displaced stepping\n\
10144if the target architecture supports it and non-stop mode is active, but will not\n\
10145use it in all-stop mode (see help set non-stop)."),
10152Options are 'forward' or 'reverse'."),
10153 _(
"Show direction of execution (forward/reverse)."),
10154 _(
"Tells gdb whether to execute forward or backward."),
10161Set whether gdb will detach the child of a fork."), _(
"\
10162Show whether gdb will detach the child of a fork."), _(
"\
10163Tells gdb whether to detach the child of a fork."),
10170Set disabling of debuggee's virtual address space randomization."), _(
"\
10171Show disabling of debuggee's virtual address space randomization."), _(
"\
10172When this mode is on (which is the default), randomization of the virtual\n\
10173address space is disabled. Standalone programs run with the randomization\n\
10174enabled by default on some platforms."),
10198Set whether gdb controls the inferior in observer mode."), _(
"\
10199Show whether gdb controls the inferior in observer mode."), _(
"\
10200In observer mode, GDB can get data from the inferior, but not\n\
10201affect its execution. Registers and memory may not be changed,\n\
10202breakpoints may not be set, and the program cannot be interrupted\n\
10210 selftests::register_test (
"infrun_thread_ptid_changed",
10211 selftests::infrun_thread_ptid_changed);
void annotate_starting(void)
void annotate_exited(int exitstatus)
void annotate_signalled(void)
void annotate_signal_string(void)
void annotate_signal(void)
void annotate_signal_string_end(void)
void annotate_signal_name(void)
void annotate_signal_name_end(void)
void annotate_stopped(void)
void annotate_thread_changed(void)
struct gdbarch * target_gdbarch(void)
CORE_ADDR gdbarch_skip_prologue_noexcept(gdbarch *gdbarch, CORE_ADDR pc) noexcept
void mark_async_event_handler(async_event_handler *async_handler_ptr)
async_event_handler * create_async_event_handler(async_event_handler_func *proc, gdb_client_data client_data, const char *name)
void clear_async_event_handler(async_event_handler *async_handler_ptr)
iterator_range< block_iterator_wrapper > block_iterator_range
bool find_pc_partial_function_sym(CORE_ADDR pc, const struct general_symbol_info **sym, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
struct symbol * find_pc_function(CORE_ADDR pc)
struct symbol * get_frame_function(frame_info_ptr frame)
int catch_syscall_enabled(void)
bool catching_syscall_number(int syscall_number)
void breakpoint_re_set(void)
breakpoint_up set_momentary_breakpoint_at_pc(struct gdbarch *gdbarch, CORE_ADDR pc, enum bptype type)
void check_longjmp_breakpoint_for_call_dummy(struct thread_info *tp)
void breakpoint_retire_moribund(void)
void breakpoint_init_inferior(enum inf_context context)
int software_breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
void bpstat_run_callbacks(bpstat *bs_head)
void breakpoint_re_set_thread(struct breakpoint *b)
int remove_breakpoints(void)
int breakpoints_should_be_inserted_now(void)
bool bpstat_should_step()
int detach_breakpoints(ptid_t ptid)
struct breakpoint * clone_momentary_breakpoint(struct breakpoint *orig)
int watchpoints_triggered(const target_waitstatus &ws)
int moribund_breakpoint_here_p(const address_space *aspace, CORE_ADDR pc)
enum breakpoint_here breakpoint_here_p(const address_space *aspace, CORE_ADDR pc)
bool bpstat_explains_signal(bpstat *bsp, enum gdb_signal sig)
void breakpoint_auto_delete(bpstat *bs)
void bpstat_clear_actions(void)
bool bpstat_causes_stop(bpstat *bs)
void remove_breakpoints_inf(inferior *inf)
int hardware_breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
int pc_at_non_inline_function(const address_space *aspace, CORE_ADDR pc, const target_waitstatus &ws)
struct bpstat_what bpstat_what(bpstat *bs_head)
bpstat * bpstat_stop_status_nowatch(const address_space *aspace, CORE_ADDR bp_addr, thread_info *thread, const target_waitstatus &ws)
void bpstat_clear(bpstat **bsp)
bpstat * build_bpstat_chain(const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws)
int insert_single_step_breakpoints(struct gdbarch *gdbarch)
bpstat * bpstat_stop_status(const address_space *aspace, CORE_ADDR bp_addr, thread_info *thread, const target_waitstatus &ws, bpstat *stop_chain)
int single_step_breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
int breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
bpstat * bpstat_copy(bpstat *bs)
int breakpoint_address_match(const address_space *aspace1, CORE_ADDR addr1, const address_space *aspace2, CORE_ADDR addr2)
void mark_breakpoints_out(void)
breakpoint_up set_momentary_breakpoint(struct gdbarch *gdbarch, struct symtab_and_line sal, struct frame_id frame_id, enum bptype type)
void insert_breakpoints(void)
void update_breakpoints_after_exec(void)
enum print_stop_action bpstat_print(bpstat *bs, target_waitkind kind)
void insert_single_step_breakpoint(struct gdbarch *gdbarch, const address_space *aspace, CORE_ADDR next_pc)
@ BPSTAT_WHAT_CLEAR_LONGJMP_RESUME
@ BPSTAT_WHAT_STOP_SILENT
@ BPSTAT_WHAT_SET_LONGJMP_RESUME
@ BPSTAT_WHAT_HP_STEP_RESUME
@ BPSTAT_WHAT_STEP_RESUME
@ BPSTAT_WHAT_KEEP_CHECKING
void disable_current_display(void)
@ ordinary_breakpoint_here
@ permanent_breakpoint_here
struct gdbarch * m_siginfo_gdbarch
void restore(struct gdbarch *gdbarch, struct thread_info *tp, struct regcache *regcache) const
struct thread_suspend_state m_thread_suspend
std::unique_ptr< readonly_detached_regcache > m_registers
infcall_suspend_state(struct gdbarch *gdbarch, const struct thread_info *tp, struct regcache *regcache)
readonly_detached_regcache * registers() const
gdb::unique_xmalloc_ptr< gdb_byte > m_siginfo_data
inferior_control_state control
target_desc_info tdesc_info
thread_info * find_thread(ptid_t ptid)
symfile_add_flags symfile_flags
displaced_step_inferior_state displaced_step_state
struct process_stratum_target * process_target()
thread_info * thread_waiting_for_vfork_done
const std::string & args() const
struct address_space * aspace
inf_threads_range threads()
intrusive_list< thread_info > thread_list
struct program_space * pspace
virtual void on_about_to_proceed()
virtual void on_sync_execution_done()
thread_info * find_thread(ptid_t ptid)
bool has_resumed_with_pending_wait_status() const
thread_info * random_resumed_with_pending_wait_status(inferior *inf, ptid_t filter_ptid)
bool commit_resumed_state
const address_space * aspace() const
void restore(readonly_detached_regcache *src)
const std::string & string()
static void ours_for_output()
int stepping_over_watchpoint
void set_pending_waitstatus(const target_waitstatus &ws)
void set_resumed(bool resumed)
CORE_ADDR stop_pc() const
void set_thread_fsm(std::unique_ptr< struct thread_fsm > fsm)
std::unique_ptr< struct thread_fsm > release_thread_fsm()
struct symtab * current_symtab
void set_running(bool running)
void restore_suspend_from(const thread_suspend_state &suspend)
gdb_signal stop_signal() const
void save_suspend_to(thread_suspend_state &suspend) const
void set_executing(bool executing)
bool has_pending_waitstatus() const
void set_stop_reason(target_stop_reason reason)
void clear_pending_waitstatus()
struct frame_id initiating_frame
struct target_waitstatus pending_follow
const target_waitstatus & pending_waitstatus() const
target_stop_reason stop_reason() const
int step_after_step_resume_breakpoint
int stepping_over_breakpoint
struct thread_fsm * thread_fsm() const
displaced_step_thread_state displaced_step_state
void set_stop_pc(CORE_ADDR stop_pc)
void set_stop_signal(gdb_signal sig)
thread_control_state control
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void text(const char *string)
bool is_mi_like_p() const
void message(const char *format,...) ATTRIBUTE_PRINTF(2
struct cmd_list_element * showlist
void error_no_arg(const char *why)
struct cmd_list_element * cmdlist
struct cmd_list_element * setlist
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
set_show_commands add_setshow_zinteger_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc)
set_show_commands add_setshow_enum_cmd(const char *name, enum command_class theclass, const char *const *enumlist, const char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void not_just_help_class_command(const char *args, int from_tty)
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
cmd_list_element * add_info_alias(const char *name, cmd_list_element *target, int abbrev_flag)
set_show_commands add_setshow_auto_boolean_cmd(const char *name, enum command_class theclass, enum auto_boolean *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void complete_on_enum(completion_tracker &tracker, const char *const *enumlist, const char *text, const char *word)
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
void execute_cmd_pre_hook(struct cmd_list_element *c)
void signal_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
int check_quit_flag(void)
quit_handler_ftype * quit_handler
void(* deprecated_context_hook)(int)
int gdb_print_insn(struct gdbarch *gdbarch, CORE_ADDR memaddr, struct ui_file *stream, int *branch_delay_insns)
#define displaced_debug_printf(fmt,...)
displaced_step_prepare_status
@ DISPLACED_STEP_PREPARE_STATUS_CANT
@ DISPLACED_STEP_PREPARE_STATUS_UNAVAILABLE
@ DISPLACED_STEP_PREPARE_STATUS_OK
displaced_step_finish_status
@ DISPLACED_STEP_FINISH_STATUS_OK
@ DISPLACED_STEP_FINISH_STATUS_NOT_EXECUTED
LONGEST parse_and_eval_long(const char *exp)
void async_enable_stdin(void)
int interruptible_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
void gdb_rl_callback_handler_reinstall(void)
void async_disable_stdin(void)
void exception_fprintf(struct ui_file *file, const struct gdb_exception &e, const char *prefix,...)
void exception_print(struct ui_file *file, const struct gdb_exception &e)
void try_open_exec_file(const char *exec_file_host, struct inferior *inf, symfile_add_flags add_flags)
void exec_on_vfork(inferior *vfork_child)
struct value * read_var_value(struct symbol *var, const struct block *var_block, frame_info_ptr frame)
const struct frame_id null_frame_id
const struct frame_id outer_frame_id
struct program_space * get_frame_program_space(frame_info_ptr frame)
void restore_selected_frame(frame_id frame_id, int frame_level) noexcept
void select_frame(frame_info_ptr fi)
CORE_ADDR frame_unwind_caller_pc(frame_info_ptr this_frame)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
void reinit_frame_cache(void)
void frame_pop(frame_info_ptr this_frame)
struct frame_id get_stack_frame_id(frame_info_ptr next_frame)
const address_space * get_frame_address_space(frame_info_ptr frame)
bool frame_id_p(frame_id l)
void save_selected_frame(frame_id *frame_id, int *frame_level) noexcept
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
enum frame_type get_frame_type(frame_info_ptr frame)
struct frame_id frame_unwind_caller_id(frame_info_ptr next_frame)
struct program_space * frame_unwind_program_space(frame_info_ptr this_frame)
frame_info_ptr get_selected_frame(const char *message)
frame_info_ptr frame_find_by_id(struct frame_id id)
frame_info_ptr get_current_frame(void)
struct frame_id get_frame_id(frame_info_ptr fi)
frame_info_ptr get_prev_frame(frame_info_ptr this_frame)
symtab_and_line find_frame_sal(frame_info_ptr frame)
struct gdbarch * frame_unwind_caller_arch(frame_info_ptr next_frame)
void set_current_sal_from_frame(frame_info_ptr)
void print_stack_frame(frame_info_ptr, int print_level, enum print_what print_what, int set_current_sal)
void gdbarch_skip_permanent_breakpoint(struct gdbarch *gdbarch, struct regcache *regcache)
int gdbarch_have_nonsteppable_watchpoint(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_adjust_breakpoint_address(struct gdbarch *gdbarch, CORE_ADDR bpaddr)
bool gdbarch_displaced_step_hw_singlestep(struct gdbarch *gdbarch)
int gdbarch_single_step_through_delay(struct gdbarch *gdbarch, frame_info_ptr frame)
bool gdbarch_adjust_breakpoint_address_p(struct gdbarch *gdbarch)
bool gdbarch_in_indirect_branch_thunk(struct gdbarch *gdbarch, CORE_ADDR pc)
bool gdbarch_program_breakpoint_here_p(struct gdbarch *gdbarch, CORE_ADDR address)
bool gdbarch_get_siginfo_type_p(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_skip_trampoline_code(struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR pc)
CORE_ADDR gdbarch_deprecated_function_start_offset(struct gdbarch *gdbarch)
void gdbarch_displaced_step_restore_all_in_ptid(struct gdbarch *gdbarch, inferior *parent_inf, ptid_t child_ptid)
bool gdbarch_single_step_through_delay_p(struct gdbarch *gdbarch)
bool gdbarch_displaced_step_prepare_p(struct gdbarch *gdbarch)
int gdbarch_get_longjmp_target(struct gdbarch *gdbarch, frame_info_ptr frame, CORE_ADDR *pc)
bool gdbarch_skip_entrypoint_p(struct gdbarch *gdbarch)
displaced_step_prepare_status gdbarch_displaced_step_prepare(struct gdbarch *gdbarch, thread_info *thread, CORE_ADDR &displaced_pc)
int gdbarch_gdb_signal_to_target(struct gdbarch *gdbarch, enum gdb_signal signal)
CORE_ADDR gdbarch_skip_entrypoint(struct gdbarch *gdbarch, CORE_ADDR ip)
void gdbarch_report_signal_info(struct gdbarch *gdbarch, struct ui_out *uiout, enum gdb_signal siggnal)
bool gdbarch_report_signal_info_p(struct gdbarch *gdbarch)
displaced_step_finish_status gdbarch_displaced_step_finish(struct gdbarch *gdbarch, thread_info *thread, const target_waitstatus &ws)
bool gdbarch_gdb_signal_to_target_p(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_skip_solib_resolver(struct gdbarch *gdbarch, CORE_ADDR pc)
int gdbarch_cannot_step_breakpoint(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_addr_bits_remove(struct gdbarch *gdbarch, CORE_ADDR addr)
CORE_ADDR gdbarch_decr_pc_after_break(struct gdbarch *gdbarch)
bool gdbarch_get_longjmp_target_p(struct gdbarch *gdbarch)
ULONGEST gdbarch_displaced_step_buffer_length(struct gdbarch *gdbarch)
bool gdbarch_software_single_step_p(struct gdbarch *gdbarch)
struct type * gdbarch_get_siginfo_type(struct gdbarch *gdbarch)
int gdbarch_in_solib_return_trampoline(struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
struct thread_info * any_live_thread_of_inferior(inferior *inf)
all_threads_safe_range all_threads_safe()
int thread_step_over_chain_length(const thread_step_over_list &l)
struct thread_info * add_thread(process_stratum_target *targ, ptid_t ptid)
void global_thread_step_over_chain_remove(thread_info *tp)
void global_thread_step_over_chain_enqueue_chain(thread_step_over_list &&list)
all_matching_threads_range all_threads(process_stratum_target *proc_target=nullptr, ptid_t filter_ptid=minus_one_ptid)
void delete_thread(thread_info *thread)
iterator_range< thread_step_over_list_safe_iterator > thread_step_over_list_safe_range
void switch_to_thread_no_regs(struct thread_info *thread)
all_non_exited_threads_range all_non_exited_threads(process_stratum_target *proc_target=nullptr, ptid_t filter_ptid=minus_one_ptid)
void validate_registers_access(void)
int show_thread_that_caused_stop(void)
bool pc_in_thread_step_range(CORE_ADDR pc, struct thread_info *thread)
static thread_step_over_list_safe_range make_thread_step_over_list_safe_range(thread_step_over_list &list)
struct thread_info * find_thread_global_id(int global_id)
void global_thread_step_over_chain_enqueue(thread_info *tp)
void update_thread_list(void)
void set_executing(process_stratum_target *targ, ptid_t ptid, bool executing)
struct thread_info * inferior_thread(void)
void switch_to_thread(struct thread_info *thr)
void set_running(process_stratum_target *targ, ptid_t ptid, bool running)
int thread_has_single_step_breakpoint_here(struct thread_info *tp, const address_space *aspace, CORE_ADDR addr)
void delete_step_resume_breakpoint(struct thread_info *)
struct thread_info * iterate_over_threads(thread_callback_func, void *)
void thread_change_ptid(process_stratum_target *targ, ptid_t old_ptid, ptid_t new_ptid)
FORWARD_SCOPE_EXIT(finish_thread_state) scoped_finish_thread_state
void set_resumed(process_stratum_target *targ, ptid_t ptid, bool resumed)
int thread_has_single_step_breakpoints_set(struct thread_info *tp)
const char * thread_name(thread_info *thread)
int thread_is_in_step_over_chain(struct thread_info *tp)
void delete_exception_resume_breakpoint(struct thread_info *)
gdb::ref_ptr< struct thread_info, refcounted_object_ref_policy > thread_info_ref
intrusive_list< thread_info, thread_step_over_list_node > thread_step_over_list
void delete_single_step_breakpoints(struct thread_info *tp)
void switch_to_no_thread()
const char * print_thread_id(struct thread_info *thr)
static struct inf * cur_inf(void)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int int rusage_t pid_t pid
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
void inferior_event_handler(enum inferior_event_type event_type)
int stopped_by_random_signal
void setup_inferior(int from_tty)
enum stop_stack_kind stop_stack_dummy
void post_create_inferior(int from_tty)
void print_return_value(struct ui_out *uiout, struct return_value_info *rv)
struct inferior * add_inferior_with_spaces(void)
struct inferior * find_inferior_ptid(process_stratum_target *targ, ptid_t ptid)
struct inferior * find_inferior_pid(process_stratum_target *targ, int pid)
void set_current_inferior(struct inferior *inf)
bool print_inferior_events
struct inferior * current_inferior(void)
struct inferior * add_inferior(int pid)
void switch_to_inferior_no_thread(inferior *inf)
void exit_inferior(struct inferior *inf)
void prune_inferiors(void)
intrusive_list< inferior > inferior_list
std::unique_ptr< infcall_control_state, infcall_control_state_deleter > infcall_control_state_up
all_inferiors_range all_inferiors(process_stratum_target *proc_target=nullptr)
@ STOP_QUIETLY_NO_SIGSTOP
std::unique_ptr< infcall_suspend_state, infcall_suspend_state_deleter > infcall_suspend_state_up
all_non_exited_inferiors_range all_non_exited_inferiors(process_stratum_target *proc_target=nullptr)
void copy_terminal_info(struct inferior *to, struct inferior *from)
void swap_terminal_info(inferior *a, inferior *b)
#define UNSET_SIGS(nsigs, sigs, flags)
static unsigned char signal_pass[GDB_SIGNAL_LAST]
int thread_is_stepping_over_breakpoint(int thread)
static bool step_over_info_valid_p(void)
static displaced_step_prepare_status displaced_step_prepare_throw(thread_info *tp)
static const struct internalvar_funcs siginfo_funcs
static void set_observer_mode(const char *args, int from_tty, struct cmd_list_element *c)
static void for_each_just_stopped_thread(for_each_just_stopped_thread_callback_func func)
static void stop_all_threads_if_all_stop_mode()
static ptid_t do_target_wait_1(inferior *inf, ptid_t ptid, target_waitstatus *status, target_wait_flags options)
static const char exec_forward[]
static void mark_non_executing_threads(process_stratum_target *target, ptid_t event_ptid, const target_waitstatus &ws)
static enum stop_kind get_inferior_stop_soon(execution_control_state *ecs)
static bool handle_syscall_event(struct execution_control_state *ecs)
static bool gdbarch_supports_displaced_stepping(gdbarch *arch)
void print_no_history_reason(struct ui_out *uiout)
static void set_exec_direction_func(const char *args, int from_tty, struct cmd_list_element *cmd)
void set_step_info(thread_info *tp, frame_info_ptr frame, struct symtab_and_line sal)
static void insert_hp_step_resume_breakpoint_at_frame(frame_info_ptr)
void update_signals_program_target(void)
static void infrun_quit_handler()
int stepping_past_instruction_at(struct address_space *aspace, CORE_ADDR address)
static process_stratum_target * target_last_proc_target
static bool observer_mode
void insert_step_resume_breakpoint_at_sal(struct gdbarch *gdbarch, struct symtab_and_line sr_sal, struct frame_id sr_id)
static void show_debug_infrun(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void maybe_call_commit_resumed_all_targets()
static void set_disable_randomization(const char *args, int from_tty, struct cmd_list_element *c)
static void adjust_pc_after_break(struct thread_info *thread, const target_waitstatus &ws)
static const struct lval_funcs siginfo_value_funcs
static void insert_step_resume_breakpoint_at_caller(frame_info_ptr)
static void show_follow_exec_mode_string(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void fill_in_stop_func(struct gdbarch *gdbarch, struct execution_control_state *ecs)
static void follow_exec(ptid_t ptid, const char *exec_file_target)
void mark_infrun_async_event_handler(void)
void print_stop_event(struct ui_out *uiout, bool displays)
static unsigned char signal_print[GDB_SIGNAL_LAST]
static bool maybe_software_singlestep(struct gdbarch *gdbarch)
static void clear_proceed_status_thread(struct thread_info *tp)
void print_signal_exited_reason(struct ui_out *uiout, enum gdb_signal siggnal)
static ptid_t target_last_wait_ptid
static void process_event_stop_test(struct execution_control_state *ecs)
static bool displaced_step_in_progress(inferior *inf)
static wait_one_event wait_one()
static int infrun_is_async
static step_over_what thread_still_needs_step_over(struct thread_info *tp)
void maybe_remove_breakpoints(void)
static bool restart_stepped_thread(process_stratum_target *resume_target, ptid_t resume_ptid)
void notify_signal_received(gdb_signal sig)
static void show_can_use_displaced_stepping(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int signal_print_state(int signo)
static displaced_step_finish_status displaced_step_finish(thread_info *event_thread, const target_waitstatus &event_status)
static const char *const follow_exec_mode_names[]
static void stop_waiting(struct execution_control_state *ecs)
infcall_suspend_state_up save_infcall_suspend_state()
static void signal_cache_update(int signo)
static void infrun_async_inferior_event_handler(gdb_client_data data)
static void proceed_resume_thread_checked(thread_info *tp)
static bool switch_back_to_stepped_thread(struct execution_control_state *ecs)
void start_remote(int from_tty)
void nullify_last_target_wait_ptid(void)
static void set_last_target_status_stopped(thread_info *tp)
static void new_stop_id(void)
static void show_stop_on_solib_events(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static unsigned char signal_program[GDB_SIGNAL_LAST]
static void end_stepping_range(struct execution_control_state *ecs)
static void show_schedule_multiple(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void check_multi_target_resumption(process_stratum_target *resume_target)
static void set_non_stop(const char *args, int from_tty, struct cmd_list_element *c)
bool step_stop_if_no_debug
static void wait_for_inferior(inferior *inf)
static void insert_longjmp_resume_breakpoint(struct gdbarch *, CORE_ADDR)
static bool stop_print_frame
static void save_waitstatus(struct thread_info *tp, const target_waitstatus &ws)
static void handle_vfork_child_exec_or_exit(int exec)
static void delete_just_stopped_threads_single_step_breakpoints(void)
static bool enable_commit_resumed
thread_info * get_previous_thread()
static void siginfo_value_write(struct value *v, struct value *fromval)
static struct async_event_handler * infrun_async_inferior_event_token
static bool currently_stepping(struct thread_info *tp)
static void insert_step_resume_breakpoint_at_sal_1(struct gdbarch *gdbarch, struct symtab_and_line sr_sal, struct frame_id sr_id, enum bptype sr_type)
infcall_control_state_up save_infcall_control_state()
static void maybe_set_commit_resumed_all_targets()
static int resumed_thread_with_pending_status(struct thread_info *tp, void *arg)
static void show_observer_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static bool schedlock_applies(struct thread_info *tp)
static void handle_command(const char *args, int from_tty)
static void do_target_resume(ptid_t resume_ptid, bool step, enum gdb_signal sig)
int signal_print_update(int signo, int state)
int signal_pass_update(int signo, int state)
static unsigned char signal_catch[GDB_SIGNAL_LAST]
static const char *const scheduler_enums[]
static bool thread_still_needs_step_over_bp(struct thread_info *tp)
static void show_step_stop_if_no_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void resume_1(enum gdb_signal sig)
static const char * follow_fork_mode_string
static ptid_t poll_one_curr_target(struct target_waitstatus *ws)
static bool handle_no_resumed(struct execution_control_state *ecs)
static enum auto_boolean can_use_displaced_stepping
void(* for_each_just_stopped_thread_callback_func)(struct thread_info *tp)
process_stratum_target * user_visible_resume_target(ptid_t resume_ptid)
static int finish_step_over(struct execution_control_state *ecs)
static void handle_vfork_done(thread_info *event_thread)
static thread_info_ref previous_thread
void notify_user_selected_context_changed(user_selected_what selection)
void restart_after_all_stop_detach(process_stratum_target *proc_target)
static void displaced_step_reset(displaced_step_thread_state *displaced)
static const char schedlock_on[]
void clear_proceed_status(int step)
static bool handle_one(const wait_one_event &event)
static bool stepped_in_from(frame_info_ptr frame, struct frame_id step_frame_id)
int signal_stop_state(int signo)
static const char *const exec_direction_names[]
int stepping_past_nonsteppable_watchpoint(void)
static bool observer_mode_1
FORWARD_SCOPE_EXIT(displaced_step_reset) displaced_step_reset_cleanup
void set_last_target_status(process_stratum_target *target, ptid_t ptid, const target_waitstatus &status)
static void infrun_thread_ptid_changed(process_stratum_target *target, ptid_t old_ptid, ptid_t new_ptid)
void clear_exit_convenience_vars(void)
static void siginfo_value_read(struct value *v)
static void delete_just_stopped_threads_infrun_breakpoints(void)
static bool keep_going_stepped_thread(struct thread_info *tp)
static void follow_inferior_reset_breakpoints(void)
static struct value * siginfo_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
static void check_exception_resume(struct execution_control_state *, frame_info_ptr)
static void print_stop_location(const target_waitstatus &ws)
static void keep_going(struct execution_control_state *ecs)
static void show_scheduler_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void insert_exception_resume_breakpoint(struct thread_info *tp, const struct block *b, frame_info_ptr frame, struct symbol *sym)
enum exec_direction_kind execution_direction
static void prepare_to_wait(struct execution_control_state *ecs)
static const char schedlock_step[]
void notify_normal_stop(bpstat *bs, int print_frame)
void discard_infcall_control_state(struct infcall_control_state *inf_status)
static void infrun_thread_stop_requested(ptid_t ptid)
void infrun_async(int enable)
void restore_infcall_control_state(struct infcall_control_state *inf_status)
static struct cmd_list_element * stop_command
static void delete_thread_infrun_breakpoints(struct thread_info *tp)
static void keep_going_pass_signal(struct execution_control_state *ecs)
void update_previous_thread()
static bool follow_fork()
static void show_exec_direction_func(struct ui_file *out, int from_tty, struct cmd_list_element *cmd, const char *value)
static void show_follow_fork_mode_string(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
thread_step_over_list global_thread_step_over_list
void prepare_for_detach(void)
void update_observer_mode(void)
bool disable_randomization
static const char * follow_exec_mode_string
static const char exec_reverse[]
void _initialize_infrun()
static bool follow_fork_inferior(bool follow_child, bool detach_fork)
DEF_ENUM_FLAGS_TYPE(enum step_over_what_flag, step_over_what)
#define SET_SIGS(nsigs, sigs, flags)
static bool use_displaced_stepping(thread_info *tp)
static const char schedlock_replay[]
int signal_pass_state(int signo)
static bool displaced_step_in_progress_any_thread()
static void show_disable_randomization(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void sig_print_header(void)
static void info_signals_command(const char *signum_exp, int from_tty)
static void context_switch(execution_control_state *ecs)
static void set_step_over_info(const address_space *aspace, CORE_ADDR address, int nonsteppable_watchpoint_p, int thread)
static thread_info * find_thread_waiting_for_vfork_done()
static displaced_step_prepare_status displaced_step_prepare(thread_info *thread)
static struct target_waitstatus target_last_waitstatus
static const char schedlock_off[]
int signal_stop_update(int signo, int state)
static bool handle_stop_requested(struct execution_control_state *ecs)
void all_uis_on_sync_execution_starting(void)
static void handle_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static unsigned char signal_stop[GDB_SIGNAL_LAST]
void init_thread_stepping_state(struct thread_info *tss)
static const char * exec_direction
static const char follow_fork_mode_parent[]
enum gdb_signal gdb_signal_from_command(int num)
void all_uis_check_sync_execution_done(void)
static void infrun_inferior_exit(struct inferior *inf)
static void resume(gdb_signal sig)
void stop_all_threads(const char *reason, inferior *inf)
static void handle_inferior_event(struct execution_control_state *ecs)
void init_wait_for_inferior(void)
static const char *const follow_fork_mode_kind_names[]
static const char follow_exec_mode_new[]
static const char * scheduler_mode
static void proceed_after_vfork_done(thread_info *thread)
static bool do_target_wait(execution_control_state *ecs, target_wait_flags options)
static void insert_exception_resume_from_probe(struct thread_info *tp, const struct bound_probe *probe, frame_info_ptr frame)
static bool displaced_step_in_progress_thread(thread_info *thread)
static void set_stop_on_solib_events(const char *args, int from_tty, struct cmd_list_element *c)
void print_exited_reason(struct ui_out *uiout, int exitstatus)
static void check_curr_ui_sync_execution_done(void)
static void clean_up_just_stopped_threads_fsms(struct execution_control_state *ecs)
void print_target_wait_results(ptid_t waiton_ptid, ptid_t result_ptid, const struct target_waitstatus &ws)
void restore_infcall_suspend_state(struct infcall_suspend_state *inf_state)
static struct thread_info * random_pending_event_thread(inferior *inf, ptid_t waiton_ptid)
static void infrun_inferior_execd(inferior *exec_inf, inferior *follow_inf)
ULONGEST get_stop_id(void)
static ULONGEST current_stop_id
static bool inline_frame_is_marked_for_skip(bool prev_frame, struct thread_info *tp)
static void reinstall_readline_callback_handler_cleanup()
static void handle_signal_stop(struct execution_control_state *ecs)
static const char follow_exec_mode_same[]
static void set_schedlock_func(const char *args, int from_tty, struct cmd_list_element *c)
void discard_infcall_suspend_state(struct infcall_suspend_state *inf_state)
static void handle_step_into_function(struct gdbarch *gdbarch, struct execution_control_state *ecs)
static void sig_print_info(enum gdb_signal)
static const char follow_fork_mode_child[]
static bool start_step_over(void)
static void restart_threads(struct thread_info *event_thread, inferior *inf=nullptr)
static void clear_step_over_info(void)
void print_signal_received_reason(struct ui_out *uiout, enum gdb_signal siggnal)
void get_last_target_status(process_stratum_target **target, ptid_t *ptid, target_waitstatus *status)
void proceed(CORE_ADDR addr, enum gdb_signal siggnal)
void signal_catch_update(const unsigned int *info)
void fetch_inferior_event()
static void show_non_stop(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
ptid_t user_visible_resume_ptid(int step)
static ptid_t internal_resume_ptid(int user_step)
static void handle_step_into_function_backward(struct gdbarch *gdbarch, struct execution_control_state *ecs)
readonly_detached_regcache * get_infcall_suspend_state_regcache(struct infcall_suspend_state *inf_state)
static void notify_about_to_proceed()
void maybe_call_commit_resumed_all_targets()
#define INFRUN_SCOPED_DEBUG_ENTER_EXIT
#define infrun_debug_printf(fmt,...)
static void infrun_debug_show_threads(const char *title, ThreadRange threads)
#define INFRUN_SCOPED_DEBUG_START_END(fmt,...)
void clear_inline_frame_state(process_stratum_target *target, ptid_t filter_ptid)
int inline_skipped_frames(thread_info *thread)
void step_into_inline_frame(thread_info *thread)
void skip_inline_frames(thread_info *thread, bpstat *stop_chain)
void interps_notify_no_history()
struct interp * top_level_interpreter(void)
void interps_notify_signal_received(gdb_signal sig)
void interps_notify_normal_stop(bpstat *bs, int print_frame)
void interps_notify_signal_exited(gdb_signal sig)
void interps_notify_user_selected_context_changed(user_selected_what selection)
void interps_notify_exited(int status)
CORE_ADDR skip_language_trampoline(const frame_info_ptr &frame, CORE_ADDR pc)
static const char * range
int return_child_result_value
const char * async_reason_lookup(enum async_reply_reason reason)
@ EXEC_ASYNC_SIGNAL_RECEIVED
@ EXEC_ASYNC_EXITED_NORMALLY
@ EXEC_ASYNC_EXITED_SIGNALLED
observable< ptid_t > thread_stop_requested
observable< struct inferior * > inferior_exit
observable< inferior *, inferior * > inferior_execd
observable< inferior *, inferior *, target_waitkind > inferior_forked
observable< user_selected_what > user_selected_context_changed
observable< process_stratum_target *, ptid_t, ptid_t > thread_ptid_changed
observable about_to_proceed
observable< struct bpstat *, int > normal_stop
observable< enum gdb_signal > signal_received
struct value * probe_safe_evaluate_at_pc(frame_info_ptr frame, unsigned n)
struct bound_probe find_probe_by_pc(CORE_ADDR pc)
std::set< process_stratum_target * > all_non_exited_process_targets()
void switch_to_target_no_thread(process_stratum_target *target)
struct program_space * current_program_space
void set_current_program_space(struct program_space *pspace)
struct program_space * clone_program_space(struct program_space *dest, struct program_space *src)
struct address_space * maybe_new_address_space(void)
int record_full_is_used(void)
scoped_restore_tmpl< int > record_full_gdb_operation_disable_set(void)
struct target_ops * find_record_target(void)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
struct regcache * get_thread_arch_aspace_regcache(inferior *inf_for_target_calls, ptid_t ptid, gdbarch *arch, struct address_space *aspace)
CORE_ADDR regcache_read_pc_protected(regcache *regcache)
void regcache_write_pc(struct regcache *regcache, CORE_ADDR pc)
struct regcache * get_current_regcache(void)
struct regcache * get_thread_regcache(process_stratum_target *target, ptid_t ptid)
void(* func)(remote_target *remote, char *)
bool function_name_is_marked_for_skip(const char *function_name, const symtab_and_line &function_sal)
gdb::unique_xmalloc_ptr< char > exec_file_find(const char *in_pathname, int *fd)
void no_shared_libraries(const char *ignored, int from_tty)
bool in_solib_dynsym_resolve_code(CORE_ADDR pc)
void update_solib_breakpoints(void)
void handle_solib_event(void)
static void print_frame(const frame_print_options &opts, frame_info_ptr frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal)
const struct block * block
CORE_ADDR entry_pc() const
enum stop_stack_kind call_dummy
enum bpstat_what_main_action main_action
bp_location & first_loc()
enum language language() const
unsigned int in_progress_count
gdbarch * get_original_gdbarch() const
void set(gdbarch *original_gdbarch)
const char * stop_func_name
process_stratum_target * target
struct thread_info * event_thread
CORE_ADDR stop_func_alt_start
execution_control_state(thread_info *thr=nullptr)
CORE_ADDR stop_func_start
int hit_singlestep_breakpoint
struct target_waitstatus ws
const char * print_name() const
const char * search_name() const
struct thread_control_state thread_control
int stopped_by_random_signal
enum stop_stack_kind stop_stack_dummy
struct inferior_control_state inferior_control
int breakpoints_not_allowed
bool m_prev_enable_commit_resumed
~scoped_disable_commit_resumed()
scoped_disable_commit_resumed(const char *reason)
scoped_enable_commit_resumed(const char *reason)
bool m_prev_enable_commit_resumed
~scoped_enable_commit_resumed()
const address_space * aspace
int nonsteppable_watchpoint_p
DISABLE_COPY_AND_ASSIGN(stop_context)
const block * value_block() const
struct obj_section * section
struct program_space * pspace
virtual int async_wait_fd() TARGET_DEFAULT_NORETURN(noprocess())
const char * shortname() const
virtual bool is_async_p() TARGET_DEFAULT_RETURN(false)
target_waitstatus & set_spurious()
target_waitstatus & set_no_resumed()
target_waitstatus & set_stopped(gdb_signal sig)
target_waitstatus & set_ignore()
target_waitkind kind() const
std::string to_string() const
CORE_ADDR step_range_start
enum step_over_calls_kind step_over_calls
struct symbol * step_start_function
struct breakpoint * exception_resume_breakpoint
struct breakpoint * step_resume_breakpoint
struct breakpoint * single_step_breakpoints
virtual struct return_value_info * return_value()
virtual void clean_up(struct thread_info *thread)
virtual bool should_stop(struct thread_info *thread)=0
virtual bool should_notify_stop()
enum prompt_state prompt_state
void register_file_handler()
static struct value * allocate_computed(struct type *type, const struct lval_funcs *funcs, void *closure)
static struct value * allocate(struct type *type)
struct type * type() const
gdb::array_view< gdb_byte > contents_all_raw()
process_stratum_target * target
struct obj_section * find_pc_overlay(CORE_ADDR pc)
int overlay_cache_invalid
struct compunit_symtab * find_pc_compunit_symtab(CORE_ADDR pc)
struct block_symbol lookup_symbol_search_name(const char *search_name, const struct block *block, domain_enum domain)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
std::string make_target_connection_string(process_stratum_target *t)
void target_dcache_invalidate(void)
void target_find_description(void)
void target_clear_description(void)
bool target_have_steppable_watchpoint()
ptid_t target_wait(ptid_t ptid, struct target_waitstatus *status, target_wait_flags options)
bool target_has_pending_events()
exec_direction_kind target_execution_direction()
void target_async(bool enable)
bool target_supports_stopped_by_hw_breakpoint()
bool target_can_execute_reverse()
int target_record_is_replaying(ptid_t ptid)
void target_detach(inferior *inf, int from_tty)
bool target_can_async_p()
void target_pass_signals(gdb::array_view< const unsigned char > pass_signals)
bool target_can_lock_scheduler()
void target_program_signals(gdb::array_view< const unsigned char > program_signals)
void target_record_stop_replaying(void)
bool target_stopped_by_hw_breakpoint()
void target_follow_fork(inferior *child_inf, ptid_t child_ptid, target_waitkind fork_kind, bool follow_child, bool detach_fork)
void target_commit_resumed()
bool target_has_execution(inferior *inf)
int target_record_will_replay(ptid_t ptid, int dir)
bool target_supports_stopped_by_sw_breakpoint()
int target_supports_multi_process(void)
void target_thread_events(int enable)
void target_stop(ptid_t ptid)
LONGEST target_read(struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *buf, ULONGEST offset, LONGEST len)
bool target_is_non_stop_p()
bool exists_non_stop_target()
std::string target_pid_to_str(ptid_t ptid)
void target_resume(ptid_t scope_ptid, int step, enum gdb_signal signal)
bool target_stopped_by_watchpoint()
LONGEST target_write(struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len)
bool target_stopped_by_sw_breakpoint()
void target_pass_ctrlc(void)
const char * target_shortname()
void target_follow_exec(inferior *follow_inf, ptid_t ptid, const char *execd_pathname)
void target_mourn_inferior(ptid_t ptid)
int target_thread_alive(ptid_t ptid)
int target_supports_disable_randomization(void)
void update_target_permissions(void)
#define target_stopped_data_address(target, addr_p)
bool may_insert_fast_tracepoints
@ TARGET_OBJECT_SIGNAL_INFO
bool may_insert_tracepoints
bool may_insert_breakpoints
int gdb_in_secondary_prompt_p(struct ui *ui)
void set_current_traceframe(int num)
static string_field_s * string_field(const char *name, const char *str, string_field_s &&tmp={})
#define SWITCH_THRU_ALL_UIS()
static ui_range all_uis()
int query(const char *ctlstr,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_flush(struct ui_file *stream)
void gdb_puts(const char *linebuffer, struct ui_file *stream)
void clear_internalvar(struct internalvar *var)
CORE_ADDR value_as_address(struct value *val)
struct internalvar * create_internalvar_type_lazy(const char *name, const struct internalvar_funcs *funcs, void *data)
struct internalvar * lookup_internalvar(const char *name)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
@ TARGET_WAITKIND_NO_RESUMED
@ TARGET_WAITKIND_THREAD_EXITED
@ TARGET_WAITKIND_SPURIOUS
@ TARGET_WAITKIND_VFORK_DONE
@ TARGET_WAITKIND_THREAD_CREATED
@ TARGET_WAITKIND_SIGNALLED
@ TARGET_WAITKIND_STOPPED
@ TARGET_WAITKIND_SYSCALL_RETURN
@ TARGET_WAITKIND_SYSCALL_ENTRY
@ TARGET_WAITKIND_NO_HISTORY
@ TARGET_WAITKIND_VFORKED
@ TARGET_STOPPED_BY_SW_BREAKPOINT
@ TARGET_STOPPED_BY_SINGLE_STEP
@ TARGET_STOPPED_BY_WATCHPOINT
@ TARGET_STOPPED_BY_HW_BREAKPOINT
@ TARGET_STOPPED_BY_NO_REASON