60#include "gdbsupport/event-loop.h"
62#include "gdbsupport/enum-flags.h"
64#include "gdbsupport/gdb_optional.h"
66#include "gdbsupport/scope-exit.h"
67#include "gdbsupport/forward-scope-exit.h"
68#include "gdbsupport/gdb_select.h"
69#include <unordered_map>
71#include "gdbsupport/selftest.h"
74#include "gdbsupport/common-debug.h"
75#include "gdbsupport/buildargv.h"
95static void resume (gdb_signal sig);
182 _(
"Disabling randomization of debuggee's "
183 "virtual address space is %s.\n"),
186 gdb_puts (_(
"Disabling randomization of debuggee's "
187 "virtual address space is unsupported on\n"
188 "this platform.\n"), file);
196 error (_(
"Disabling randomization of debuggee's "
197 "virtual address space is unsupported on\n"
213 error (_(
"Cannot change this setting while the inferior is running."));
224 _(
"Controlling the inferior in non-stop mode is %s.\n"),
242 error (_(
"Cannot change this setting while the inferior is running."));
296 (newval ?
"on" :
"off"));
317#define SET_SIGS(nsigs,sigs,flags) \
319 int signum = (nsigs); \
320 while (signum-- > 0) \
321 if ((sigs)[signum]) \
322 (flags)[signum] = 1; \
325#define UNSET_SIGS(nsigs,sigs,flags) \
327 int signum = (nsigs); \
328 while (signum-- > 0) \
329 if ((sigs)[signum]) \
330 (flags)[signum] = 0; \
344#define RESUME_ALL minus_one_ptid
368 gdb_printf (file, _(
"Stopping for shared library events is %s.\n"),
400 _(
"Debugger response to a program "
401 "call of fork or vfork is \"%s\".\n"),
433Can not resume the parent process over vfork in the foreground while\n\
434holding the child stopped. Try \"set detach-on-fork\" or \
435\"set schedule-multiple\".\n"));
465 ptid_t process_ptid = ptid_t (
child_ptid.pid ());
468 gdb_printf (_(
"[Detaching after %s from child %s]\n"),
469 has_vforked ?
"vfork" :
"fork",
535 gdb_printf (_(
"[Attaching after %s %s to child %s]\n"),
537 has_vforked ?
"vfork" :
"fork",
612 if (child_inf !=
nullptr)
629 gdb_assert (parent_thread !=
nullptr);
659 ptid_t process_ptid = ptid_t (parent_ptid.pid ());
673 if (child_inf !=
nullptr)
677 gdb::optional<scoped_restore_current_thread> maybe_restore;
680 maybe_restore.emplace ();
697 bool should_resume =
true;
703 struct breakpoint *step_resume_breakpoint =
nullptr;
704 struct breakpoint *exception_resume_breakpoint =
nullptr;
705 CORE_ADDR step_range_start = 0;
706 CORE_ADDR step_range_end = 0;
707 int current_line = 0;
708 symtab *current_symtab =
nullptr;
709 struct frame_id step_frame_id = { 0 };
728 if (wait_ptid != minus_one_ptid
738 should_resume =
false;
751 ptid_t parent, child;
752 std::unique_ptr<struct thread_fsm>
thread_fsm;
756 if (follow_child && should_resume)
765 exception_resume_breakpoint
818 = step_resume_breakpoint;
825 = exception_resume_breakpoint;
836 warning (_(
"Not resuming: switched threads "
837 "before following fork child."));
850 internal_error (
"Unexpected pending_follow.kind %d\n",
855 return should_resume;
910 thread->
ptid.to_string ().c_str ());
914 proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
926 if (
inf->vfork_parent)
933 inf->vfork_parent->vfork_child =
nullptr;
934 inf->vfork_parent =
nullptr;
965 pspace =
inf->pspace;
966 aspace =
inf->aspace;
967 inf->aspace =
nullptr;
968 inf->pspace =
nullptr;
980 "after child exec]\n"), pidstr.c_str ());
985 "after child exit]\n"), pidstr.c_str ());
992 inf->pspace = pspace;
993 inf->aspace = aspace;
1000 inf->aspace =
inf->pspace->aspace;
1001 inf->removable =
true;
1004 resume_parent = vfork_parent;
1024 inf->aspace =
inf->pspace->aspace;
1026 inf->removable =
true;
1030 resume_parent = vfork_parent;
1035 if (
non_stop && resume_parent !=
nullptr)
1042 resume_parent->
pid);
1123 int pid = ptid.pid ();
1124 ptid_t process_ptid;
1173 if (th->ptid.pid () ==
pid && th->ptid != ptid)
1195 process_ptid = ptid_t (
pid);
1196 gdb_printf (_(
"%s is executing new program: %s\n"),
1205 gdb::unique_xmalloc_ptr<char> exec_file_host
1212 if (exec_file_host ==
nullptr)
1213 warning (_(
"Could not load symbols for executable %s.\n"
1214 "Do you need \"set sysroot\"?"),
1519 gdb_assert (
thread !=
nullptr);
1521 return thread->displaced_step_state.in_progress ();
1529 return inf->displaced_step_state.in_progress_count > 0;
1549 inf->displaced_step_state.reset ();
1550 inf->thread_waiting_for_vfork_done =
nullptr;
1560 inf->displaced_step_state.reset ();
1563 thread->displaced_step_state.reset ();
1570 inf->thread_waiting_for_vfork_done =
nullptr;
1589 _(
"Debugger's willingness to use displaced stepping "
1590 "to step over breakpoints is %s (currently %s).\n"),
1594 _(
"Debugger's willingness to use displaced stepping "
1595 "to step over breakpoints is %s.\n"),
value);
1649 displaced->
reset ();
1664 for (
size_t i = 0; i < len; i++)
1667 ret += string_printf (
"%02x", buf[i]);
1669 ret += string_printf (
" %02x", buf[i]);
1716 gdb_assert (!disp_step_thread_state.
in_progress ());
1724 tp->
ptid.to_string ().c_str ());
1731 tp->
ptid.to_string ().c_str ());
1738 CORE_ADDR displaced_pc;
1746 tp->
ptid.to_string ().c_str ());
1756 "deferring step of %s",
1757 tp->
ptid.to_string ().c_str ());
1773 "original_pc=%s, displaced_pc=%s",
1774 tp->
ptid.to_string ().c_str (),
1794 catch (
const gdb_exception_error &ex)
1796 if (ex.error != MEMORY_ERROR
1797 && ex.error != NOT_SUPPORTED_ERROR)
1807 warning (_(
"disabling displaced stepping: %s"),
1850 event_thread, signal);
1858 :
ptid (thr == nullptr ? null_ptid : thr->
ptid),
1911 bool started =
false;
1918 if (threads_to_step.empty ())
1926 (std::move (threads_to_step));
1935 step_over_what step_what;
1936 int must_be_in_line;
1938 gdb_assert (!tp->stop_requested);
1940 if (tp->inf->displaced_step_state.unavailable)
1948 if (tp->inf->thread_waiting_for_vfork_done !=
nullptr)
1964 threads_to_step.erase (threads_to_step.iterator_to (*tp));
1980 if (tp->control.trap_expected
1982 || tp->executing ())
1984 internal_error (
"[%s] has inconsistent state: "
1985 "trap_expected=%d, resumed=%d, executing=%d\n",
1986 tp->ptid.to_string ().c_str (),
1987 tp->control.trap_expected,
1993 tp->ptid.to_string ().c_str ());
2009 error (_(
"Command aborted."));
2016 tp->ptid.to_string ().c_str ());
2022 tp->ptid.to_string ().c_str ());
2029 gdb_assert (tp->control.trap_expected);
2038 gdb_assert (tp->control.trap_expected
2039 || tp->step_after_step_resume_breakpoint);
2061 ptid_t old_ptid, ptid_t new_ptid)
2087 _(
"Mode for locking scheduler "
2088 "during execution is \"%s\".\n"),
2098 error (_(
"Target '%s' cannot support this command."),
2116 bool hw_step =
true;
2172 return (resume_ptid == minus_one_ptid &&
sched_multi
2220 if (
inf->thread_waiting_for_vfork_done !=
nullptr)
2221 return inf->thread_waiting_for_vfork_done->ptid;
2272 resume_ptid.to_string ().c_str (),
2273 step, gdb_signal_to_symbol_string (sig));
2306 (
"thread %s has pending wait "
2307 "status %s (currently_stepping=%d).",
2308 tp->
ptid.to_string ().c_str (),
2318 if (sig != GDB_SIGNAL_0)
2320 warning (_(
"Couldn't deliver signal %s to %s."),
2321 gdb_signal_to_name (sig),
2322 tp->
ptid.to_string ().c_str ());
2361 "current thread [%s] at %s",
2362 step, gdb_signal_to_symbol_string (sig),
2373 if (sig != GDB_SIGNAL_0)
2390 "deliver signal first");
2460 && sig == GDB_SIGNAL_0
2496 gdb_assert_not_reached (
"Invalid displaced_step_prepare_status "
2529 && sig != GDB_SIGNAL_0
2605 tp->
ptid.to_string ().c_str ());
2622 struct gdbarch *resume_gdbarch = resume_regcache->
arch ();
2628 paddress (resume_gdbarch, actual_pc),
2630 (buf,
sizeof (buf)).c_str ());
2658 catch (
const gdb_exception &ex)
2717 tp->
ptid.to_string ().c_str ());
2725 (
"thread %s has pending wait status %s (currently_stepping=%d).",
2726 tp->
ptid.to_string ().c_str (),
2830static step_over_what
2833 step_over_what what = 0;
2884 "%s, no resumed threads",
2896 " thread has a pending waitstatus",
2906 "target has pending events",
2949 (
const char *reason)
2950 : m_reason (reason),
3029 (
const char *reason)
3030 : m_reason (reason),
3080 if (!
non_stop && resume_target ==
nullptr)
3090 inferior *first_not_non_stop =
nullptr;
3103 first_not_non_stop =
inf;
3105 if (first_connection ==
nullptr)
3106 first_connection = proc_target;
3107 else if (first_connection != proc_target
3108 && first_not_non_stop !=
nullptr)
3114 error (_(
"Connection %d (%s) does not support "
3115 "multi-target resumption."),
3175 if (addr == (CORE_ADDR) -1)
3202 if (siggnal != GDB_SIGNAL_DEFAULT)
3220 gdb_signal_to_symbol_string (siggnal));
3265 tp->ptid.to_string ().c_str ());
3303 (
"resuming threads, all-stop-on-top-of-non-stop");
3312 if (!tp->inf->has_execution ())
3315 tp->ptid.to_string ().c_str ());
3322 tp->ptid.to_string ().c_str ());
3323 gdb_assert (tp->executing () || tp->has_pending_waitstatus ());
3330 tp->ptid.to_string ().c_str ());
3338 if (tp->inf->thread_waiting_for_vfork_done !=
nullptr
3339 && tp != tp->inf->thread_waiting_for_vfork_done)
3342 "waiting for vfork-done",
3343 tp->ptid.to_string ().c_str ());
3348 tp->ptid.to_string ().c_str ());
3354 error (_(
"Command aborted."));
3370 error (_(
"Command aborted."));
3376 finish_state.release ();
3474 if (tp->executing ())
3487 if (!tp->has_pending_waitstatus ())
3491 tp->set_pending_waitstatus (ws);
3508 tp->set_resumed (
true);
3582 waiton_ptid.to_string ().c_str (),
3585 result_ptid.to_string ().c_str (),
3600 if (thread ==
nullptr)
3607 gdb_assert (thread->
resumed ());
3632 if (ptid == minus_one_ptid || ptid.is_pid ())
3639 ptid.to_string ().c_str ());
3643 gdb_assert (tp !=
nullptr);
3662 tp->
ptid.to_string ().c_str (),
3670 tp->
ptid.to_string ().c_str (),
3679 tp->
ptid.to_string ().c_str ());
3693 tp->
ptid.to_string ().c_str ());
3734 options &= ~TARGET_WNOHANG;
3746 int num_inferiors = 0;
3747 int random_selector;
3756 return inf->process_target () !=
nullptr;
3761 if (inferior_matches (
inf))
3764 if (num_inferiors == 0)
3771 random_selector = (int)
3772 ((num_inferiors * (
double) rand ()) / (RAND_MAX + 1.0));
3774 if (num_inferiors > 1)
3776 num_inferiors, random_selector);
3783 if (inferior_matches (
inf))
3784 if (random_selector-- == 0)
3805 intrusive_list_iterator<inferior> start
3808 for (intrusive_list_iterator<inferior> it = start;
3814 if (inferior_matches (
inf) && do_wait (
inf))
3818 for (intrusive_list_iterator<inferior> it =
inferior_list.begin ();
3824 if (inferior_matches (
inf) && do_wait (
inf))
3857 ptid_t pid_ptid = ptid_t (
inf->
pid);
3860 scoped_restore restore_detaching = make_scoped_restore (&
inf->detaching,
true);
3871 tp->ptid.to_string ().c_str ());
3912 if (thr->displaced_step_state.in_progress ())
3914 if (thr->executing ())
3916 if (!thr->stop_requested)
3919 thr->stop_requested =
true;
3923 thr->set_resumed (
false);
3973 (
inf->process_target (), minus_one_ptid);
4003 finish_state.release ();
4056 if (thr->thread_fsm () ==
nullptr)
4062 thr->thread_fsm ()->clean_up (thr);
4133 scoped_restore save_pagination
4144 gdb::optional<scoped_restore_current_traceframe> maybe_restore_traceframe;
4147 maybe_restore_traceframe.emplace ();
4164 scoped_restore save_exec_dir
4196 auto defer_bpstat_clear
4198 auto defer_delete_threads
4207 bool should_stop =
true;
4212 if (thr !=
nullptr && thr->
thread_fsm () !=
nullptr)
4221 bool should_notify_stop =
true;
4228 if (thr !=
nullptr && thr->
thread_fsm () !=
nullptr)
4232 if (should_notify_stop)
4260 defer_delete_threads.release ();
4261 defer_bpstat_clear.release ();
4264 finish_state.release ();
4313 (
"symtab = %s, line = %d, step_frame_id = %s, step_stack_frame_id = %s",
4348 if (target !=
nullptr)
4350 if (ptid !=
nullptr)
4377 ecs->
ptid.to_string ().c_str ());
4394 CORE_ADDR breakpoint_pc, decr_pc;
4420 if (ws.
sig () != GDB_SIGNAL_TRAP)
4499 gdb::optional<scoped_restore_tmpl<int>> restore_operation_disable;
4502 restore_operation_disable.emplace
4525 && thread->
prev_pc == breakpoint_pc))
4563 const char *fn =
nullptr;
4676 if (
block !=
nullptr
4700 gdb_assert (
inf !=
nullptr);
4701 return inf->control.stop_soon;
4738 if (target ==
nullptr
4769 if (target ==
nullptr
4775 FD_SET (fd, &readfds);
4785 return {
nullptr, minus_one_ptid, std::move (ws)};
4808 tp->
ptid.to_string ().c_str ());
4814 && ws.
sig () == GDB_SIGNAL_TRAP)
4857 mark_ptid = minus_one_ptid;
4875 mark_ptid = ptid_t (event_ptid.pid ());
4878 mark_ptid = event_ptid;
4899 event.
ptid.to_string ().c_str ());
4916 if (event.
ptid.is_pid ())
4918 int pid =
event.ptid.pid ();
4932 gdb_assert (t !=
nullptr);
4935 (
"using %s", t->
ptid.to_string ().c_str ());
4978 && event.
ws.
sig () == GDB_SIGNAL_0)
4988 (
"displaced-step of %s canceled",
4989 t->
ptid.to_string ().c_str ());
4998 enum gdb_signal sig;
5002 (
"target_wait %s, saving status for %s",
5004 t->
ptid.to_string ().c_str ());
5010 ?
event.ws.sig () : GDB_SIGNAL_0);
5025 "(currently_stepping=%d)",
5027 t->
ptid.to_string ().c_str (),
5047 inf !=
nullptr ?
inf->num : -1);
5057 if (
inf !=
nullptr &&
inf->process_target () !=
target)
5069 if (
inf !=
nullptr &&
inf->process_target () !=
target)
5079 debug_prefixed_printf (
"infrun",
"stop_all_threads",
"done");
5087 for (pass = 0; pass < 2; pass++, iterations++)
5092 int waits_needed = 0;
5096 if (
inf !=
nullptr &&
inf->process_target () !=
target)
5107 if (
inf !=
nullptr && t->inf !=
inf)
5121 if (t->executing ())
5125 if (!t->stop_requested)
5128 t->ptid.to_string ().c_str ());
5130 t->stop_requested = 1;
5135 t->ptid.to_string ().c_str ());
5138 if (t->stop_requested)
5144 t->ptid.to_string ().c_str ());
5148 t->set_resumed (
false);
5152 if (waits_needed == 0)
5161 for (
int i = 0; i < waits_needed; i++)
5178 bool any_sync =
false;
5252 bool swap_terminal =
true;
5256 bool ignore_event =
false;
5260 if (swap_terminal && thread->executing ())
5262 if (thread->inf != curr_inf)
5269 swap_terminal =
false;
5272 if (!ignore_event && thread->resumed ())
5279 "(ignoring: found resumed)");
5281 ignore_event =
true;
5284 if (ignore_event && !swap_terminal)
5394 && (ecs->
ws.
sig () == GDB_SIGNAL_ILL
5395 || ecs->
ws.
sig () == GDB_SIGNAL_SEGV
5396 || ecs->
ws.
sig () == GDB_SIGNAL_EMT))
5487 internal_error (_(
"unhandled stop_soon: %d"), (
int) stop_soon);
5607 CORE_ADDR parent_pc;
5870 event_thread->
ptid.to_string ().c_str (),
5871 inf !=
nullptr ?
inf->num : -1);
5880 if (
inf !=
nullptr && tp->inf !=
inf)
5883 if (tp->inf->detaching)
5886 tp->ptid.to_string ().c_str ());
5892 if (tp == event_thread)
5895 tp->ptid.to_string ().c_str ());
5902 tp->ptid.to_string ().c_str ());
5909 tp->ptid.to_string ().c_str ());
5910 gdb_assert (tp->executing () || tp->has_pending_waitstatus ());
5917 tp->ptid.to_string ().c_str ());
5918 gdb_assert (!tp->resumed ());
5923 if (tp->has_pending_waitstatus ())
5926 tp->ptid.to_string ().c_str ());
5927 tp->set_resumed (
true);
5931 gdb_assert (!tp->stop_requested);
5938 internal_error (
"thread [%s] needs a step-over, but not in "
5939 "step-over queue\n",
5940 tp->ptid.to_string ().c_str ());
5946 tp->ptid.to_string ().c_str ());
5952 tp->ptid.to_string ().c_str ());
5983 if (had_step_over_info)
6042 "pending events, saving status");
6059 "(currently_stepping=%d)",
6061 tp->
ptid.to_string ().c_str (),
6087 int stopped_by_watchpoint;
6205 ecs->
ptid.to_string ().c_str ());
6212 ecs->
ptid.to_string ().c_str ());
6220 stopped_by_watchpoint = 0;
6226 if (stopped_by_watchpoint
6268 bpstat *stop_chain =
nullptr;
6324 int step_through_delay
6327 if (step_through_delay)
6331 && step_through_delay)
6339 else if (step_through_delay)
6373 && stopped_by_watchpoint)
6420 gdb::optional<scoped_restore_tmpl<int>>
6421 restore_operation_disable;
6424 restore_operation_disable.emplace
6462 random_signal = !stopped_by_watchpoint;
6481 gdb_signal_to_symbol_string (stop_signal));
6598 CORE_ADDR jmp_buf_pc;
6636 struct value *arg_value;
6649 frame, &jmp_buf_pc))
6652 "(!gdbarch_get_longjmp_target)");
6824 if (sr_bp !=
nullptr
6887 (
"stepping inside range [%s-%s]",
6932 CORE_ADDR pc_after_resolver =
6937 if (pc_after_resolver)
6942 sr_sal.
pc = pc_after_resolver;
6990 CORE_ADDR real_stop_pc
7000 sr_sal.
pc = real_stop_pc;
7044 CORE_ADDR real_stop_pc;
7118 if (real_stop_pc == 0)
7120 if (real_stop_pc != 0)
7146 if (tmp_sal.
line != 0
7241 && stop_pc_sal.
line == 0)
7281 if (stop_pc_sal.
line == 0)
7360 bool refresh_step_info =
true;
7386 refresh_step_info =
false;
7388 "it's not the start of a statement");
7399 stop_pc_sal.
line = 0;
7401 "it's not the start of a statement");
7423 (
"updated step range, start = %s, end = %s, may_range_step = %d",
7427 if (refresh_step_info)
7435 ptid_t resume_ptid);
7464 (
"need to finish step-over of [%s]",
7475 ecs->
ptid.to_string ().c_str ());
7486 (
"thread [%s] still needs step-over",
7540 if (tp->has_pending_waitstatus ())
7546 && (tp->inf->process_target () != resume_target
7547 || tp->inf->pid != resume_ptid.pid ()))
7550 if (tp->control.trap_expected)
7564 if (tp->has_pending_waitstatus ())
7570 && (tp->inf->process_target () != resume_target
7571 || tp->inf->pid != resume_ptid.pid ()))
7575 if (tp->control.step_range_end)
7610 if (thr->executing ())
7615 if (thr->resumed () && thr->has_pending_waitstatus ())
7768 if (stop_func_sal.
end
7872 gdb_assert (
inferior_thread ()->control.step_resume_breakpoint ==
nullptr);
7902 gdb_assert (return_frame !=
nullptr);
7960 gdb_assert (
inferior_thread ()->control.exception_resume_breakpoint ==
nullptr);
7977 const struct block *b,
7997 (
unsigned long) handler);
8010 catch (
const gdb_exception_error &e)
8024 struct value *arg_value;
8071 const struct block *b;
8090 b =
func->value_block ();
8106 catch (
const gdb_exception_error &e)
8138 "resuming to collect trap",
8139 tp->
ptid.to_string ().c_str ());
8158 "step-over for %s deferred",
8159 tp->
ptid.to_string ().c_str ());
8164 tp->
ptid.to_string ().c_str ());
8171 step_over_what step_what;
8208 else if (remove_wps)
8224 catch (
const gdb_exception_error &e)
8315 uiout->
text (
"\nProgram terminated with signal ");
8318 gdb_signal_to_name (siggnal));
8323 gdb_signal_to_string (siggnal));
8325 uiout->
text (
".\n");
8326 uiout->
text (
"The program no longer exists.\n");
8340 std::string exit_code_str
8341 = string_printf (
"0%o", (
unsigned int) exitstatus);
8342 uiout->
message (
"[Inferior %s (%s) exited with code %pF]\n",
8343 plongest (
inf->num), pidstr.c_str (),
8351 uiout->
message (
"[Inferior %s (%s) exited normally]\n",
8352 plongest (
inf->num), pidstr.c_str ());
8367 uiout->
text (
"\nThread ");
8371 if (
name !=
nullptr)
8373 uiout->
text (
" \"");
8379 uiout->
text (
"\nProgram");
8381 if (siggnal == GDB_SIGNAL_0 && !uiout->
is_mi_like_p ())
8382 uiout->
text (
" stopped");
8385 uiout->
text (
" received signal ");
8390 uiout->
field_string (
"signal-name", gdb_signal_to_name (siggnal));
8394 uiout->
field_string (
"signal-meaning", gdb_signal_to_string (siggnal));
8403 uiout->
text (
".\n");
8409 uiout->
text (
"\nNo more reverse-execution history.\n");
8422 int do_frame_printing = 1;
8457 do_frame_printing = 0;
8460 internal_error (_(
"Unknown value."));
8468 if (do_frame_printing)
8483 scoped_restore save_uiout = make_scoped_restore (&
current_uiout, uiout);
8514 gdb_printf (_(
"Cannot remove breakpoints because "
8515 "program is no longer writable.\nFurther "
8516 "execution is probably impossible.\n"));
8596 ptid_t finish_ptid = null_ptid;
8599 finish_ptid = minus_one_ptid;
8614 gdb::optional<scoped_finish_thread_state> maybe_finish_thread_state;
8615 if (finish_ptid != null_ptid)
8617 maybe_finish_thread_state.emplace
8673 gdb_printf (_(
"No unwaited-for children left.\n"));
8692 maybe_finish_thread_state.reset ();
8730 catch (
const gdb_exception &ex)
8733 "Error while running hook_stop:\n");
8790 for (signo = 0; signo < (int) GDB_SIGNAL_LAST; signo++)
8840 for (i = 0; i < GDB_SIGNAL_LAST; ++i)
8850 "to program\tDescription\n"));
8856 const char *
name = gdb_signal_to_name (oursig);
8857 int name_padding = 13 - strlen (
name);
8859 if (name_padding <= 0)
8863 gdb_printf (
"%*.*s ", name_padding, name_padding,
" ");
8867 gdb_printf (
"%s\n", gdb_signal_to_string (oursig));
8875 int digits, wordlen;
8876 int sigfirst, siglast;
8877 enum gdb_signal oursig;
8880 if (args ==
nullptr)
8887 const size_t nsigs = GDB_SIGNAL_LAST;
8888 unsigned char sigs[nsigs] {};
8892 gdb_argv built_argv (args);
8899 for (
char *arg : built_argv)
8901 wordlen = strlen (arg);
8902 for (digits = 0; isdigit (arg[digits]); digits++)
8906 sigfirst = siglast = -1;
8908 if (wordlen >= 1 && !strncmp (arg,
"all", wordlen))
8914 siglast = nsigs - 1;
8916 else if (wordlen >= 1 && !strncmp (arg,
"stop", wordlen))
8921 else if (wordlen >= 1 && !strncmp (arg,
"ignore", wordlen))
8925 else if (wordlen >= 2 && !strncmp (arg,
"print", wordlen))
8929 else if (wordlen >= 2 && !strncmp (arg,
"pass", wordlen))
8933 else if (wordlen >= 3 && !strncmp (arg,
"nostop", wordlen))
8937 else if (wordlen >= 3 && !strncmp (arg,
"noignore", wordlen))
8941 else if (wordlen >= 4 && !strncmp (arg,
"noprint", wordlen))
8946 else if (wordlen >= 4 && !strncmp (arg,
"nopass", wordlen))
8950 else if (digits > 0)
8958 sigfirst = siglast = (int)
8960 if (arg[digits] ==
'-')
8965 if (sigfirst > siglast)
8968 std::swap (sigfirst, siglast);
8973 oursig = gdb_signal_from_name (arg);
8974 if (oursig != GDB_SIGNAL_UNKNOWN)
8976 sigfirst = siglast = (int) oursig;
8981 error (_(
"Unrecognized or ambiguous flag word: \"%s\"."), arg);
8988 for (
int signum = sigfirst; signum >= 0 && signum <= siglast; signum++)
8990 switch ((
enum gdb_signal) signum)
8992 case GDB_SIGNAL_TRAP:
8993 case GDB_SIGNAL_INT:
8994 if (!allsigs && !sigs[signum])
8996 if (
query (_(
"%s is used by the debugger.\n\
8997Are you sure you want to change it? "),
8998 gdb_signal_to_name ((
enum gdb_signal) signum)))
9003 gdb_printf (_(
"Not confirmed, unchanged.\n"));
9007 case GDB_SIGNAL_DEFAULT:
9008 case GDB_SIGNAL_UNKNOWN:
9018 for (
int signum = 0; signum < nsigs; signum++)
9029 for (; signum < nsigs; signum++)
9043 const char *text,
const char *word)
9045 static const char *
const keywords[] =
9066 if (num >= 1 && num <= 15)
9067 return (
enum gdb_signal) num;
9068 error (_(
"Only signals 1-15 are valid as numeric signals.\n\
9069Use \"info signals\" for a list of symbolic signals."));
9080 enum gdb_signal oursig;
9087 oursig = gdb_signal_from_name (signum_exp);
9088 if (oursig == GDB_SIGNAL_UNKNOWN)
9100 for (oursig = GDB_SIGNAL_FIRST;
9101 (int) oursig < (
int) GDB_SIGNAL_LAST;
9102 oursig = (
enum gdb_signal) ((
int) oursig + 1))
9106 if (oursig != GDB_SIGNAL_UNKNOWN
9107 && oursig != GDB_SIGNAL_DEFAULT && oursig != GDB_SIGNAL_0)
9111 gdb_printf (_(
"\nUse the \"handle\" command "
9112 "to change these tables.\n"));
9131 LONGEST transferred;
9145 if (transferred !=
value_type (v)->length ())
9146 error (_(
"Unable to read siginfo"));
9155 LONGEST transferred;
9168 if (transferred !=
value_type (fromval)->length ())
9169 error (_(
"Unable to write siginfo"));
9182static struct value *
9217 gdb::unique_xmalloc_ptr<gdb_byte> siginfo_data;
9224 siginfo_data.reset ((gdb_byte *)
xmalloc (len));
9228 siginfo_data.get (), 0, len) != len)
9231 siginfo_data.reset (
nullptr);
9364 inf_status->thread_control = tp->
control;
9365 inf_status->inferior_control =
inf->control;
9381 &inf_status->selected_frame_level);
9475 error (_(
"Target does not support this operation."));
9491 internal_error (_(
"bogus execution_direction value: %d"),
9500 gdb_printf (file, _(
"Resuming the execution of threads "
9501 "of all processes is %s.\n"),
value);
9539 scoped_mock_context<test_target_ops> target1 (arch);
9540 scoped_mock_context<test_target_ops> target2 (arch);
9542 ptid_t old_ptid (111, 222);
9543 ptid_t new_ptid (111, 333);
9545 target1.mock_inferior.pid = old_ptid.pid ();
9546 target1.mock_thread.ptid = old_ptid;
9547 target1.mock_inferior.ptid_thread_map.clear ();
9548 target1.mock_inferior.ptid_thread_map[old_ptid] = &target1.mock_thread;
9550 target2.mock_inferior.pid = old_ptid.pid ();
9551 target2.mock_thread.ptid = old_ptid;
9552 target2.mock_inferior.ptid_thread_map.clear ();
9553 target2.mock_inferior.ptid_thread_map[old_ptid] = &target2.mock_thread;
9555 auto restore_inferior_ptid = make_scoped_restore (&
inferior_ptid, old_ptid);
9568 scoped_mock_context<test_target_ops> target1 (arch);
9569 scoped_mock_context<test_target_ops> target2 (arch);
9571 ptid_t old_ptid (111, 222);
9572 ptid_t new_ptid (111, 333);
9574 target1.mock_inferior.pid = old_ptid.pid ();
9575 target1.mock_thread.ptid = old_ptid;
9576 target1.mock_inferior.ptid_thread_map.clear ();
9577 target1.mock_inferior.ptid_thread_map[old_ptid] = &target1.mock_thread;
9579 target2.mock_inferior.pid = old_ptid.pid ();
9580 target2.mock_thread.ptid = old_ptid;
9581 target2.mock_inferior.ptid_thread_map.clear ();
9582 target2.mock_inferior.ptid_thread_map[old_ptid] = &target2.mock_thread;
9584 auto restore_inferior_ptid = make_scoped_restore (&
inferior_ptid, old_ptid);
9610What debugger does when program gets various signals.\n\
9611Specify a signal as argument to print info on that signal only."));
9615Specify how to handle signals.\n\
9616Usage: handle SIGNAL [ACTIONS]\n\
9617Args are signals and actions to apply to those signals.\n\
9618If no actions are specified, the current settings for the specified signals\n\
9619will be displayed instead.\n\
9621Symbolic signals (e.g. SIGSEGV) are recommended but numeric signals\n\
9622from 1-15 are allowed for compatibility with old versions of GDB.\n\
9623Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
9624The special arg \"all\" is recognized to mean all signals except those\n\
9625used by the debugger, typically SIGTRAP and SIGINT.\n\
9627Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\
9628\"pass\", \"nopass\", \"ignore\", or \"noignore\".\n\
9629Stop means reenter debugger if this signal happens (implies print).\n\
9630Print means print a message if this signal happens.\n\
9631Pass means let program see this signal; otherwise program doesn't know.\n\
9632Ignore is a synonym for nopass and noignore is a synonym for pass.\n\
9633Pass and Stop may be combined.\n\
9635Multiple signals may be specified. Signal numbers and signal names\n\
9636may be interspersed with actions, with the actions being performed for\n\
9637all signals cumulatively specified."));
9642There is no `stop' command, but you can set a hook on `stop'.\n\
9643This allows you to set a list of commands to be run each time execution\n\
9644of the program stops."), &
cmdlist);
9648 _(
"Set inferior debugging."),
9649 _(
"Show inferior debugging."),
9650 _(
"When non-zero, inferior specific debugging is enabled."),
9655Set whether gdb controls the inferior in non-stop mode."), _(
"\
9656Show whether gdb controls the inferior in non-stop mode."), _(
"\
9657When debugging a multi-threaded program and this setting is\n\
9658off (the default, also called all-stop mode), when one thread stops\n\
9659(for a breakpoint, watchpoint, exception, or similar events), GDB stops\n\
9660all other threads in the program while you interact with the thread of\n\
9661interest. When you continue or step a thread, you can allow the other\n\
9662threads to run, or have them remain stopped, but while you inspect any\n\
9663thread's state, all threads stop.\n\
9665In non-stop mode, when one thread stops, other threads can continue\n\
9666to run freely. You'll be able to step each thread independently,\n\
9667leave it stopped or free to run as needed."),
9673 for (
size_t i = 0; i < GDB_SIGNAL_LAST; i++)
9735Set stopping for shared library events."), _(
"\
9736Show stopping for shared library events."), _(
"\
9737If nonzero, gdb will give control to the user when the dynamic linker\n\
9738notifies gdb of shared library events. The most common event of interest\n\
9739to the user would be loading/unloading of a new library."),
9747Set debugger response to a program call of fork or vfork."), _(
"\
9748Show debugger response to a program call of fork or vfork."), _(
"\
9749A fork or vfork creates a new process. follow-fork-mode can be:\n\
9750 parent - the original process is debugged after a fork\n\
9751 child - the new process is debugged after a fork\n\
9752The unfollowed process will continue to run.\n\
9753By default, the debugger will follow the parent process."),
9761Set debugger response to a program call of exec."), _(
"\
9762Show debugger response to a program call of exec."), _(
"\
9763An exec call replaces the program image of a process.\n\
9765follow-exec-mode can be:\n\
9767 new - the debugger creates a new inferior and rebinds the process\n\
9768to this new inferior. The program the process was running before\n\
9769the exec call can be restarted afterwards by restarting the original\n\
9772 same - the debugger keeps the process bound to the same inferior.\n\
9773The new executable image replaces the previous executable loaded in\n\
9774the inferior. Restarting the inferior after the exec call restarts\n\
9775the executable the process was running after the exec call.\n\
9777By default, the debugger will use the same inferior."),
9784Set mode for locking scheduler during execution."), _(
"\
9785Show mode for locking scheduler during execution."), _(
"\
9786off == no locking (threads may preempt at any time)\n\
9787on == full locking (no thread except the current thread may run)\n\
9788 This applies to both normal execution and replay mode.\n\
9789step == scheduler locked during stepping commands (step, next, stepi, nexti).\n\
9790 In this mode, other threads may run during other commands.\n\
9791 This applies to both normal execution and replay mode.\n\
9792replay == scheduler locked in replay mode and unlocked during normal execution."),
9798Set mode for resuming threads of all processes."), _(
"\
9799Show mode for resuming threads of all processes."), _(
"\
9800When on, execution commands (such as 'continue' or 'next') resume all\n\
9801threads of all processes. When off (which is the default), execution\n\
9802commands only resume the threads of the current process. The set of\n\
9803threads that are resumed is further refined by the scheduler-locking\n\
9804mode (see help set scheduler-locking)."),
9810Set mode of the step operation."), _(
"\
9811Show mode of the step operation."), _(
"\
9812When set, doing a step over a function without debug line information\n\
9813will stop at the first instruction of that function. Otherwise, the\n\
9814function is skipped and the step command stops at a different source line."),
9821Set debugger's willingness to use displaced stepping."), _(
"\
9822Show debugger's willingness to use displaced stepping."), _(
"\
9823If on, gdb will use displaced stepping to step over breakpoints if it is\n\
9824supported by the target architecture. If off, gdb will not use displaced\n\
9825stepping to step over breakpoints, even if such is supported by the target\n\
9826architecture. If auto (which is the default), gdb will use displaced stepping\n\
9827if the target architecture supports it and non-stop mode is active, but will not\n\
9828use it in all-stop mode (see help set non-stop)."),
9835Options are 'forward' or 'reverse'."),
9836 _(
"Show direction of execution (forward/reverse)."),
9837 _(
"Tells gdb whether to execute forward or backward."),
9844Set whether gdb will detach the child of a fork."), _(
"\
9845Show whether gdb will detach the child of a fork."), _(
"\
9846Tells gdb whether to detach the child of a fork."),
9853Set disabling of debuggee's virtual address space randomization."), _(
"\
9854Show disabling of debuggee's virtual address space randomization."), _(
"\
9855When this mode is on (which is the default), randomization of the virtual\n\
9856address space is disabled. Standalone programs run with the randomization\n\
9857enabled by default on some platforms."),
9882Set whether gdb controls the inferior in observer mode."), _(
"\
9883Show whether gdb controls the inferior in observer mode."), _(
"\
9884In observer mode, GDB can get data from the inferior, but not\n\
9885affect its execution. Registers and memory may not be changed,\n\
9886breakpoints may not be set, and the program cannot be interrupted\n\
9894 selftests::register_test (
"infrun_thread_ptid_changed",
9895 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)
#define ALL_BLOCK_SYMBOLS(block, iter, sym)
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)
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
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
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)
process_stratum_target * target() const
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)
void(* deprecated_context_hook)(int)
#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)
displaced_step_finish_status gdbarch_displaced_step_finish(struct gdbarch *gdbarch, thread_info *thread, gdb_signal sig)
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)
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)
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)
thread_info * find_thread_ptid(inferior *inf, ptid_t ptid)
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)
void delete_thread(struct thread_info *thread)
int show_thread_that_caused_stop(void)
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)
int pc_in_thread_step_range(CORE_ADDR pc, struct thread_info *thread)
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)
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 prune_inferiors(void)
intrusive_list< inferior > inferior_list
void exit_inferior_silent(inferior *inf)
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 void infrun_inferior_execd(inferior *inf)
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)
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)
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 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 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 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
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 infrun_thread_thread_exit(struct thread_info *tp, int silent)
static void resume_1(enum gdb_signal sig)
static displaced_step_finish_status displaced_step_finish(thread_info *event_thread, enum gdb_signal signal)
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)
void print_end_stepping_range_reason(struct ui_out *uiout)
static int finish_step_over(struct execution_control_state *ecs)
static void handle_vfork_done(thread_info *event_thread)
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 ptid_t previous_inferior_ptid
std::string displaced_step_dump_bytes(const gdb_byte *buf, size_t len)
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 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)
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 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)
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)
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)
CORE_ADDR skip_language_trampoline(frame_info_ptr frame, CORE_ADDR pc)
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_END_STEPPING_RANGE
@ EXEC_ASYNC_EXITED_SIGNALLED
observable< ptid_t > thread_stop_requested
observable< struct inferior * > inferior_exit
observable< struct inferior * > inferior_execd
observable sync_execution_done
observable< struct thread_info *, int > thread_exit
observable< enum gdb_signal > signal_exited
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(process_stratum_target *target, 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)
const struct block * block
CORE_ADDR entry_pc() const
enum stop_stack_kind call_dummy
enum bpstat_what_main_action main_action
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
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()
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)
void copy_inferior_target_desc_info(struct inferior *destinf, struct inferior *srcinf)
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()
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)
#define SWITCH_THRU_ALL_UIS()
static ui_range all_uis()
void set_current_traceframe(int num)
static string_field_s * string_field(const char *name, const char *str, string_field_s &&tmp={})
void perror_with_name(const char *string)
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)
struct type * value_type(const struct value *value)
LONGEST value_offset(const struct value *value)
void clear_internalvar(struct internalvar *var)
struct value * allocate_value(struct type *type)
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)
gdb::array_view< gdb_byte > value_contents_all_raw(struct value *value)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
int value_optimized_out(struct value *value)
struct value * allocate_computed_value(struct type *type, const struct lval_funcs *funcs, void *closure)
@ 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