60#include "gdbsupport/gdb_regex.h"
67#include "gdbsupport/format.h"
72#include <unordered_set>
75#include "readline/tilde.h"
84#include "gdbsupport/array-view.h"
85#include "gdbsupport/gdb_optional.h"
86#include "gdbsupport/common-utils.h"
99 gdb::unique_xmalloc_ptr<char>,
100 gdb::unique_xmalloc_ptr<char>,
102 enum bpdisp,
int,
int,
int,
104 int,
int,
int,
unsigned);
107 (
const std::vector<value_ref_ptr> &vals);
118 int loc_enabled,
int thread);
132 bool sw_hw_bps_match =
false);
153 int *other_type_used);
212DIAGNOSTIC_ERROR_SWITCH
216 return "UGLL_DONT_INSERT";
218 return "UGLL_MAY_INSERT";
220 return "UGLL_INSERT";
224 gdb_assert_not_reached (
"must handle all enum values");
235DIAGNOSTIC_ERROR_SWITCH
239 return "regular remove";
245 gdb_assert_not_reached (
"must handle all enum values");
254 std::string str = string_printf (
"Breakpoint %d (%s) at address %s",
256 host_address_to_string (bl),
259 std::string loc_string = bl->
to_string ();
260 if (!loc_string.empty ())
261 str += string_printf (
" %s", loc_string.c_str ());
381 gdb_assert (thread_ > 0);
402 using ordinary_breakpoint::ordinary_breakpoint;
428 locspec = std::move (start_locspec);
447 using tracepoint::tracepoint;
510 static const char *
const bpdisps[] = {
"del",
"dstp",
"dis",
"keep"};
512 return bpdisps[(int) disp];
526 _(
"Debugger's willingness to use "
527 "watchpoint hardware is %s.\n"),
542 _(
"Debugger's behavior regarding "
543 "pending breakpoints is %s.\n"),
558 _(
"Automatic usage of hardware breakpoints is %s.\n"),
575 gdb_printf (file, _(
"Always inserted breakpoint mode is %s.\n"),
583#define breakpoint_debug_printf(fmt, ...) \
584 debug_prefixed_printf_cond (debug_breakpoint, "breakpoint", fmt, \
617 if (
inf->has_execution ()
624 if (tp->resumed () && tp->has_pending_waitstatus ())
732const std::vector<bp_location *> &
742 using iterator = std::vector<bp_location *>::iterator;
749 {
return loc->address < addr_; }
752 {
return addr_ <
loc->address; }
759 m_end = it_pair.second;
960 const char *old_mode, *new_mode;
966 warning (_(
"Target does not support breakpoint condition evaluation.\n"
967 "Using host evaluation mode instead."));
979 if (new_mode != old_mode)
1002 loc->needs_update = 1;
1021 _(
"Breakpoint condition evaluation "
1022 "mode is %s (currently %s).\n"),
1026 gdb_printf (file, _(
"Breakpoint condition evaluation mode is %s.\n"),
1037 int bp_num,
int loc_num)
1039 bool has_junk =
false;
1048 loc->cond = std::move (new_exp);
1049 if (
loc->disabled_by_cond &&
loc->enabled)
1050 gdb_printf (_(
"Breakpoint %d's condition is now valid at "
1051 "location %d, enabling.\n"),
1054 loc->disabled_by_cond =
false;
1057 catch (
const gdb_exception_error &e)
1066 warning (_(
"failed to validate condition at location %d.%d, "
1067 "disabling:\n %s"), bp_num, loc_num, e.what ());
1069 warning (_(
"failed to validate condition at location %d, "
1070 "disabling:\n %s"), loc_num, e.what ());
1073 loc->disabled_by_cond =
true;
1077 error (_(
"Garbage '%s' follows condition"),
cond_string);
1091 int from_tty,
bool force)
1098 gdb::checked_static_cast<watchpoint *> (b)->cond_exp.reset ();
1105 if (
loc.disabled_by_cond &&
loc.enabled)
1106 gdb_printf (_(
"Breakpoint %d's condition is now valid at "
1107 "location %d, enabling.\n"),
1109 loc.disabled_by_cond =
false;
1126 const char *arg = exp;
1129 error (_(
"Junk at end of expression"));
1130 watchpoint *w = gdb::checked_static_cast<watchpoint *> (b);
1148 const char *arg = exp;
1152 error (_(
"Junk at end of expression"));
1155 catch (
const gdb_exception_error &e)
1199 if (extlang != NULL)
1201 error (_(
"Only one stop condition allowed. There is currently"
1202 " a %s stop condition defined for this breakpoint."),
1213 error (_(
"No breakpoint number %d."), bpnum);
1229 N_(
"Set the condition even if it is invalid for all current locations."),
1248 const char *text,
const char * )
1250 bool has_no_arguments = (*text ==
'\0');
1257 text = skip_spaces (text);
1258 const char *space = skip_to_space (text);
1267 if (!isdigit (text[1]))
1276 if (has_no_arguments)
1280 len = strlen (text);
1286 xsnprintf (number,
sizeof (number),
"%d", b.
number);
1288 if (strncmp (number, text, len) == 0)
1296 const char *exp_start = skip_spaces (space);
1324 error (_(
"Bad breakpoint argument: '%s'"), arg);
1338 for (c = commands; c; c = c->
next)
1341 error (_(
"The 'while-stepping' command can "
1342 "only be used for tracepoints"));
1350 if (strstr (c->
line,
"collect ") == c->
line)
1351 error (_(
"The 'collect' command can only be used for tracepoints"));
1353 if (strstr (c->
line,
"teval ") == c->
line)
1354 error (_(
"The 'teval' command can only be used for tracepoints"));
1387template<
typename... Arg>
1388static std::unique_ptr<code_breakpoint>
1399 std::forward<Arg> (args)...);
1406 std::forward<Arg> (args)...);
1411 std::forward<Arg> (args)...);
1416 std::forward<Arg> (args)...);
1420 gdb_assert_not_reached (
"invalid type");
1423 return std::unique_ptr<code_breakpoint> (b);
1436 tracepoint *t = gdb::checked_static_cast<tracepoint *> (b);
1455 for (c = commands; c; c = c->
next)
1460 error (_(
"The 'while-stepping' command "
1461 "cannot be used for fast tracepoint"));
1464 error (_(
"The 'while-stepping' command "
1465 "cannot be used for static tracepoint"));
1468 error (_(
"The 'while-stepping' command "
1469 "can be used only once"));
1480 gdb_assert (while_stepping->
body_list_1 ==
nullptr);
1482 for (;
c2;
c2 =
c2->next)
1485 error (_(
"The 'while-stepping' command cannot be nested"));
1498std::vector<breakpoint *>
1501 std::vector<breakpoint *> found;
1508 if (
loc.address == addr)
1509 found.push_back (&b);
1524 b->
commands = std::move (commands);
1535 int old_silent = b->
silent;
1538 if (old_silent != silent)
1549 gdb_assert (thread == -1 || thread > 0);
1553 gdb_assert (thread == -1 || (b->
task == -1 && b->
inferior == -1));
1555 int old_thread = b->
thread;
1557 if (old_thread != thread)
1587 gdb_assert (task == -1 || task > 0);
1591 gdb_assert (task == -1 || (b->
thread == -1 && b->
inferior == -1));
1593 int old_task = b->
task;
1595 if (old_task != task)
1607 bool cmd_read =
false;
1609 std::string new_arg;
1611 if (arg == NULL || !*arg)
1629 arg = new_arg.c_str ();
1636 gdb_assert (cmd == NULL);
1637 if (control != NULL)
1642 = string_printf (_(
"Type commands for breakpoint(s) "
1643 "%s, one per line."),
1646 auto do_validate = [=] (
const char *
line)
1649 = gdb::checked_static_cast<tracepoint *> (b);
1652 gdb::function_view<void (
const char *)> validator;
1654 validator = do_validate;
1715 const gdb_byte *writebuf_org,
1716 ULONGEST memaddr, LONGEST len,
1721 CORE_ADDR bp_addr = 0;
1737 if (bp_addr + bp_size <= memaddr)
1744 if (bp_addr >= memaddr + len)
1752 if (bp_addr < memaddr)
1755 bp_size -= memaddr - bp_addr;
1756 bptoffset = memaddr - bp_addr;
1760 if (bp_addr + bp_size > memaddr + len)
1763 bp_size -= (bp_addr + bp_size) - (memaddr + len);
1766 if (readbuf != NULL)
1770 gdb_assert (
target_info->shadow_contents >= readbuf + len
1776 memcpy (readbuf + bp_addr - memaddr,
1777 target_info->shadow_contents + bptoffset, bp_size);
1781 const unsigned char *
bp;
1787 writebuf_org + bp_addr - memaddr, bp_size);
1795 memcpy (writebuf + bp_addr - memaddr,
bp + bptoffset, bp_size);
1819 const gdb_byte *writebuf_org,
1820 ULONGEST memaddr, LONGEST len)
1824 unsigned bc_l, bc_r, bc;
1832 while (bc_l + 1 < bc_r)
1836 bc = (bc_l + bc_r) / 2;
1882 warning (_(
"reading through apparently deleted breakpoint #%d?"),
1970static struct value *
1973 struct value *bit_val;
2000 loc->pspace = pspace;
2059 bool within_current_scope;
2070 gdb::optional<scoped_restore_selected_frame> restore_frame;
2074 within_current_scope =
true;
2093 restore_frame.emplace ();
2096 within_current_scope = (fi != NULL);
2097 if (within_current_scope)
2106 if (within_current_scope && reparse)
2149 error (_(
"Can't set read/access watchpoint when "
2150 "hardware watchpoints are disabled."));
2153 else if (within_current_scope && b->
exp)
2155 std::vector<value_ref_ptr> val_chain;
2156 struct value *v, *result;
2179 gdb_assert (!val_chain.empty ());
2190 && (v == val_chain[0] || ! v->lazy ()))
2198 || (vtype->
code () != TYPE_CODE_STRUCT
2199 && vtype->
code () != TYPE_CODE_ARRAY))
2202 enum target_hw_bp_type
type;
2203 int bitpos = 0, bitsize = 0;
2205 if (v->bitsize () != 0)
2209 bitpos = v->bitpos ();
2210 bitsize = v->bitsize ();
2221 addr = v->address ();
2236 loc->pspace = frame_pspace;
2244 loc->length = ((bitpos % 8) + bitsize + 7) / 8;
2247 loc->length = v->type ()->length ();
2256 auto change_type_to_bp_watchpoint = [] (
breakpoint *
bp)
2264 warning (_(
"watchpoint %d downgraded to software watchpoint"),
2281 int i, target_resources_ok, other_type_used;
2314 if (target_resources_ok <= 0)
2318 if (target_resources_ok == 0 && !sw_mode)
2319 error (_(
"Target does not support this type of "
2320 "hardware watchpoint."));
2321 else if (target_resources_ok < 0 && !sw_mode)
2322 error (_(
"There are not enough available hardware "
2323 "resources for this watchpoint."));
2326 change_type_to_bp_watchpoint (b);
2340 error (_(
"Can't set read/access watchpoint when "
2341 "hardware watchpoints are disabled."));
2343 error (_(
"Expression cannot be implemented with "
2344 "read/access watchpoint."));
2347 change_type_to_bp_watchpoint (b);
2353 bl.loc_type = loc_type;
2363 else if (!within_current_scope)
2366Watchpoint %d deleted because the program has left the block\n\
2367in which its expression is valid.\n"),
2435 "skipping watchpoint at %s:%d",
2449 scoped_restore restore_bl_duplicate
2450 = make_scoped_restore (&bl->
duplicate, 0);
2475 catch (
const gdb_exception_error &ex)
2495 bool null_condition_or_parse_error =
false;
2536 if (!
loc->cond_bytecode)
2538 null_condition_or_parse_error =
true;
2550 if (null_condition_or_parse_error)
2558 if (!
loc->cond_bytecode)
2561 loc->cond_bytecode.reset ();
2578 && !
loc->disabled_by_cond)
2595 const char *cmdrest;
2596 const char *format_start, *format_end;
2604 if (*cmdrest ==
',')
2606 cmdrest = skip_spaces (cmdrest);
2608 if (*cmdrest++ !=
'"')
2609 error (_(
"No format string following the location"));
2611 format_start = cmdrest;
2613 format_pieces fpieces (&cmdrest);
2615 format_end = cmdrest;
2617 if (*cmdrest++ !=
'"')
2618 error (_(
"Bad format string, non-terminated '\"'."));
2620 cmdrest = skip_spaces (cmdrest);
2622 if (!(*cmdrest ==
',' || *cmdrest ==
'\0'))
2623 error (_(
"Invalid argument syntax"));
2625 if (*cmdrest ==
',')
2627 cmdrest = skip_spaces (cmdrest);
2631 std::vector<struct expression *> argvec;
2632 while (*cmdrest !=
'\0')
2639 argvec.push_back (
expr.release ());
2641 if (*cmdrest ==
',')
2652 format_start, format_end - format_start,
2653 argvec.size (), argvec.data ());
2655 catch (
const gdb_exception_error &ex)
2673 bool null_command_or_parse_error =
false;
2715 loc->owner->extra_string.get ());
2720 if (!
loc->cmd_bytecode)
2722 null_command_or_parse_error =
true;
2730 if (null_command_or_parse_error)
2738 if (
loc->cmd_bytecode == NULL)
2741 loc->cmd_bytecode.reset ();
2755 &&
loc->owner->extra_string
2760 && !
loc->disabled_by_cond)
2807 if (e.error != TARGET_CLOSE_ERROR)
2828 struct ui_file *tmp_error_stream,
2829 int *disabled_breaks,
2830 int *hw_breakpoint_error,
2831 int *hw_bp_error_explained_already)
2833 gdb_exception bp_excpt;
2879 _(
"Cannot insert breakpoint %d.\n"
2880 "Cannot set software breakpoint "
2881 "at read-only address %s\n"),
2903 bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
2905 catch (gdb_exception &e)
2908 bp_excpt = std::move (e);
2921 warning (_(
"hardware breakpoint %d not supported in overlay!"),
2943 = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
2945 catch (gdb_exception &e)
2948 bp_excpt = std::move (e);
2951 if (bp_excpt.reason != 0)
2953 "Overlay breakpoint %d "
2954 "failed: in ROM?\n",
2968 bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
2970 catch (gdb_exception_error &e)
2973 bp_excpt = std::move (e);
2984 if (bp_excpt.reason != 0)
2987 gdb_assert (bl->
owner !=
nullptr);
2997 if (bp_excpt.reason == RETURN_ERROR
2998 && (bp_excpt.error == GENERIC_ERROR
2999 || bp_excpt.error == MEMORY_ERROR)
3008 if (!*disabled_breaks)
3011 "Cannot insert breakpoint %d.\n",
3014 "Temporarily disabling shared "
3015 "library breakpoints:\n");
3017 *disabled_breaks = 1;
3026 *hw_breakpoint_error = 1;
3027 *hw_bp_error_explained_already = bp_excpt.message != NULL;
3029 "Cannot insert hardware breakpoint %d%s",
3031 bp_excpt.message ?
":" :
".\n");
3032 if (bp_excpt.message != NULL)
3038 if (bp_excpt.message == NULL)
3045 "Cannot insert breakpoint %d.\n"
3052 "Cannot insert breakpoint %d: %s\n",
3119Error inserting catchpoint %d: Your system does not support this type\n\
3122 warning (_(
"Error inserting catchpoint %d."), bl->
owner->
number);
3151 if (
loc->pspace == pspace)
3154 loc->owner->unadd_location (*
loc);
3172 watchpoint &w = gdb::checked_static_cast<watchpoint &> (bpt);
3196 int disabled_breaks = 0;
3197 int hw_breakpoint_error = 0;
3198 int hw_bp_details_reported = 0;
3204 tmp_error_stream.
puts (
"Warning:\n");
3218 if (!bl->inserted || !bl->needs_update)
3232 &hw_breakpoint_error, &hw_bp_details_reported);
3240 error ((
"%s"), tmp_error_stream.
c_str ());
3251 int disabled_breaks = 0;
3252 int hw_breakpoint_error = 0;
3253 int hw_bp_error_explained_already = 0;
3259 tmp_error_stream.
puts (
"Warning:\n");
3271 if (bl->owner->thread != -1
3277 if (bl->owner->inferior != -1
3292 &hw_breakpoint_error, &hw_bp_error_explained_already);
3301 bool some_failed =
false;
3325 hw_breakpoint_error = 1;
3326 tmp_error_stream.
printf (
"Could not insert "
3327 "hardware watchpoint %d.\n",
3337 if (hw_breakpoint_error && !hw_bp_error_explained_already)
3339 tmp_error_stream.
printf (
"Could not insert hardware breakpoints:\n\
3340You may have requested too many hardware breakpoints/watchpoints.\n");
3343 error ((
"%s"), tmp_error_stream.
c_str ());
3368 gdb::optional<ULONGEST> ,
3376Thread-specific breakpoint %d deleted - thread %s no longer in the thread list.\n"),
3399Inferior-specific breakpoint %d deleted - inferior %d has been removed.\n"),
3417 if (bl->pspace !=
inf->pspace)
3420 if (bl->inserted && !bl->target_info.persist)
3455 std::unique_ptr<internal_breakpoint> b
3492 "longjmp",
"_longjmp",
"siglongjmp",
"_siglongjmp"
3494#define NUM_LONGJMP_NAMES ARRAY_SIZE(longjmp_names)
3549 if (bp_objfile_data == NULL)
3551 return bp_objfile_data;
3557 const char *
const func_name =
"_ovly_debug_event";
3575 if (m.minsym == NULL)
3614 std::vector<probe *> ret
3642 p->get_relocated_address (
objfile),
3663 unsigned int installed_bp = 0;
3668 const char *func_name;
3680 if (m.minsym == NULL)
3696 return installed_bp > 0;
3713 if (obj->separate_debug_objfile_backlink !=
nullptr)
3722 for (
objfile *debug_objfile : obj->separate_debug_objfiles ())
3733 const char *
const func_name =
"std::terminate()";
3756 if (m.minsym == NULL || (m.minsym->type () !=
mst_text
3790 std::vector<probe *> ret
3817 p->get_relocated_address (
objfile),
3832 const char *
const func_name =
"_Unwind_DebugHook";
3849 if (debug_hook.
minsym == NULL)
3874 if (obj->separate_debug_objfile_backlink)
3883 for (
objfile *debug_objfile : obj->separate_debug_objfiles ())
3910 gdb_assert (!bploc->inserted);
4020 scoped_restore save_inferior_ptid = make_scoped_restore (&
inferior_ptid);
4024 error (_(
"Cannot detach breakpoints of inferior_ptid"));
4030 if (bl->pspace !=
inf->pspace)
4066 gdb_assert (bl->
owner != NULL);
4183 warning (_(
"Could not remove hardware watchpoint %d."),
4204 gdb_assert (bl->
owner != NULL);
4301 watchpoint &w = gdb::checked_static_cast<watchpoint &> (b);
4319 w.
val.reset (
nullptr);
4354 bool any_breakpoint_here =
false;
4371 else if (bl->permanent)
4374 any_breakpoint_here =
true;
4385 CORE_ADDR addr, ULONGEST len)
4499 CORE_ADDR addr, ULONGEST len)
4516 l = std::max<CORE_ADDR> (
loc.address, addr);
4517 h = std::min<CORE_ADDR> (
loc.address +
loc.length, addr + len);
4556 bp_location_at (other.bp_location_at),
4557 breakpoint_at (other.breakpoint_at),
4558 commands (other.commands),
4559 print (other.print),
4561 print_it (other.print_it)
4575 bpstat *retval =
nullptr;
4580 for (; bs != NULL; bs = bs->
next)
4603 for (; bsp != NULL; bsp = bsp->
next)
4616 for (; bsp != NULL; bsp = bsp->
next)
4622 if (sig == GDB_SIGNAL_TRAP)
4648 b = (*bsp)->breakpoint_at;
4649 *bsp = (*bsp)->
next;
4677 warning (_(
"location number not found for breakpoint %d address %s."),
4692 uiout->
text (_(
"deleted breakpoint"));
4747 return cmd && (strcmp (
"silent", cmd->
line) == 0);
4760 (locno > 0 ? locno : 1));
4783 scoped_restore save_executing
4796 int printed_hit_bpnum = -1;
4797 int printed_hit_locno = -1;
4800 for (; bs != NULL; bs = bs->
next)
4812 if (printed_hit_locno == -1 && bs->
print)
4814 printed_hit_bpnum = b->
number;
4815 printed_hit_locno = locno;
4880 if (printed_hit_locno != -1)
4918 cleanup_if_error.release ();
4951 uiout->
text (
"Thread ");
4957 uiout->
text (
" \"");
4962 uiout->
text (
" hit ");
5003 internal_error (_(
"print_bp_stop_message: unrecognized enum value"));
5018 if (any_added || any_deleted)
5019 current_uiout->text (_(
"Stopped due to shared library event:\n"));
5021 current_uiout->text (_(
"Stopped due to shared library event (no "
5022 "libraries added or removed)\n"));
5090 for (; bs; bs = bs->
next)
5127 breakpoint_at (bl->owner),
5133 **bs_link_pointer =
this;
5134 *bs_link_pointer = &
next;
5139 breakpoint_at (NULL),
5156 if (!stopped_by_watchpoint)
5163 watchpoint &w = gdb::checked_static_cast<watchpoint &> (b);
5178 watchpoint &w = gdb::checked_static_cast<watchpoint &> (b);
5193 watchpoint &w = gdb::checked_static_cast<watchpoint &> (b);
5203 if (newaddr == start)
5239#define BP_TEMPFLAG 1
5240#define BP_HARDWAREFLAG 2
5249 bool within_current_scope;
5262 within_current_scope =
true;
5282 within_current_scope = (fr != NULL);
5286 if (within_current_scope)
5291 if (function == NULL
5293 within_current_scope =
false;
5296 if (within_current_scope)
5303 if (within_current_scope)
5311 struct value *new_val;
5330 if ((b->
val != NULL) != (new_val != NULL)
5337 if (new_val != NULL)
5371 uiout->
message (
"\nWatchpoint %pF deleted because the program has "
5372 "left the block in\n"
5373 "which its expression is valid.\n",
5397 gdb_assert (b != NULL);
5412 gdb_assert (bl != NULL);
5415 bool must_check_value =
false;
5420 must_check_value =
true;
5425 must_check_value =
true;
5432 must_check_value =
true;
5434 if (must_check_value)
5442 catch (
const gdb_exception_error &ex)
5445 "Error evaluating expression "
5446 "for watchpoint %d\n",
5506 int other_write_watchpoint = 0;
5515 gdb::checked_static_cast<watchpoint &> (other_b);
5520 other_write_watchpoint = 1;
5526 if (other_write_watchpoint
5578 bool condition_result =
true;
5581 gdb_assert (bs->
stop);
5585 gdb_assert (bl != NULL);
5587 gdb_assert (b != NULL);
5590 thread->
ptid.to_string ().c_str (),
5625 watchpoint *w = gdb::checked_static_cast<watchpoint *> (b);
5630 cond = bl->
cond.get ();
5634 bool within_current_scope =
true;
5644 w = gdb::checked_static_cast<watchpoint *> (b);
5676 within_current_scope =
false;
5678 if (within_current_scope)
5684 catch (
const gdb_exception_error &ex)
5690 "Error in testing condition for breakpoint %d.%d:\n",
5695 "Error in testing condition for breakpoint %d:\n",
5701 warning (_(
"Watchpoint condition cannot be tested "
5702 "in the current scope"));
5709 if (cond !=
nullptr && !condition_result)
5751 bpstat *bs_head =
nullptr, **bs_link = &bs_head;
5768 if (!bl.enabled || bl.disabled_by_cond || bl.shlib_disabled)
5831 bpstat *bs_head = stop_chain;
5833 int need_remove_insert;
5842 if (bs_head == NULL)
5849 for (bs = bs_head; bs != NULL; bs = bs->
next)
5864 for (bs = bs_head; bs != NULL; bs = bs->
next)
5910 need_remove_insert = 0;
5912 for (bs = bs_head; bs != NULL; bs = bs->
next)
5918 = gdb::checked_static_cast<watchpoint *> (bs->
breakpoint_at);
5921 need_remove_insert = 1;
5924 if (need_remove_insert)
5926 else if (removed_any)
5965 gdb_assert (jit_bp_sym.
objfile !=
nullptr);
5988 for (bs = bs_head; bs != NULL; bs = bs->next)
5995 if (bs->breakpoint_at == NULL)
6002 bptype = bs->breakpoint_at->type;
6127 internal_error (_(
"bpstat_what: tracepoint encountered"));
6147 internal_error (_(
"bpstat_what: unhandled bptype %d"), (
int)
bptype);
6161 for (bs = bs_head; bs != NULL; bs = bs->
next)
6174 (gdb::checked_static_cast<code_breakpoint *> (b));
6178 (gdb::checked_static_cast<code_breakpoint *> (b));
6203 for (; bs != NULL; bs = bs->
next)
6219 int i, total_width, width, align;
6225 if (strcmp (text, col_name) == 0)
6228 total_width += width + 1;
6245 char host_evals = 0;
6246 char target_evals = 0;
6260 if (bl.cond_bytecode)
6266 if (host_evals && target_evals)
6268 else if (target_evals)
6302 if (
loc != NULL &&
loc->shlib_disabled)
6310 else if (
loc &&
loc->symtab)
6316 uiout->
text (
"in ");
6321 uiout->
text (
"at ");
6371 struct ep_type_description
6374 const char *description;
6376 static struct ep_type_description bptypes[] =
6415 if (((
int)
type >= (
sizeof (bptypes) /
sizeof (bptypes[0])))
6417 internal_error (_(
"bptypes table does not describe type #%d."),
6420 return bptypes[(int)
type].description;
6429 const std::vector<int> &inf_nums,
6436 if (!is_mi && mi_only)
6441 for (
size_t i = 0; i < inf_nums.size (); i++)
6447 xsnprintf (mi_group,
sizeof (mi_group),
"i%d", inf_nums[i]);
6453 uiout->
text (
" inf ");
6457 uiout->
text (plongest (inf_nums[i]));
6478 int allflag,
bool raw_loc)
6481 static char bpenables[] =
"nynny";
6484 bool header_of_multiple =
false;
6485 bool part_of_multiple = (
loc != NULL);
6490 gdb_assert (!
loc || loc_number != 0);
6497 header_of_multiple =
true;
6506 if (part_of_multiple)
6513 if (part_of_multiple)
6520 if (part_of_multiple)
6527 if (part_of_multiple)
6534 auto get_enable_state = [uiout,
loc] () ->
const char *
6538 if (
loc->disabled_by_cond)
6540 else if (!
loc->enabled)
6547 if (
loc->disabled_by_cond)
6549 else if (!
loc->enabled)
6563 bool result =
false;
6564 if (!raw_loc && b->
print_one (last_loc))
6570 watchpoint *w = gdb::checked_static_cast<watchpoint *> (b);
6575 if (opts.addressprint)
6583 if (opts.addressprint)
6586 if (header_of_multiple)
6594 loc->gdbarch,
loc->address);
6597 if (!header_of_multiple)
6604 if (
loc != NULL && !header_of_multiple)
6606 std::vector<int> inf_nums;
6611 if (
inf->pspace ==
loc->pspace)
6612 inf_nums.push_back (
inf->num);
6639 else if (b->
task != -1)
6647 if (!part_of_multiple)
6653 uiout->
text (
"\tstop only in stack frame at ");
6665 uiout->
text (
"\ttrace only if ");
6667 uiout->
text (
"\tstop only if ");
6676 uiout->
message (
" (%pF evals)",
6683 if (!part_of_multiple && b->
thread != -1)
6686 uiout->
text (
"\tstop only in thread ");
6698 if (!part_of_multiple && b->
task != -1)
6700 uiout->
text (
"\tstop only in task ");
6705 if (!part_of_multiple && b->
inferior != -1)
6707 uiout->
text (
"\tstop only in inferior ");
6712 if (!part_of_multiple)
6718 uiout->
text (
"\tcatchpoint");
6720 uiout->
text (
"\ttracepoint");
6722 uiout->
text (
"\tbreakpoint");
6723 uiout->
text (
" already hit ");
6726 uiout->
text (
" time\n");
6728 uiout->
text (
" times\n");
6741 uiout->
message (
"\tignore next %pF hits\n",
6751 uiout->
text (
"\tdisable after ");
6755 uiout->
text (
"additional ");
6757 uiout->
text (
"next ");
6759 uiout->
text (
" hits\n");
6764 tracepoint *tp = gdb::checked_static_cast<tracepoint *> (b);
6768 uiout->
text (
"\ttrace buffer usage ");
6770 uiout->
text (
" bytes\n");
6775 if (!part_of_multiple && l)
6779 bool use_fixed_output =
6783 gdb::optional<ui_out_emit_tuple> tuple_emitter;
6784 gdb::optional<ui_out_emit_list> list_emitter;
6786 if (use_fixed_output)
6787 list_emitter.emplace (uiout,
"script");
6789 tuple_emitter.emplace (uiout,
"script");
6796 tracepoint *t = gdb::checked_static_cast<tracepoint *> (b);
6801 uiout->
text (
"\tpass count ");
6803 uiout->
text (
" \n");
6808 if (!header_of_multiple &&
loc != NULL && !
loc->shlib_disabled)
6814 loc->inserted ?
"y" :
"n");
6820 uiout->
text (
"\tnot ");
6821 uiout->
text (
"installed on target\n");
6830 watchpoint *w = gdb::checked_static_cast<watchpoint *> (b);
6834 else if (b->
locspec !=
nullptr)
6836 const char *str = b->
locspec->to_string ();
6853 bool use_fixed_output
6857 gdb::optional<ui_out_emit_tuple> bkpt_tuple_emitter (gdb::in_place, uiout,
"bkpt");
6863 if (!use_fixed_output)
6864 bkpt_tuple_emitter.reset ();
6869 if (!printed || allflag)
6892 gdb::optional<ui_out_emit_list> locations_list;
6898 locations_list.emplace (uiout,
"locations");
6915 int print_address_bits = 0;
6923 if (addr_bit > print_address_bits)
6924 print_address_bits = addr_bit;
6927 return print_address_bits;
6974 int nr_printable_breakpoints;
6976 int print_address_bits = 0;
6977 int print_type_col_width = 14;
6979 bool has_disabled_by_cond_location =
false;
6985 nr_printable_breakpoints = 0;
6989 if (filter && !filter (&b))
6994 if (bp_num_list != NULL && *bp_num_list !=
'\0')
7004 int addr_bit, type_len;
7007 if (addr_bit > print_address_bits)
7008 print_address_bits = addr_bit;
7011 if (type_len > print_type_col_width)
7012 print_type_col_width = type_len;
7014 nr_printable_breakpoints++;
7020 opts.addressprint ? 6 : 5,
7021 nr_printable_breakpoints,
7024 if (nr_printable_breakpoints > 0)
7026 if (nr_printable_breakpoints > 0)
7029 if (nr_printable_breakpoints > 0)
7032 if (nr_printable_breakpoints > 0)
7035 if (nr_printable_breakpoints > 0)
7038 if (opts.addressprint)
7040 if (nr_printable_breakpoints > 0)
7042 if (print_address_bits <= 32)
7047 if (nr_printable_breakpoints > 0)
7051 if (nr_printable_breakpoints > 0)
7058 if (filter && !filter (&b))
7064 if (bp_num_list != NULL && *bp_num_list !=
'\0')
7083 if (
loc.disabled_by_cond)
7084 has_disabled_by_cond_location =
true;
7089 if (nr_printable_breakpoints == 0)
7095 if (bp_num_list == NULL || *bp_num_list ==
'\0')
7096 uiout->
message (
"No breakpoints or watchpoints.\n");
7098 uiout->
message (
"No breakpoint or watchpoint matching '%s'.\n",
7107 if (has_disabled_by_cond_location && !uiout->
is_mi_like_p ())
7108 uiout->
message (_(
"(*): Breakpoint condition is invalid at this "
7116 return nr_printable_breakpoints;
7135 uiout->
text (
"default collect ");
7137 uiout->
text (
" \n");
7154 if (num_printed == 0)
7156 if (args == NULL || *args ==
'\0')
7157 uiout->
message (
"No watchpoints.\n");
7159 uiout->
message (
"No watchpoint matching '%s'.\n", args);
7178 if (bl.pspace == pspace
7211 if (b.
thread == -1 && thread != -1)
7218 else if (b.
task != -1)
7226 : ((others == 1) ?
" and" :
""));
7259 watchpoint *w1 = gdb::checked_static_cast<watchpoint *> (loc1->
owner);
7260 watchpoint *w2 = gdb::checked_static_cast<watchpoint *> (loc2->
owner);
7263 gdb_assert (w1 != NULL);
7264 gdb_assert (w2 != NULL);
7303 || aspace1 == aspace2)
7319 || aspace1 == aspace2)
7320 && addr2 >= addr1 && addr2 < addr1 + len1);
7350 CORE_ADDR addr,
int len)
7389 bool sw_hw_bps_match)
7391 int hw_point1, hw_point2;
7394 gdb_assert (loc1->
owner != NULL);
7395 gdb_assert (loc2->
owner != NULL);
7400 if (hw_point1 != hw_point2)
7418 int bnum,
bool have_bnum)
7425 strcpy (astr1, hex_string_custom ((
unsigned long) from_addr, 8));
7426 strcpy (astr2, hex_string_custom ((
unsigned long) to_addr, 8));
7428 warning (_(
"Breakpoint %d address previously adjusted from %s to %s."),
7429 bnum, astr1, astr2);
7431 warning (_(
"Breakpoint address adjusted from %s to %s."), astr1, astr2);
7444 gdb_assert (pspace !=
nullptr);
7468 CORE_ADDR adjusted_bpaddr = bpaddr;
7490 if (adjusted_bpaddr != bpaddr)
7493 return adjusted_bpaddr;
7549 internal_error (_(
"unknown breakpoint type"));
7555 this->owner =
owner;
7615 gdb_assert (
loc->owner != NULL);
7621 const char *function_name;
7623 if (
loc->msymbol != NULL
7629 function_name =
loc->msymbol->linkage_name ();
7640 loc->related_address =
loc->address;
7647 loc->function_name = make_unique_xstrdup (function_name);
7766 std::unordered_set<breakpoint *> to_delete;
7806 bool unwind_finished_unexpectedly =
false;
7810 if (prev ==
nullptr)
7815 if (stop_reason != UNWIND_NO_REASON
7816 && stop_reason != UNWIND_OUTERMOST)
7817 unwind_finished_unexpectedly =
true;
7821 if (unwind_finished_unexpectedly)
7831 to_delete.insert (&b);
8007 && !
loc->shlib_disabled
8011 loc->shlib_disabled = 1;
8023 bool disabled_shlib_breaks =
false;
8031 && !
loc->shlib_disabled
8040 loc->shlib_disabled = 1;
8049 if (!disabled_shlib_breaks)
8052 warning (_(
"Temporarily disabling breakpoints "
8053 "for unloaded shared library \"%s\""),
8056 disabled_shlib_breaks =
true;
8085 bool bp_modified =
false;
8092 CORE_ADDR loc_addr =
loc.address;
8098 if (
loc.shlib_disabled != 0)
8110 loc.shlib_disabled = 1;
8131 bool temp,
const char *cond_string_)
8138 ? make_unique_xstrdup (cond_string_)
8231 *other_type_used = 0;
8242 *other_type_used = 1;
8286template<
typename... Arg>
8293 std::forward<Arg> (args)...);
8296 std::forward<Arg> (args)...);
8311 std::unique_ptr<momentary_breakpoint> b
8315 b->add_location (sal);
8334 std::unique_ptr<breakpoint> copy
8338 bp_location *copy_loc = copy->allocate_location ();
8339 copy->add_location (*copy_loc);
8350 copy_loc->
enabled = loc_enabled;
8437 static bool said =
false;
8443 "hardware breakpoints for "
8444 "read-only addresses.\n"));
8455 CORE_ADDR adjusted_address;
8458 if (loc_gdbarch == NULL)
8475 new_loc->
address = adjusted_address;
8479 gdb_assert (new_loc->
pspace != NULL);
8481 new_loc->
gdbarch = loc_gdbarch;
8518 gdb_assert (
loc != NULL);
8540 gdb::unique_xmalloc_ptr<char> printf_line =
nullptr;
8545 dprintf_args = skip_spaces (dprintf_args);
8549 if (*dprintf_args ==
',')
8551 dprintf_args = skip_spaces (dprintf_args);
8553 if (*dprintf_args !=
'"')
8554 error (_(
"Bad format string, missing '\"'."));
8557 printf_line = xstrprintf (
"printf %s", dprintf_args);
8561 error (_(
"No function supplied for dprintf call"));
8564 printf_line = xstrprintf (
"call (void) %s (%s,%s)",
8569 printf_line = xstrprintf (
"call (void) %s (%s)",
8576 printf_line = xstrprintf (
"agent-printf %s", dprintf_args);
8579 warning (_(
"Target cannot run dprintf commands, falling back to GDB printf"));
8580 printf_line = xstrprintf (
"printf %s", dprintf_args);
8584 internal_error (_(
"Invalid dprintf style."));
8586 gdb_assert (printf_line != NULL);
8609 gdb::array_view<const symtab_and_line> sals,
8611 gdb::unique_xmalloc_ptr<char> filter_,
8612 gdb::unique_xmalloc_ptr<char> cond_string_,
8613 gdb::unique_xmalloc_ptr<char> extra_string_,
8614 enum bpdisp disposition_,
8615 int thread_,
int task_,
int inferior_,
8618 int enabled_,
unsigned flags,
8619 int display_canonical_)
8626 int target_resources_ok;
8629 target_resources_ok =
8632 if (target_resources_ok == 0)
8633 error (_(
"No hardware breakpoint support in the target."));
8634 else if (target_resources_ok < 0)
8635 error (_(
"Hardware breakpoints used exceeds limit."));
8638 gdb_assert (!sals.empty ());
8641 gdb_assert (((
thread == -1 ? 0 : 1)
8642 + (
task == -1 ? 0 : 1)
8658 auto *t = gdb::checked_static_cast<tracepoint *> (
this);
8665 const char *p = &locspec_->to_string ()[3];
8668 p = skip_spaces (p);
8670 endp = skip_to_space (p);
8672 t->static_trace_marker_id.assign (p, endp - p);
8674 gdb_printf (_(
"Probed static tracepoint marker \"%s\"\n"),
8675 t->static_trace_marker_id.c_str ());
8679 t->static_trace_marker_id = std::move (marker.
str_id);
8681 gdb_printf (_(
"Probed static tracepoint marker \"%s\"\n"),
8682 t->static_trace_marker_id.c_str ());
8685 warning (_(
"Couldn't determine the static tracepoint marker to probe"));
8688 for (
const auto &sal : sals)
8693 if (loc_gdbarch ==
nullptr)
8697 sal.pspace, sal.pc, sal.section,
thread);
8715 error (_(
"Format string required"));
8718 error (_(
"Garbage '%s' at end of command"),
extra_string.get ());
8734 if (locspec_ !=
nullptr)
8735 locspec = std::move (locspec_);
8738 filter = std::move (filter_);
8743 gdb::array_view<const symtab_and_line> sals,
8745 gdb::unique_xmalloc_ptr<char> filter,
8746 gdb::unique_xmalloc_ptr<char> cond_string,
8747 gdb::unique_xmalloc_ptr<char> extra_string,
8749 int thread,
int task,
int inferior,
int ignore_count,
8751 int enabled,
int internal,
unsigned flags,
8752 int display_canonical)
8754 std::unique_ptr<code_breakpoint> b
8758 std::move (locspec),
8760 std::move (cond_string),
8761 std::move (extra_string),
8763 thread, task,
inferior, ignore_count,
8789 gdb::unique_xmalloc_ptr<char> cond_string,
8790 gdb::unique_xmalloc_ptr<char> extra_string,
8792 int thread,
int task,
int inferior,
8795 int enabled,
int internal,
unsigned flags)
8798 gdb_assert (canonical->
lsals.size () == 1);
8800 for (
const auto &lsal : canonical->
lsals)
8805 = (canonical->
locspec !=
nullptr
8806 ? canonical->
locspec->clone ()
8808 gdb::unique_xmalloc_ptr<char> filter_string
8809 (lsal.canonical != NULL ? xstrdup (lsal.canonical) : NULL);
8812 std::move (locspec),
8813 std::move (filter_string),
8814 std::move (cond_string),
8815 std::move (extra_string),
8817 thread, task,
inferior, ignore_count,
8818 from_tty, enabled, internal,
flags,
8853 CORE_ADDR
pc = sal.
pc;
8869 canonical->lsals.push_back (std::move (lsal));
8873 error (_(
"No default breakpoint address now."));
8887 const char *spec = NULL;
8894 && strchr (
"+-", spec[0]) != NULL
8916 for (
auto &sal :
sals)
8929 gdb::array_view<const symtab_and_line>
sals)
8931 for (
const auto &sal :
sals)
8942 error (_(
"May not have a fast tracepoint at %s%s"),
8943 paddress (sarch, sal.pc), msg.c_str ());
8960 gdb::unique_xmalloc_ptr<char> *cond_string,
8961 int *thread,
int *
inferior,
int *task,
8962 gdb::unique_xmalloc_ptr<char> *rest)
8964 cond_string->reset ();
8973 const char *end_tok;
8975 const char *cond_start = NULL;
8976 const char *cond_end = NULL;
8978 tok = skip_spaces (tok);
8980 if ((*tok ==
'"' || *tok ==
',') && rest)
8982 rest->reset (savestring (tok, strlen (tok)));
8986 end_tok = skip_to_space (tok);
8988 toklen = end_tok - tok;
8990 if (toklen >= 1 && strncmp (tok,
"if", toklen) == 0)
8992 tok = cond_start = end_tok + 1;
8997 catch (
const gdb_exception_error &)
9002 tok = tok + strlen (tok);
9005 cond_string->reset (savestring (cond_start, cond_end - cond_start));
9007 else if (toklen >= 1 && strncmp (tok,
"-force-condition", toklen) == 0)
9012 else if (toklen >= 1 && strncmp (tok,
"thread", toklen) == 0)
9018 error(_(
"You can specify only one thread."));
9021 error (_(
"You can specify only one of thread or task."));
9024 error (_(
"You can specify only one of inferior or thread."));
9029 error (_(
"Junk after thread keyword."));
9033 else if (toklen >= 1 && strncmp (tok,
"inferior", toklen) == 0)
9036 error(_(
"You can specify only one inferior."));
9039 error (_(
"You can specify only one of inferior or task."));
9042 error (_(
"You can specify only one of inferior or thread."));
9046 *
inferior = strtol (tok, &tmptok, 0);
9048 error (_(
"Junk after inferior keyword."));
9050 error (_(
"Unknown inferior number %d."), *
inferior);
9053 else if (toklen >= 1 && strncmp (tok,
"task", toklen) == 0)
9058 error(_(
"You can specify only one task."));
9061 error (_(
"You can specify only one of thread or task."));
9064 error (_(
"You can specify only one of inferior or task."));
9067 *task = strtol (tok, &tmptok, 0);
9069 error (_(
"Junk after task keyword."));
9071 error (_(
"Unknown task %d."), *task);
9076 rest->reset (savestring (tok, strlen (tok)));
9080 error (_(
"Junk at end of arguments."));
9092 gdb::unique_xmalloc_ptr<char> *cond_string,
9093 int *thread,
int *
inferior,
int *task,
9094 gdb::unique_xmalloc_ptr<char> *rest)
9096 int num_failures = 0;
9097 for (
auto &sal : sals)
9099 gdb::unique_xmalloc_ptr<char> cond;
9101 int inferior_id = -1;
9103 gdb::unique_xmalloc_ptr<char> remaining;
9114 &inferior_id, &task_id, &remaining);
9115 *cond_string = std::move (cond);
9119 gdb_assert (((thread_id == -1 ? 1 : 0)
9120 + (task_id == -1 ? 1 : 0)
9121 + (inferior_id == -1 ? 1 : 0)) >= 2);
9122 *thread = thread_id;
9125 *rest = std::move (remaining);
9128 catch (
const gdb_exception_error &e)
9132 if (num_failures == sals.size ())
9140static std::vector<symtab_and_line>
9143 const char *p = &(*arg_p)[3];
9146 p = skip_spaces (p);
9148 endp = skip_to_space (p);
9150 std::string marker_str (p, endp - p);
9152 std::vector<static_tracepoint_marker> markers
9154 if (markers.empty ())
9155 error (_(
"No known static tracepoint marker named %s"),
9156 marker_str.c_str ());
9158 std::vector<symtab_and_line> sals;
9159 sals.reserve (markers.size ());
9164 sal.
pc = marker.address;
9165 sals.push_back (sal);
9201 if (locspec !=
nullptr)
9212 const char *cond_string,
9214 const char *extra_string,
9215 bool force_condition,
int parse_extra,
9216 int tempflag,
enum bptype type_wanted,
9220 int from_tty,
int enabled,
int internal,
9228 gdb_assert (thread == -1 || thread > 0);
9230 gdb_assert (thread == -1 ||
inferior == -1);
9232 gdb_assert (ops != NULL);
9235 if (extra_string != NULL && *extra_string ==
'\0')
9236 extra_string = NULL;
9242 catch (
const gdb_exception_error &e)
9246 if (e.error == NOT_FOUND_ERROR)
9259 && !
nquery (_(
"Make %s pending on future shared library load? "),
9280 for (
auto &lsal : canonical.
lsals)
9287 for (
const auto &lsal : canonical.
lsals)
9296 gdb::unique_xmalloc_ptr<char> cond_string_copy;
9297 gdb::unique_xmalloc_ptr<char> extra_string_copy;
9301 gdb::unique_xmalloc_ptr<char> rest;
9302 gdb::unique_xmalloc_ptr<char> cond;
9309 cond_string_copy = std::move (cond);
9310 extra_string_copy = std::move (rest);
9315 && extra_string != NULL && *extra_string !=
'\0')
9316 error (_(
"Garbage '%s' at end of location"), extra_string);
9322 if (cond_string !=
nullptr && !force_condition)
9324 int num_failures = 0;
9326 for (
const auto &sal : lsal.
sals)
9328 const char *cond = cond_string;
9335 catch (
const gdb_exception_error &)
9339 if (num_failures == lsal.
sals.size ())
9347 cond_string_copy.reset (xstrdup (cond_string));
9350 extra_string_copy.reset (xstrdup (extra_string));
9354 std::move (cond_string_copy),
9355 std::move (extra_string_copy),
9358 thread, task,
inferior, ignore_count,
9359 from_tty, enabled, internal,
flags);
9365 b->locspec =
locspec->clone ();
9368 b->cond_string = NULL;
9372 b->cond_string.reset (cond_string != NULL
9373 ? xstrdup (cond_string)
9379 b->extra_string.reset (extra_string != NULL
9380 ? xstrdup (extra_string)
9382 b->ignore_count = ignore_count;
9384 b->condition_not_parsed = 1;
9393 if (canonical.
lsals.size () > 1)
9395 warning (_(
"Multiple breakpoints were set.\nUse the "
9396 "\"delete\" command to delete unwanted breakpoints."));
9430 tempflag, type_wanted,
9447 if (sal->
pc == 0 && sal->
symtab != NULL)
9450 error (_(
"No line %d in file \"%s\"."),
9463 const struct block *b;
9530 if (arg[0] !=
',' || arg[1] ==
'\0')
9531 error (_(
"Format string required"));
9556 error (_(
"May only run agent-printf on the target"));
9568 || ws.
sig () != GDB_SIGNAL_TRAP)
9572 bl->
length, aspace, bp_addr);
9600 uiout->
text (
"Temporary ranged breakpoint ");
9602 uiout->
text (
"Ranged breakpoint ");
9628 if (opts.addressprint)
9644 CORE_ADDR address_start, address_end;
9649 address_end = address_start + bl.
length - 1;
9651 uiout->
text (
"\taddress range: ");
9669 uiout->
message (_(
"Hardware assisted ranged breakpoint %d from %s to %s."),
9706 error (_(
"Could not find location of the end of the range."));
9720 const char *arg_start;
9722 int bp_count, can_use_bp, length;
9727 error (_(
"This target does not support hardware ranged breakpoints."));
9734 error (_(
"Hardware breakpoints used exceeds limit."));
9736 arg = skip_spaces (arg);
9737 if (arg == NULL || arg[0] ==
'\0')
9738 error(_(
"No address range specified."));
9746 error (_(
"Too few arguments."));
9747 else if (canonical_start.
lsals.empty ())
9748 error (_(
"Could not find location of the beginning of the range."));
9752 if (canonical_start.
lsals.size () > 1
9753 || lsal_start.
sals.size () != 1)
9754 error (_(
"Cannot create a ranged breakpoint with multiple locations."));
9757 std::string addr_string_start (arg_start, arg - arg_start);
9760 arg = skip_spaces (arg);
9776 &canonical_end, NULL, NULL);
9778 if (canonical_end.
lsals.empty ())
9779 error (_(
"Could not find location of the end of the range."));
9782 if (canonical_end.
lsals.size () > 1
9783 || lsal_end.
sals.size () != 1)
9784 error (_(
"Cannot create a ranged breakpoint with multiple locations."));
9789 if (sal_start.
pc > end)
9790 error (_(
"Invalid address range, end precedes start."));
9792 length = end - sal_start.
pc + 1;
9795 error (_(
"Address range too large."));
9796 else if (length == 1)
9807 std::unique_ptr<breakpoint> br
9810 std::move (start_locspec),
9811 std::move (end_locspec)));
9838 return exp->
op->constant_p ();
9957 gdb::optional<ui_out_emit_tuple> tuple_emitter;
9966 tuple_emitter.emplace (uiout,
"value");
9967 uiout->
text (
"\nOld value = ");
9970 uiout->
text (
"\nNew value = ");
9983 tuple_emitter.emplace (uiout,
"value");
9984 uiout->
text (
"\nValue = ");
9999 tuple_emitter.emplace (uiout,
"value");
10000 uiout->
text (
"\nOld value = ");
10003 uiout->
text (
"\nNew value = ");
10012 tuple_emitter.emplace (uiout,
"value");
10013 uiout->
text (
"\nValue = ");
10017 uiout->
text (
"\n");
10033 const char *tuple_name;
10038 uiout->
text (
"Watchpoint ");
10039 tuple_name =
"wpt";
10042 uiout->
text (
"Hardware watchpoint ");
10043 tuple_name =
"wpt";
10046 uiout->
text (
"Hardware read watchpoint ");
10047 tuple_name =
"hw-rwpt";
10050 uiout->
text (
"Hardware access (read/write) watchpoint ");
10051 tuple_name =
"hw-awpt";
10054 internal_error (_(
"Invalid hardware watchpoint type."));
10059 uiout->
text (
": ");
10081 internal_error (_(
"Invalid watchpoint type."));
10103 using watchpoint::watchpoint;
10167 switch (this->
type)
10188 internal_error (_(
"Invalid hardware watchpoint type."));
10192 uiout->
text (_(
"\n\
10193Check the underlying instruction at PC for the memory\n\
10194address and value which triggered this watchpoint.\n"));
10195 uiout->
text (
"\n");
10210 uiout->
text (
"\tmask ");
10212 uiout->
text (
"\n");
10222 const char *tuple_name;
10227 uiout->
text (
"Masked hardware watchpoint ");
10228 tuple_name =
"wpt";
10231 uiout->
text (
"Masked hardware read watchpoint ");
10232 tuple_name =
"hw-rwpt";
10235 uiout->
text (
"Masked hardware access (read/write) watchpoint ");
10236 tuple_name =
"hw-awpt";
10239 internal_error (_(
"Invalid hardware watchpoint type."));
10244 uiout->
text (
": ");
10266 internal_error (_(
"Invalid hardware watchpoint type."));
10287 bool just_location,
bool internal)
10290 const struct block *exp_valid_block = NULL, *cond_exp_valid_block = NULL;
10291 struct value *result;
10292 int saved_bitpos = 0, saved_bitsize = 0;
10293 const char *exp_start = NULL;
10294 const char *exp_end = NULL;
10295 const char *tok, *end_tok;
10297 const char *cond_start = NULL;
10298 const char *cond_end = NULL;
10304 bool use_mask =
false;
10305 CORE_ADDR mask = 0;
10309 if (arg != NULL && arg[0] !=
'\0')
10311 const char *value_start;
10313 exp_end = arg + strlen (arg);
10317 for (tok = exp_end - 1; tok > arg; tok--)
10320 while (tok > arg && (*tok ==
' ' || *tok ==
'\t'))
10325 while (tok > arg && (*tok !=
' ' && *tok !=
'\t'))
10327 value_start = tok + 1;
10330 while (tok > arg && (*tok ==
' ' || *tok ==
'\t'))
10337 while (tok > arg && (*tok !=
' ' && *tok !=
'\t'))
10340 toklen = end_tok - tok + 1;
10342 if (toklen == 6 && startswith (tok,
"thread"))
10351 error(_(
"You can specify only one thread."));
10354 error (_(
"You can specify only one of thread or task."));
10357 error (_(
"You can specify only one of inferior or thread."));
10361 if (value_start == endp)
10362 error (_(
"Junk after thread keyword."));
10366 else if (toklen == 4 && startswith (tok,
"task"))
10371 error(_(
"You can specify only one task."));
10374 error (_(
"You can specify only one of thread or task."));
10377 error (_(
"You can specify only one of inferior or task."));
10379 task = strtol (value_start, &tmp, 0);
10380 if (tmp == value_start)
10381 error (_(
"Junk after task keyword."));
10383 error (_(
"Unknown task %d."), task);
10385 else if (toklen == 8 && startswith (tok,
"inferior"))
10388 error (_(
"Cannot use 'inferior' keyword with watchpoints"));
10390 else if (toklen == 4 && startswith (tok,
"mask"))
10395 struct value *mask_value;
10398 error(_(
"You can specify only one mask."));
10400 use_mask = just_location =
true;
10421 std::string
expression (arg, exp_end - arg);
10429 while (exp_end > exp_start && (exp_end[-1] ==
' ' || exp_end[-1] ==
'\t'))
10437 len = exp_end - exp_start;
10438 while (len > 0 && isspace (exp_start[len - 1]))
10440 error (_(
"Cannot watch constant value `%.*s'."), len, exp_start);
10443 exp_valid_block = tracker.
block ();
10445 struct value *val_as_value =
nullptr;
10449 if (val_as_value != NULL && just_location)
10451 saved_bitpos = val_as_value->
bitpos ();
10452 saved_bitsize = val_as_value->
bitsize ();
10460 exp_valid_block = NULL;
10469 error (_(
"This target does not support masked watchpoints."));
10470 else if (ret == -2)
10471 error (_(
"Invalid mask or memory region."));
10474 else if (val_as_value != NULL)
10477 tok = skip_spaces (arg);
10478 end_tok = skip_to_space (tok);
10480 toklen = end_tok - tok;
10481 if (toklen >= 1 && strncmp (tok,
"if", toklen) == 0)
10483 tok = cond_start = end_tok + 1;
10489 cond_exp_valid_block = if_tracker.
block ();
10494 error (_(
"Junk at end of command."));
10506 if (exp_valid_block != NULL && wp_frame != NULL)
10528 scope_breakpoint->
frame_id = caller_frame_id;
10533 loc.requested_address = caller_pc;
10536 scope_breakpoint->
type,
10546 if (accessflag == hw_read)
10548 else if (accessflag == hw_access)
10553 std::unique_ptr<watchpoint> w;
10560 gdb_assert (thread == -1 || task == -1);
10561 w->thread = thread;
10566 w->exp = std::move (exp);
10567 w->exp_valid_block = exp_valid_block;
10568 w->cond_exp_valid_block = cond_exp_valid_block;
10571 struct type *t = val->type ();
10574 w->exp_string_reparse
10577 w->exp_string = xstrprintf (
"-location %.*s",
10578 (
int) (exp_end - exp_start), exp_start);
10581 w->exp_string.reset (savestring (exp_start, exp_end - exp_start));
10585 w->hw_wp_mask = mask;
10590 w->val_bitpos = saved_bitpos;
10591 w->val_bitsize = saved_bitsize;
10592 w->val_valid =
true;
10596 w->cond_string.reset (savestring (cond_start, cond_end - cond_start));
10598 w->cond_string = 0;
10602 w->watchpoint_frame = watchpoint_frame;
10608 w->watchpoint_thread = null_ptid;
10611 if (scope_breakpoint != NULL)
10615 w->related_breakpoint = scope_breakpoint;
10619 if (!just_location)
10635 int found_memory_cnt = 0;
10641 gdb_assert (!vals.empty ());
10642 struct value *head = vals[0].get ();
10665 struct value *v = iter.get ();
10669 if (v != head && v->
lazy ())
10686 || (vtype->
code () != TYPE_CODE_STRUCT
10687 && vtype->
code () != TYPE_CODE_ARRAY))
10689 CORE_ADDR vaddr = v->
address ();
10701 found_memory_cnt += num_regs;
10713 return found_memory_cnt;
10747This evaluates EXPRESSION and watches the memory to which is refers.\n\
10748-l can be used as a short form of -location."),
10771 if (arg !=
nullptr && *arg ==
'\0')
10781 const char *text,
const char * )
10857 bp.get ()) != NULL)
10890 struct gdbarch *frame_gdbarch;
10903 std::vector<symtab_and_line> sals
10912 error (_(
"Couldn't get information on specified line."));
10915 error (_(
"Junk at end of arguments."));
10933 std::vector<breakpoint_up> breakpoints;
10935 gdb::optional<delete_longjmp_breakpoint_cleanup> lj_deleter;
10940 struct gdbarch *caller_gdbarch;
10949 breakpoints.emplace_back (std::move (caller_breakpoint));
10952 lj_deleter.emplace (thread);
10971 breakpoints.emplace_back (std::move (location_breakpoint));
10975 (std::unique_ptr<thread_fsm>
10977 std::move (breakpoints))));
10980 lj_deleter->release ();
10982 proceed (-1, GDB_SIGNAL_DEFAULT);
10992 uintptr_t ua = (uintptr_t) a;
10993 uintptr_t ub = (uintptr_t) b;
11004 return ua > ub ? 1 : 0;
11014 std::vector<symtab_and_line> decoded_sals;
11016 gdb::array_view<symtab_and_line> sals;
11024 sals = decoded_sals;
11032 if (last_sal.
symtab == 0)
11033 error (_(
"No source file specified."));
11061 std::vector<struct breakpoint *> found;
11062 for (
const auto &sal : sals)
11064 const char *sal_fullname;
11078 sal_fullname = (sal.symtab == NULL
11093 int pc_match = (!sal.explicit_line
11095 && (
loc.pspace == sal.pspace)
11096 && (
loc.address == sal.pc)
11098 ||
loc.section == sal.section));
11099 int line_match = 0;
11101 if ((default_match || sal.explicit_line)
11102 &&
loc.symtab != NULL
11103 && sal_fullname != NULL
11104 && sal.pspace ==
loc.pspace
11105 &&
loc.line_number == sal.line
11107 sal_fullname) == 0)
11110 if (pc_match || line_match)
11119 found.push_back (&b);
11124 if (found.empty ())
11127 error (_(
"No breakpoint at %s."), arg);
11129 error (_(
"No breakpoint at this line."));
11133 std::sort (found.begin (), found.end (),
11136 return compare_breakpoints (bp_a, bp_b) < 0;
11138 found.erase (std::unique (found.begin (), found.end (),
11141 return compare_breakpoints (bp_a, bp_b) == 0;
11145 if (found.size () > 1)
11149 if (found.size () == 1)
11172 for (; bs; bs = bs->
next)
11240 CORE_ADDR start, end, addr;
11246 end = start + bl->target_info.shadow_len;
11248 gdb_assert (bl->address >= start);
11249 addr = bl->address - start;
11255 gdb_assert (bl->address < end);
11256 addr = end - bl->address;
11267 enum tribool can_download_tracepoint = TRIBOOL_UNKNOWN;
11273 bool bp_location_downloaded =
false;
11280 if (can_download_tracepoint == TRIBOOL_UNKNOWN)
11283 can_download_tracepoint = TRIBOOL_TRUE;
11285 can_download_tracepoint = TRIBOOL_FALSE;
11288 if (can_download_tracepoint == TRIBOOL_FALSE)
11304 bp_location_downloaded =
true;
11307 tracepoint &t = gdb::checked_static_cast<tracepoint &> (b);
11309 if (bp_location_downloaded)
11319 const int left_inserted = left->
inserted;
11320 const int left_duplicate = left->
duplicate;
11348 CORE_ADDR address = 0;
11369 || pspace_num !=
loc->pspace->num)
11381 loc->cond_bytecode.reset ();
11397 CORE_ADDR last_addr = 0;
11399 int last_pspace_num = -1;
11417 std::vector<bp_location *> old_locations = std::move (
bp_locations);
11452 bool found_object =
false;
11454 bool keep_in_target =
false;
11455 bool removed =
false;
11463 for (
size_t loc2_i = loc_i;
11465 &&
bp_locations[loc2_i]->address == old_loc->address);
11473 && (last_addr != old_loc->address
11474 || last_pspace_num != old_loc->pspace->num))
11477 last_pspace_num = old_loc->pspace->num;
11481 found_object =
true;
11486 last_addr = old_loc->address;
11498 if (old_loc->inserted)
11507 keep_in_target =
true;
11523 for (
size_t loc2_i = loc_i;
11530 if (loc2 == old_loc)
11550 keep_in_target =
true;
11558 if (!keep_in_target)
11570 warning (_(
"error removing breakpoint %d at %s"),
11571 old_loc->owner->number,
11572 paddress (old_loc->gdbarch, old_loc->address));
11630 if (
inf->pspace == old_loc->pspace)
11632 proc_target =
inf->process_target ();
11635 if (proc_target !=
nullptr)
11636 old_loc->events_till_retirement
11639 old_loc->events_till_retirement = 1;
11640 old_loc->owner = NULL;
11646 old_loc->owner = NULL;
11662 bp_loc_first = NULL;
11663 wp_loc_first = NULL;
11664 awp_loc_first = NULL;
11665 rwp_loc_first = NULL;
11687 loc_first_p = &wp_loc_first;
11689 loc_first_p = &rwp_loc_first;
11691 loc_first_p = &awp_loc_first;
11693 loc_first_p = &bp_loc_first;
11695 if (*loc_first_p == NULL
11699 *loc_first_p =
loc;
11704 loc->needs_update = 1;
11717 loc->duplicate = 1;
11749 if (--(
loc->events_till_retirement) == 0)
11766 catch (
const gdb_exception_error &e)
11778 for (bs = bps; bs; bs = bs->
next)
11844 const char *filename
11884 gdb_assert (
loc.owner ==
this);
11885 gdb_assert (!
loc.is_linked ());
11891 { return left.address < right.address; });
11900 gdb_assert (
loc.owner ==
this);
11901 gdb_assert (
loc.is_linked ());
11906#define internal_error_pure_virtual_called() \
11907 gdb_assert_not_reached ("pure virtual function called")
11985 if (result == 0 && bl->
probe.
prob !=
nullptr)
12018 || ws.
sig () != GDB_SIGNAL_TRAP)
12084 uiout->
text (
"Temporary breakpoint ");
12086 uiout->
text (
"Breakpoint ");
12088 uiout->
text (
", ");
12109 gdb_printf (_(
" at gnu-indirect-function resolver"));
12135 internal_error (_(
"unhandled breakpoint type %d"), (
int)
type);
12147std::vector<symtab_and_line>
12161 gdb_assert (canonical.
lsals.size () < 2);
12163 if (!canonical.
lsals.empty ())
12166 return std::move (lsal.
sals);
12229 gdb_printf (_(
"Thread Event Breakpoint: gdb should not stop!\n"));
12234 gdb_printf (_(
"Overlay Event Breakpoint: gdb should not stop!\n"));
12239 gdb_printf (_(
"Longjmp Master Breakpoint: gdb should not stop!\n"));
12244 gdb_printf (_(
"std::terminate Master Breakpoint: "
12245 "gdb should not stop!\n"));
12250 gdb_printf (_(
"Exception Master Breakpoint: "
12251 "gdb should not stop!\n"));
12315 canonical->lsals.push_back (std::move (lsal));
12318static std::vector<symtab_and_line>
12323 std::vector<symtab_and_line>
sals
12326 error (_(
"probe not found"));
12348 uiout->
message (
"\tmarker id is %pF\n",
12376 internal_error (_(
"unhandled tracepoint type %d"), (
int)
type);
12393 internal_error (_(
"unhandled tracepoint type %d"), (
int)
type);
12466 gdb_assert (cmds !=
nullptr);
12478 const char *arg_start, *arg;
12483 std::string str (arg_start, arg - arg_start);
12484 const char *ptr = str.c_str ();
12489 canonical->lsals.push_back (std::move (lsal));
12495 gdb::unique_xmalloc_ptr<char> cond_string,
12496 gdb::unique_xmalloc_ptr<char> extra_string,
12497 enum bptype type_wanted,
12498 enum bpdisp disposition,
12502 int from_tty,
int enabled,
12503 int internal,
unsigned flags)
12514 for (
size_t i = 0; i < lsal.
sals.size (); i++)
12518 std::unique_ptr<tracepoint> tp
12522 std::move (locspec),
12524 std::move (cond_string),
12525 std::move (extra_string),
12527 thread, task,
inferior, ignore_count,
12528 from_tty, enabled,
flags,
12537 tp->static_trace_marker_id_idx = i;
12543std::vector<symtab_and_line>
12588 gdb_assert (bpt != NULL);
12619 w = gdb::checked_static_cast<watchpoint *> (bpt);
12676 gdb::function_view<
void (
breakpoint *)> function)
12688 if (next == related)
12691 function (related);
12699 function (related);
12703 while (related != b);
12713 int breaks_to_delete = 0;
12721 breaks_to_delete = 1;
12727 || (breaks_to_delete &&
query (_(
"Delete all breakpoints? "))))
12750 && !
loc.shlib_disabled
12751 && !
loc.pspace->executing_startup)
12763 htab_up htab (htab_create_alloc (13, htab_hash_string, htab_eq_string, NULL,
12769 const char *
name = l.function_name.get ();
12775 slot = (
const char **) htab_find_slot (htab.get (), (
const void *)
name,
12832 if (tp->static_trace_marker_id != marker.
str_id)
12833 warning (_(
"static tracepoint %d changed probed marker from %s to %s"),
12834 tp->number, tp->static_trace_marker_id.c_str (),
12835 marker.
str_id.c_str ());
12837 tp->static_trace_marker_id = std::move (marker.
str_id);
12844 if (!sal.explicit_pc
12846 && sal.symtab != NULL
12847 && !tp->static_trace_marker_id.empty ())
12849 std::vector<static_tracepoint_marker> markers
12851 (tp->static_trace_marker_id.c_str ());
12853 if (!markers.empty ())
12859 tpmarker = &markers[0];
12861 tp->static_trace_marker_id = std::move (tpmarker->
str_id);
12863 warning (_(
"marker for static tracepoint %d (%s) not "
12864 "found at previous line number"),
12865 tp->number, tp->static_trace_marker_id.c_str ());
12869 uiout->
text (
"Now in ");
12874 uiout->
text (
" at ");
12889 uiout->
text (
"\n");
12891 tp->first_loc ().line_number = sal2.
line;
12892 tp->first_loc ().
symtab = sym != NULL ? sal2.
symtab : NULL;
12894 std::unique_ptr<explicit_location_spec> els
12896 els->source_filename
12898 els->line_offset.offset = tp->first_loc ().line_number;
12901 tp->locspec = std::move (els);
12916 auto a_iter = a.begin ();
12917 auto b_iter = b.begin ();
12919 for (; a_iter != a.end () && b_iter != b.end (); ++a_iter, ++b_iter)
12921 if (a_iter->address != b_iter->address)
12924 if (a_iter->shlib_disabled != b_iter->shlib_disabled)
12927 if (a_iter->enabled != b_iter->enabled)
12930 if (a_iter->disabled_by_cond != b_iter->disabled_by_cond)
12934 return (a_iter == a.end ()) == (b_iter == b.end ());
12949 if (it->pspace ==
pspace)
12953 ret.push_back (
loc);
12971 gdb::array_view<const symtab_and_line> sals,
12972 gdb::array_view<const symtab_and_line> sals_end)
12974 if (!sals_end.empty () && (sals.size () != 1 || sals_end.size () != 1))
12980 _(
"Could not reset ranged breakpoint %d: "
12981 "multiple locations found\n"),
12997 for (
const auto &sal : sals)
13018 catch (
const gdb_exception_error &e)
13024 if (!sals_end.empty ())
13028 new_loc->
length = end - sals[0].pc + 1;
13044 if ((!e.enabled || e.disabled_by_cond) && e.function_name)
13046 if (have_ambiguous_names)
13059 l.enabled = e.enabled;
13060 l.disabled_by_cond = e.disabled_by_cond;
13068 if (l.function_name
13069 && strcmp (e.function_name.get (),
13070 l.function_name.get ()) == 0)
13072 l.enabled = e.enabled;
13073 l.disabled_by_cond = e.disabled_by_cond;
13088std::vector<symtab_and_line>
13093 struct gdb_exception exception;
13095 std::vector<symtab_and_line> sals;
13101 catch (gdb_exception_error &e)
13103 int not_found_and_ok =
false;
13112 if (e.error == NOT_FOUND_ERROR
13114 || (this->has_locations ()
13115 && search_pspace != NULL
13116 && this->first_loc ().pspace != search_pspace)
13117 || (this->has_locations () && this->first_loc ().shlib_disabled)
13118 || (this->has_locations ()
13119 && this->first_loc ().pspace->executing_startup)
13121 not_found_and_ok =
true;
13123 if (!not_found_and_ok)
13135 exception = std::move (e);
13138 if (exception.reason == 0 || exception.error != NOT_FOUND_ERROR)
13140 for (
auto &sal : sals)
13144 gdb::unique_xmalloc_ptr<char> local_cond, local_extra;
13145 int local_thread, local_task, local_inferior;
13148 &local_cond, &local_thread,
13150 &local_task, &local_extra);
13152 if (local_cond !=
nullptr)
13156 if (local_extra !=
nullptr)
13163 tracepoint *t = gdb::checked_static_cast<tracepoint *> (
this);
13183 std::vector<symtab_and_line> expanded, expanded_end;
13190 expanded = std::move (sals);
13194 std::vector<symtab_and_line> sals_end
13196 filter_pspace, &found);
13198 expanded_end = std::move (sals_end);
13233 scoped_restore save_input_radix = make_scoped_restore (&
input_radix);
13246 scoped_restore save_language_mode = make_scoped_restore (&
language_mode);
13260 catch (
const gdb_exception &ex)
13263 "Error in re-setting breakpoint %d: ",
13314 if (from_tty && count != 0)
13315 gdb_printf (_(
"Ignore count ignored for tracepoint %d."),
13325 "breakpoint %d is reached."),
13327 else if (count == 1)
13328 gdb_printf (_(
"Will ignore next crossing of breakpoint %d."),
13332 "crossings of breakpoint %d."),
13339 error (_(
"No breakpoint number %d."), bptnum);
13347 const char *p = args;
13355 error (_(
"bad breakpoint number: '%s'"), args);
13357 error (_(
"Second argument (specified ignore-count) is missing."));
13372 gdb::function_view<
void (
breakpoint *)> function)
13374 if (bp_num_range.first == 0)
13376 warning (_(
"bad breakpoint number at or near '%d'"),
13377 bp_num_range.first);
13381 for (
int i = bp_num_range.first; i <= bp_num_range.second; i++)
13383 bool match =
false;
13393 gdb_printf (_(
"No breakpoint number %d.\n"), i);
13403 gdb::function_view<
void (
breakpoint *)> function)
13405 if (args == NULL || *args ==
'\0')
13425 if (!b || b->
number != bp_num)
13426 error (_(
"Bad breakpoint number '%d'"), bp_num);
13429 error (_(
"Bad breakpoint location number '%d'"), loc_num);
13433 if (++n == loc_num)
13436 error (_(
"Bad breakpoint location number '%d'"), loc_num);
13457 int trailer,
const char **end_out = NULL)
13459 const char *end = start;
13463 ? _(
"Negative breakpoint number '%.*s'")
13464 : _(
"Negative breakpoint location number '%.*s'"),
13465 int (end - start), start);
13468 ? _(
"Bad breakpoint number '%.*s'")
13469 : _(
"Bad breakpoint location number '%.*s'"),
13470 int (end - start), start);
13472 if (end_out != NULL)
13482static std::pair<int, int>
13484 const std::string &arg,
13485 std::string::size_type arg_offset)
13487 std::pair<int, int>
range;
13488 const char *bp_loc = &arg[arg_offset];
13489 std::string::size_type dash = arg.find (
'-', arg_offset);
13490 if (dash != std::string::npos)
13493 if (arg.length () == dash + 1)
13495 ? _(
"Bad breakpoint number at or near: '%s'")
13496 : _(
"Bad breakpoint location number at or near: '%s'"),
13500 const char *start_first = bp_loc;
13501 const char *start_second = &arg[dash + 1];
13507 ? _(
"Inverted breakpoint range at '%.*s'")
13508 : _(
"Inverted breakpoint location range at '%.*s'"),
13509 int (end - start_first), start_first);
13535 std::pair<int, int> &bp_num_range,
13536 std::pair<int, int> &bp_loc_range)
13538 std::string::size_type dot = arg.find (
'.');
13540 if (dot != std::string::npos)
13544 if (arg.length () == dot + 1 || dot == 0)
13545 error (_(
"Bad breakpoint number at or near: '%s'"), arg.c_str ());
13549 bp_num_range.second = bp_num_range.first;
13559 bp_loc_range.first = 0;
13560 bp_loc_range.second = 0;
13574 error (_(
"Breakpoint %d's condition is invalid at location %d, "
13575 "cannot enable."), bp_num, loc_num);
13598 if (
loc !=
nullptr &&
loc->owner !=
nullptr)
13618 if (
loc ==
nullptr)
13619 error (_(
"Breakpoint location is invalid."));
13621 if (
loc->owner ==
nullptr)
13622 error (_(
"Breakpoint location does not have an owner breakpoint."));
13628 error (_(
"Breakpoint location LOC_NUM could not be found."));
13630 error (_(
"Breakpoint %d's condition is invalid at location %d, "
13631 "cannot enable."),
loc->owner->number, loc_num);
13657 std::pair<int, int> &bp_loc_range,
13660 for (
int i = bp_loc_range.first; i <= bp_loc_range.second; i++)
13717 while (!num.empty ())
13719 std::pair<int, int> bp_num_range, bp_loc_range;
13723 if (bp_loc_range.first == bp_loc_range.second
13724 && (bp_loc_range.first == 0
13725 || (bp_loc_range.first == 1
13726 && bp_num_range.first == bp_num_range.second
13741 (bp_num_range.first, bp_loc_range,
enable);
13763 int target_resources_ok;
13769 target_resources_ok =
13772 if (target_resources_ok == 0)
13773 error (_(
"No hardware breakpoint support in the target."));
13774 else if (target_resources_ok < 0)
13775 error (_(
"Hardware breakpoints used exceeds limit."));
13785 watchpoint *w = gdb::checked_static_cast<watchpoint *> (bpt);
13791 catch (
const gdb_exception_error &e)
13892 CORE_ADDR addr, ssize_t len,
13893 const bfd_byte *data)
13899 watchpoint &wp = gdb::checked_static_cast<watchpoint &> (
bp);
13905 &&
loc.address +
loc.length > addr
13906 && addr + len >
loc.address)
13924 CORE_ADDR
pc = next_pc;
13928 std::unique_ptr<breakpoint> b
13944 = (gdb::checked_static_cast<momentary_breakpoint *>
13946 ss_bp->add_location (sal);
13957 std::vector<CORE_ADDR> next_pcs;
13961 if (!next_pcs.empty ())
13966 for (CORE_ADDR pc : next_pcs)
14022 (locspec.get (),
true );
14026 NULL, -1, -1, arg,
false, 1 ,
14044 NULL, -1, -1, arg,
false, 1 ,
14066 if (arg && startswith (arg,
"-m") && isspace (arg[2]))
14082 NULL, -1, -1, arg,
false, 1 ,
14102 char *rslt =
nullptr;
14122 const char *addr_str;
14123 char small_buf[100];
14134 warning (_(
"Uploaded tracepoint %d has no "
14135 "source location, using raw address"),
14137 xsnprintf (small_buf,
sizeof (small_buf),
"*%s", hex_string (utp->
addr));
14138 addr_str = small_buf;
14143 warning (_(
"Uploaded tracepoint %d condition "
14144 "has no source form, ignoring it"),
14167 gdb_assert (tp != NULL);
14171 xsnprintf (small_buf,
sizeof (small_buf),
"%d %d", utp->
pass,
14192 else if (!utp->
actions.empty ()
14194 warning (_(
"Uploaded tracepoint %d actions "
14195 "have no source form, ignoring them"),
14216 if (num_printed == 0)
14218 if (args == NULL || *args ==
'\0')
14219 uiout->
message (
"No tracepoints.\n");
14221 uiout->
message (
"No tracepoint matching '%s'.\n", args);
14251 int breaks_to_delete = 0;
14260 breaks_to_delete = 1;
14266 || (breaks_to_delete &&
query (_(
"Delete all tracepoints? "))))
14289 gdb_printf (_(
"Setting tracepoint %d's passcount to %d\n"),
14304 if (args == 0 || *args == 0)
14305 error (_(
"passcount command requires an "
14306 "argument (count + optional TP num)"));
14308 count = strtoulst (args, &args, 10);
14310 args = skip_spaces (args);
14311 if (*args && strncasecmp (args,
"all", 3) == 0)
14315 error (_(
"Junk at end of arguments."));
14319 tracepoint &t1 = gdb::checked_static_cast<tracepoint &> (b);
14323 else if (*args ==
'\0')
14345 if (t.number == num)
14346 return gdb::checked_static_cast<tracepoint *> (&t);
14360 tracepoint &t = gdb::checked_static_cast<tracepoint &> (b);
14379 const char *instring = arg == NULL ? NULL : *arg;
14381 if (parser != NULL)
14383 gdb_assert (!parser->
finished ());
14386 else if (arg == NULL || *arg == NULL || ! **arg)
14393 if (instring && *instring)
14394 gdb_printf (_(
"bad tracepoint number at or near '%s'\n"),
14402 if (t.number == tpnum)
14403 return gdb::checked_static_cast<tracepoint *> (&t);
14405 gdb_printf (
"No tracepoint number %d.\n", tpnum);
14434 int extra_trace_bits = 0;
14436 if (filename == 0 || *filename == 0)
14437 error (_(
"Argument required (file name in which to save)"));
14447 if (filter && !filter (&tp))
14454 extra_trace_bits = 1;
14463 warning (_(
"Nothing to save."));
14467 gdb::unique_xmalloc_ptr<char> expanded_filename (tilde_expand (filename));
14471 if (!fp.
open (expanded_filename.get (),
"w"))
14472 error (_(
"Unable to open file '%s' for saving (%s)"),
14473 expanded_filename.get (), safe_strerror (errno));
14475 if (extra_trace_bits)
14485 if (filter && !filter (&tp))
14488 tp.print_recreate (&fp);
14494 if (tp.cond_string)
14495 fp.
printf (
" condition $bpnum %s\n", tp.cond_string.get ());
14497 if (tp.ignore_count)
14498 fp.
printf (
" ignore $bpnum %d\n", tp.ignore_count);
14502 fp.
puts (
" commands\n");
14507 fp.
puts (
" end\n");
14511 fp.
puts (
"disable $bpnum\n");
14523 fp.
printf (
"disable $bpnum.%d\n", n);
14534 gdb_printf (_(
"Saved to file '%s'.\n"), expanded_filename.get ());
14557#define LOCATION_SPEC_HELP_STRING \
14558"Linespecs are colon-separated lists of location parameters, such as\n\
14559source filename, function name, label name, and line number.\n\
14560Example: To specify the start of a label named \"the_top\" in the\n\
14561function \"fact\" in the file \"factorial.c\", use\n\
14562\"factorial.c:fact:the_top\".\n\
14564Address locations begin with \"*\" and specify an exact address in the\n\
14565program. Example: To specify the fourth byte past the start function\n\
14566\"main\", use \"*main + 4\".\n\
14568Explicit locations are similar to linespecs but use an option/argument\n\
14569syntax to specify location parameters.\n\
14570Example: To specify the start of the label named \"the_top\" in the\n\
14571function \"fact\" in the file \"factorial.c\", use \"-source factorial.c\n\
14572-function fact -label the_top\".\n\
14574By default, a specified function is matched against the program's\n\
14575functions in all scopes. For C++, this means in all namespaces and\n\
14576classes. For Ada, this means in all packages. E.g., in C++,\n\
14577\"func()\" matches \"A::func()\", \"A::B::func()\", etc. The\n\
14578\"-qualified\" flag overrides this behavior, making GDB interpret the\n\
14579specified name as a complete fully-qualified name instead."
14586#define BREAK_ARGS_HELP(command) \
14587command" [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]\n\
14588\t[-force-condition] [if CONDITION]\n\
14589PROBE_MODIFIER shall be present if the command is to be placed in a\n\
14590probe point. Accepted values are `-probe' (for a generic, automatically\n\
14591guessed probe type), `-probe-stap' (for a SystemTap probe) or \n\
14592`-probe-dtrace' (for a DTrace probe).\n\
14593LOCATION may be a linespec, address, or explicit location as described\n\
14596With no LOCATION, uses current execution address of the selected\n\
14597stack frame. This is useful for breaking on return to a stack frame.\n\
14599THREADNUM is the number from \"info threads\".\n\
14600CONDITION is a boolean expression.\n\
14602With the \"-force-condition\" flag, the condition is defined even when\n\
14603it is invalid for all current locations.\n\
14604\n" LOCATION_SPEC_HELP_STRING "\n\n\
14605Multiple breakpoints at one place are permitted, and useful if their\n\
14606conditions are different.\n\
14608Do \"help breakpoints\" for info on other commands dealing with breakpoints."
14620 void *user_data_catch,
14621 void *user_data_tcatch)
14663 if (!bl.shlib_disabled
14678 if (
loc->symtab != NULL &&
loc->symtab->compunit ()->objfile () ==
objfile)
14679 loc->symtab = NULL;
14710Set ignore-count of breakpoint number N to COUNT.\n\
14711Usage is `ignore N COUNT'."));
14715Set commands to be executed when the given breakpoints are hit.\n\
14716Give a space-separated breakpoint list as argument after \"commands\".\n\
14717A list element can be a breakpoint number (e.g. `5') or a range of numbers\n\
14719With no argument, the targeted breakpoint is the last one set.\n\
14720The commands themselves follow starting on the next line.\n\
14721Type a line containing \"end\" to indicate the end of them.\n\
14722Give \"silent\" as the first line to make the breakpoint silent;\n\
14723then no output is printed when it is hit, except what the commands print."));
14726 static std::string condition_command_help
14728Specify breakpoint number N to break only if COND is true.\n\
14729Usage is `condition [OPTION] N COND', where N is an integer and COND\n\
14730is an expression to be evaluated whenever breakpoint N is reached.\n\
14733%OPTIONS%"), cc_opts);
14736 condition_command_help.c_str ());
14740Set a temporary breakpoint.\n\
14741Like \"break\" except the breakpoint is only temporary,\n\
14742so it will be deleted when hit. Equivalent to \"break\" followed\n\
14743by using \"enable delete\" on the breakpoint number.\n\
14749Set a hardware assisted breakpoint.\n\
14750Like \"break\" except the breakpoint requires hardware support,\n\
14751some target hardware may not have this support.\n\
14757Set a temporary hardware assisted breakpoint.\n\
14758Like \"hbreak\" except the breakpoint is only temporary,\n\
14759so it will be deleted when hit.\n\
14766Enable all or some breakpoints.\n\
14767Usage: enable [BREAKPOINTNUM]...\n\
14768Give breakpoint numbers (separated by spaces) as arguments.\n\
14769With no subcommand, breakpoints are enabled until you command otherwise.\n\
14770This is used to cancel the effect of the \"disable\" command.\n\
14771With a subcommand you can enable temporarily."),
14777Enable all or some breakpoints.\n\
14778Usage: enable breakpoints [BREAKPOINTNUM]...\n\
14779Give breakpoint numbers (separated by spaces) as arguments.\n\
14780This is used to cancel the effect of the \"disable\" command.\n\
14781May be abbreviated to simply \"enable\"."),
14785Enable some breakpoints for one hit.\n\
14786Usage: enable breakpoints once BREAKPOINTNUM...\n\
14787If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
14791Enable some breakpoints and delete when hit.\n\
14792Usage: enable breakpoints delete BREAKPOINTNUM...\n\
14793If a breakpoint is hit while enabled in this fashion, it is deleted."),
14797Enable some breakpoints for COUNT hits.\n\
14798Usage: enable breakpoints count COUNT BREAKPOINTNUM...\n\
14799If a breakpoint is hit while enabled in this fashion,\n\
14800the count is decremented; when it reaches zero, the breakpoint is disabled."),
14804Enable some breakpoints and delete when hit.\n\
14805Usage: enable delete BREAKPOINTNUM...\n\
14806If a breakpoint is hit while enabled in this fashion, it is deleted."),
14810Enable some breakpoints for one hit.\n\
14811Usage: enable once BREAKPOINTNUM...\n\
14812If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
14816Enable some breakpoints for COUNT hits.\n\
14817Usage: enable count COUNT BREAKPOINTNUM...\n\
14818If a breakpoint is hit while enabled in this fashion,\n\
14819the count is decremented; when it reaches zero, the breakpoint is disabled."),
14824Disable all or some breakpoints.\n\
14825Usage: disable [BREAKPOINTNUM]...\n\
14826Arguments are breakpoint numbers with spaces in between.\n\
14827To disable all breakpoints, give no argument.\n\
14828A disabled breakpoint is not forgotten, but has no effect until re-enabled."),
14834Disable all or some breakpoints.\n\
14835Usage: disable breakpoints [BREAKPOINTNUM]...\n\
14836Arguments are breakpoint numbers with spaces in between.\n\
14837To disable all breakpoints, give no argument.\n\
14838A disabled breakpoint is not forgotten, but has no effect until re-enabled.\n\
14839This command may be abbreviated \"disable\"."),
14844Delete all or some breakpoints.\n\
14845Usage: delete [BREAKPOINTNUM]...\n\
14846Arguments are breakpoint numbers with spaces in between.\n\
14847To delete all breakpoints, give no argument.\n\
14849Also a prefix command for deletion of other GDB objects."),
14855Delete all or some breakpoints or auto-display expressions.\n\
14856Usage: delete breakpoints [BREAKPOINTNUM]...\n\
14857Arguments are breakpoint numbers with spaces in between.\n\
14858To delete all breakpoints, give no argument.\n\
14859This command may be abbreviated \"delete\"."),
14864Clear breakpoint at specified location.\n\
14865Argument may be a linespec, explicit, or address location as described below.\n\
14867With no argument, clears all breakpoints in the line that the selected frame\n\
14870See also the \"delete\" command which clears breakpoints by number."));
14875Set breakpoint at specified location.\n"
14886Status of specified breakpoints (all user-settable breakpoints if no argument).\n\
14887The \"Type\" column indicates one of:\n\
14888\tbreakpoint - normal breakpoint\n\
14889\twatchpoint - watchpoint\n\
14890The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
14891the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
14892breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
14893address and file/line number respectively.\n\
14895Convenience variable \"$_\" and default examine address for \"x\"\n\
14896are set to the address of the last breakpoint listed unless the command\n\
14897is prefixed with \"server \".\n\n\
14898Convenience variable \"$bpnum\" contains the number of the last\n\
14904Status of all breakpoints, or breakpoint number NUMBER.\n\
14905The \"Type\" column indicates one of:\n\
14906\tbreakpoint - normal breakpoint\n\
14907\twatchpoint - watchpoint\n\
14908\tlongjmp - internal breakpoint used to step through longjmp()\n\
14909\tlongjmp resume - internal breakpoint at the target of longjmp()\n\
14910\tuntil - internal breakpoint used by the \"until\" command\n\
14911\tfinish - internal breakpoint used by the \"finish\" command\n\
14912The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
14913the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
14914breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
14915address and file/line number respectively.\n\
14917Convenience variable \"$_\" and default examine address for \"x\"\n\
14918are set to the address of the last breakpoint listed unless the command\n\
14919is prefixed with \"server \".\n\n\
14920Convenience variable \"$bpnum\" contains the number of the last\n\
14925Set catchpoints to catch events."),
14930Set temporary catchpoints to catch events."),
14937Set a watchpoint for EXPRESSION.\n\
14938Usage: watch [-location] EXPRESSION\n\
14943A watchpoint stops execution of your program whenever the value of\n\
14944an expression changes."), opts);
14946 watch_help.c_str ());
14950Set a read watchpoint for EXPRESSION.\n\
14951Usage: rwatch [-location] EXPRESSION\n\
14956A read watchpoint stops execution of your program whenever the value of\n\
14957an expression is read."), opts);
14959 rwatch_help.c_str ());
14963Set an access watchpoint for EXPRESSION.\n\
14964Usage: awatch [-location] EXPRESSION\n\
14969An access watchpoint stops execution of your program whenever the value\n\
14970of an expression is either read or written."), opts);
14972 awatch_help.c_str ());
14976Status of specified watchpoints (all watchpoints if no argument)."));
14982Set debugger's willingness to use watchpoint hardware."), _(
"\
14983Show debugger's willingness to use watchpoint hardware."), _(
"\
14984If zero, gdb will not use hardware for new watchpoints, even if\n\
14985such is available. (However, any hardware watchpoints that were\n\
14986created before setting this to nonzero, will continue to use watchpoint\n\
14998Set a tracepoint at specified location.\n\
15001Do \"help tracepoints\" for info on other tracepoint commands."));
15010Set a fast tracepoint at specified location.\n\
15013Do \"help tracepoints\" for info on other tracepoint commands."));
15017Set a static tracepoint at location or marker.\n\
15019strace [LOCATION] [if CONDITION]\n\
15020LOCATION may be a linespec, explicit, or address location (described below) \n\
15021or -m MARKER_ID.\n\n\
15022If a marker id is specified, probe the marker with that name. With\n\
15023no LOCATION, uses current execution address of the selected stack frame.\n\
15024Static tracepoints accept an extra collect action -- ``collect $_sdata''.\n\
15025This collects arbitrary user data passed in the probe point call to the\n\
15026tracing library. You can inspect it when analyzing the trace buffer,\n\
15027by printing the $_sdata variable like any other convenience variable.\n\
15029CONDITION is a boolean expression.\n\
15031Multiple tracepoints at one place are permitted, and useful if their\n\
15032conditions are different.\n\
15034Do \"help breakpoints\" for info on other commands dealing with breakpoints.\n\
15035Do \"help tracepoints\" for info on other tracepoint commands."));
15040Status of specified tracepoints (all tracepoints if no argument).\n\
15041Convenience variable \"$tpnum\" contains the number of the\n\
15042last tracepoint set."));
15048Delete specified tracepoints.\n\
15049Arguments are tracepoint numbers, separated by spaces.\n\
15050No argument means delete all tracepoints."),
15055Disable specified tracepoints.\n\
15056Arguments are tracepoint numbers, separated by spaces.\n\
15057No argument means disable all tracepoints."),
15062Enable specified tracepoints.\n\
15063Arguments are tracepoint numbers, separated by spaces.\n\
15064No argument means enable all tracepoints."),
15069Set the passcount for a tracepoint.\n\
15070The trace will end when the tracepoint has been passed 'count' times.\n\
15071Usage: passcount COUNT TPNUM, where TPNUM may also be \"all\";\n\
15072if TPNUM is omitted, passcount refers to the last tracepoint defined."));
15075 _(
"Save breakpoint definitions as a script."),
15080Save current breakpoint definitions as a script.\n\
15081This includes all types of breakpoints (breakpoints, watchpoints,\n\
15082catchpoints, tracepoints). Use the 'source' command in another debug\n\
15083session to restore them."),
15089Save current tracepoint definitions as a script.\n\
15090Use the 'source' command in another debug session to restore them."),
15099Breakpoint specific settings.\n\
15100Configure various breakpoint-specific variables such as\n\
15101pending breakpoint behavior."),
15103Breakpoint specific settings.\n\
15104Configure various breakpoint-specific variables such as\n\
15105pending breakpoint behavior."),
15111Set debugger's behavior regarding pending breakpoints."), _(
"\
15112Show debugger's behavior regarding pending breakpoints."), _(
"\
15113If on, an unrecognized breakpoint location will cause gdb to create a\n\
15114pending breakpoint. If off, an unrecognized breakpoint location results in\n\
15115an error. If auto, an unrecognized breakpoint location results in a\n\
15116user-query to see if a pending breakpoint should be created."),
15126Set automatic usage of hardware breakpoints."), _(
"\
15127Show automatic usage of hardware breakpoints."), _(
"\
15128If set, the debugger will automatically use hardware breakpoints for\n\
15129breakpoints set with \"break\" but falling in read-only memory. If not set,\n\
15130a warning will be emitted for such breakpoints."),
15138Set mode for inserting breakpoints."), _(
"\
15139Show mode for inserting breakpoints."), _(
"\
15140When this mode is on, breakpoints are inserted immediately as soon as\n\
15141they're created, kept inserted even when execution stops, and removed\n\
15142only when the user deletes them. When this mode is off (the default),\n\
15143breakpoints are inserted only when execution continues, and removed\n\
15144when execution stops."),
15152Set breakpoint location debugging."), _(
"\
15153Show breakpoint location debugging."), _(
"\
15154When on, breakpoint location specific debugging is enabled."),
15162Set mode of breakpoint condition evaluation."), _(
"\
15163Show mode of breakpoint condition evaluation."), _(
"\
15164When this is set to \"host\", breakpoint conditions will be\n\
15165evaluated on the host's side by GDB. When it is set to \"target\",\n\
15166breakpoint conditions will be downloaded to the target (if the target\n\
15167supports such feature) and conditions will be evaluated on the target's side.\n\
15168If this is set to \"auto\" (default), this will be automatically set to\n\
15169\"target\" if it supports condition evaluation, otherwise it will\n\
15170be set to \"host\"."),
15177Set a breakpoint for an address range.\n\
15178break-range START-LOCATION, END-LOCATION\n\
15179where START-LOCATION and END-LOCATION can be one of the following:\n\
15180 LINENUM, for that line in the current file,\n\
15181 FILE:LINENUM, for that line in that file,\n\
15182 +OFFSET, for that number of lines after the current line\n\
15183 or the start of the range\n\
15184 FUNCTION, for the first line in that function,\n\
15185 FILE:FUNCTION, to distinguish among like-named static functions.\n\
15186 *ADDRESS, for the instruction at that address.\n\
15188The breakpoint will stop execution of the inferior whenever it executes\n\
15189an instruction at any address within the [START-LOCATION, END-LOCATION]\n\
15190range (including START-LOCATION and END-LOCATION)."));
15193Set a dynamic printf at specified location.\n\
15194dprintf location,format string,arg1,arg2,...\n\
15195location may be a linespec, explicit, or address location.\n"
15201Set the style of usage for dynamic printf."), _(
"\
15202Show the style of usage for dynamic printf."), _(
"\
15203This setting chooses how GDB will do a dynamic printf.\n\
15204If the value is \"gdb\", then the printing is done by GDB to its own\n\
15205console, as with the \"printf\" command.\n\
15206If the value is \"call\", the print is done by calling a function in your\n\
15207program; by default printf(), but you can choose a different function or\n\
15208output stream by setting dprintf-function and dprintf-channel."),
15214Set the function to use for dynamic printf."), _(
"\
15215Show the function to use for dynamic printf."), NULL,
15221Set the channel to use for dynamic printf."), _(
"\
15222Show the channel to use for dynamic printf."), NULL,
15228Set whether dprintf continues after GDB disconnects."), _(
"\
15229Show whether dprintf continues after GDB disconnects."), _(
"\
15230Use this to let dprintf commands continue to hit and produce output\n\
15231even if GDB disconnects or detaches from the target."),
15237Target agent only formatted printing, like the C \"printf\" function.\n\
15238Usage: agent-printf \"format string\", ARG1, ARG2, ARG3, ..., ARGN\n\
15239This supports most C printf format specifications, like %s, %d, etc.\n\
15240This is useful for formatted output in user-defined commands."));
bool is_ada_exception_catchpoint(breakpoint *bp)
int ada_get_task_number(thread_info *thread)
void * xcalloc(size_t number, size_t size)
void annotate_breakpoint(int num)
void annotate_record(void)
void annotate_watchpoint(int num)
void annotate_field(int num)
void annotate_breakpoints_table(void)
void annotate_breakpoints_headers(void)
void annotate_breakpoints_table_end(void)
struct gdbarch * get_current_arch(void)
struct gdbarch * target_gdbarch(void)
agent_expr_up gen_eval_for_expr(CORE_ADDR scope, struct expression *expr)
agent_expr_up gen_printf(CORE_ADDR scope, struct gdbarch *gdbarch, CORE_ADDR function, LONGEST channel, const char *format, int fmtlen, int nargs, struct expression **exprs)
std::unique_ptr< agent_expr > agent_expr_up
const struct blockvector * blockvector_for_pc_sect(CORE_ADDR pc, struct obj_section *section, const struct block **pblock, struct compunit_symtab *cust)
const struct block * block_for_pc(CORE_ADDR pc)
bool find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, const struct block **block)
struct symbol * get_frame_function(frame_info_ptr frame)
frame_info_ptr block_innermost_frame(const struct block *block)
bool is_exception_catchpoint(breakpoint *bp)
static void disable_breakpoints_in_unloaded_shlib(program_space *pspace, so_list *solib)
void enable_breakpoint(struct breakpoint *bpt)
static const char * bp_location_condition_evaluator(const struct bp_location *bl)
static std::vector< symtab_and_line > bkpt_probe_decode_location_spec(struct breakpoint *b, location_spec *locspec, struct program_space *search_pspace)
static const char * translate_condition_evaluation_mode(const char *mode)
static gdb::option::option_def_group make_condition_command_options_def_group(condition_command_opts *cc_opts)
static bool breakpoint_location_spec_empty_p(const struct breakpoint *b)
void breakpoint_program_space_exit(struct program_space *pspace)
static struct cmd_list_element * tcatch_cmdlist
void breakpoint_re_set(void)
static bool breakpoint_address_match_range(const address_space *aspace1, CORE_ADDR addr1, int len1, const address_space *aspace2, CORE_ADDR addr2)
static bool print_one_breakpoint_location(struct breakpoint *b, struct bp_location *loc, int loc_number, const bp_location **last_loc, int allflag, bool raw_loc)
static void break_command_1(const char *arg, int flag, int from_tty)
static void iterate_over_related_breakpoints(struct breakpoint *b, gdb::function_view< void(breakpoint *)> function)
void delete_breakpoint(struct breakpoint *bpt)
static void awatch_command(const char *arg, int from_tty)
static const char * dprintf_style
static std::unique_ptr< code_breakpoint > new_breakpoint_from_type(struct gdbarch *gdbarch, bptype type, Arg &&... args)
const std::vector< bp_location * > & all_bp_locations()
breakpoint_up set_momentary_breakpoint_at_pc(struct gdbarch *gdbarch, CORE_ADDR pc, enum bptype type)
static void hbreak_command(const char *arg, int from_tty)
static void create_longjmp_master_breakpoint(void)
static void one_breakpoint_xfer_memory(gdb_byte *readbuf, gdb_byte *writebuf, const gdb_byte *writebuf_org, ULONGEST memaddr, LONGEST len, struct bp_target_info *target_info, struct gdbarch *gdbarch)
static struct uploaded_tp * this_utp
static agent_expr_up parse_cond_to_aexpr(CORE_ADDR scope, struct expression *cond)
static void bp_locations_target_extensions_update(void)
void check_longjmp_breakpoint_for_call_dummy(struct thread_info *tp)
static const gdb::option::option_def condition_command_option_defs[]
static void info_tracepoints_command(const char *args, int from_tty)
static void info_watchpoints_command(const char *args, int from_tty)
static bool unduplicated_should_be_inserted(struct bp_location *bl)
void remove_solib_event_breakpoints_at_next_stop(void)
static void watchpoint_value_print(struct value *val, struct ui_file *stream)
static bool breakpoint_proceeded
void breakpoint_retire_moribund(void)
void enable_disable_bp_location(bp_location *loc, bool enable)
void breakpoint_init_inferior(enum inf_context context)
static int can_use_hardware_watchpoint(const std::vector< value_ref_ptr > &vals)
static const char * remove_bp_reason_str(remove_bp_reason reason)
static CORE_ADDR bp_locations_shadow_len_after_address_max
void breakpoint_set_thread(struct breakpoint *b, int thread)
static void show_pending_break_support(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void save_tracepoints_command(const char *args, int from_tty)
static void show_condition_evaluation_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct breakpoint * create_thread_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
static const char condition_evaluation_host[]
static bool locations_are_equal(const bp_location_list &a, const bp_location_range &b)
void remove_jit_event_breakpoints(void)
static void strace_command(const char *arg, int from_tty)
int software_breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
void breakpoint_set_inferior(struct breakpoint *b, int inferior)
struct breakpoint * get_breakpoint(int num)
static void mark_breakpoint_modified(struct breakpoint *b)
static const char * bptype_string(enum bptype type)
void until_break_command(const char *arg, int from_tty, int anywhere)
void bpstat_run_callbacks(bpstat *bs_head)
static struct value * extract_bitfield_from_watchpoint_value(struct watchpoint *w, struct value *val)
static void thbreak_command(const char *arg, int from_tty)
int hardware_watchpoint_inserted_in_range(const address_space *aspace, CORE_ADDR addr, ULONGEST len)
void breakpoint_re_set_thread(struct breakpoint *b)
static bool all_locations_are_pending(struct breakpoint *b, struct program_space *pspace)
static struct cmd_list_element * catch_cmdlist
struct breakpoint * create_solib_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
bool fix_breakpoint_script_output_globally
bool is_breakpoint(const struct breakpoint *bpt)
static void breakpoint_re_set_one(breakpoint *b)
static void bpstat_remove_bp_location(bpstat *bps, struct breakpoint *bpt)
static struct cmd_list_element * breakpoint_show_cmdlist
static agent_expr_up parse_cmd_to_aexpr(CORE_ADDR scope, char *cmd)
int remove_breakpoints(void)
static void commands_command(const char *arg, int from_tty)
static bool is_tracepoint_type(bptype type)
int breakpoints_should_be_inserted_now(void)
static void strace_marker_create_sals_from_location_spec(location_spec *locspec, struct linespec_result *canonical)
bool bpstat_should_step()
static const char * breakpoint_condition_evaluation_mode(void)
int detach_breakpoints(ptid_t ptid)
struct breakpoint * clone_momentary_breakpoint(struct breakpoint *orig)
static void enable_disable_breakpoint_location_range(int bp_num, std::pair< int, int > &bp_loc_range, bool enable)
static const char dprintf_style_call[]
static bool bp_loc_is_permanent(struct bp_location *loc)
static const char condition_evaluation_auto[]
static int breakpoint_1(const char *bp_num_list, bool show_internal, bool(*filter)(const struct breakpoint *))
int watchpoints_triggered(const target_waitstatus &ws)
static bool watchpoint_locations_match(const struct bp_location *loc1, const struct bp_location *loc2)
int moribund_breakpoint_here_p(const address_space *aspace, CORE_ADDR pc)
void watch_command_wrapper(const char *arg, int from_tty, bool internal)
static void ignore_command(const char *args, int from_tty)
void set_std_terminate_breakpoint(void)
static int bp_location_is_less_than(const bp_location *a, const bp_location *b)
static void create_std_terminate_master_breakpoint(void)
static void show_debug_breakpoint(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void add_catch_command(const char *name, const char *docstring, cmd_func_ftype *func, completer_ftype *completer, void *user_data_catch, void *user_data_tcatch)
static int remove_breakpoint_1(struct bp_location *, enum remove_bp_reason)
static struct minimal_symbol msym_not_found
static void build_target_condition_list(struct bp_location *bl)
static bool breakpoint_has_pc(struct breakpoint *b, struct program_space *pspace, CORE_ADDR pc, struct obj_section *section)
static bool has_multiple_locations(int num)
static void enable_delete_command(const char *args, int from_tty)
#define LOCATION_SPEC_HELP_STRING
static void strace_marker_create_breakpoints_sal(struct gdbarch *gdbarch, struct linespec_result *canonical, gdb::unique_xmalloc_ptr< char > cond_string, gdb::unique_xmalloc_ptr< char > extra_string, enum bptype type_wanted, enum bpdisp disposition, int thread, int task, int inferior, int ignore_count, int from_tty, int enabled, int internal, unsigned flags)
void rwatch_command_wrapper(const char *arg, int from_tty, bool internal)
int bpstat_num(bpstat **bsp, int *num)
static bool bl_address_is_meaningful(bp_location *loc)
static int overlay_events_enabled
static bool bpstat_check_location(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws)
int create_breakpoint(struct gdbarch *gdbarch, location_spec *locspec, const char *cond_string, int thread, int inferior, const char *extra_string, bool force_condition, int parse_extra, int tempflag, enum bptype type_wanted, int ignore_count, enum auto_boolean pending_break_support, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
static int find_loc_num_by_location(const bp_location *loc)
static bool watchpoint_in_thread_scope(struct watchpoint *b)
static bool debug_breakpoint
static void watch_command_1(const char *arg, int accessflag, int from_tty, bool just_location, bool internal)
static std::vector< bp_location * > bp_locations
static const char * read_uploaded_action(std::string &buffer)
static const char * condition_evaluation_mode
const char * bpdisp_text(enum bpdisp disp)
static void tracepoint_probe_create_sals_from_location_spec(location_spec *locspec, struct linespec_result *canonical)
static void watch_maybe_just_location(const char *arg, int accessflag, int from_tty)
void resolve_sal_pc(struct symtab_and_line *sal)
static void disable_trace_command(const char *args, int from_tty)
static const struct breakpoint_ops tracepoint_probe_breakpoint_ops
static void break_range_command(const char *arg, int from_tty)
const struct breakpoint_ops code_breakpoint_ops
static void breakpoint_adjustment_warning(CORE_ADDR, CORE_ADDR, int, bool)
static void watch_command(const char *arg, int from_tty)
static const struct breakpoint_ops * breakpoint_ops_for_location_spec_type(enum location_spec_type locspec_type, bool is_tracepoint)
void break_command(const char *arg, int from_tty)
static std::string dprintf_channel
static bp_loc_type bp_location_from_bp_type(bptype type)
static bool is_non_inline_function(struct breakpoint *b)
void enable_breakpoints_after_startup(void)
static void insert_breakpoint_locations(void)
static bool tracepoint_locations_match(const struct bp_location *loc1, const struct bp_location *loc2)
static void add_dummy_location(struct breakpoint *b, struct program_space *pspace)
bool fix_multi_location_breakpoint_output_globally
static void clear_command(const char *arg, int from_tty)
static void maintenance_info_breakpoints(const char *args, int from_tty)
static void condition_command(const char *arg, int from_tty)
static void set_hit_convenience_vars(int bpnum, int locno)
bool is_watchpoint(const struct breakpoint *bpt)
enum breakpoint_here breakpoint_here_p(const address_space *aspace, CORE_ADDR pc)
static void bpstat_check_breakpoint_conditions(bpstat *bs, thread_info *thread)
void awatch_command_wrapper(const char *arg, int from_tty, bool internal)
enum command_control_type commands_from_control_command(const char *arg, struct command_line *cmd)
struct tracepoint * get_tracepoint_by_number_on_target(int num)
bool bpstat_explains_signal(bpstat *bsp, enum gdb_signal sig)
static thread_info * get_bpstat_thread()
static void commands_command_1(const char *arg, int from_tty, struct command_line *control)
bpstat * bpstat_find_breakpoint(bpstat *bsp, struct breakpoint *breakpoint)
static bool command_line_is_silent(struct command_line *cmd)
static std::vector< bp_location * > moribund_locations
void breakpoint_auto_delete(bpstat *bs)
void delete_std_terminate_breakpoint(void)
static void update_global_location_list_nothrow(enum ugll_insert_mode)
void bpstat_clear_actions(void)
static bool create_longjmp_master_breakpoint_names(objfile *objfile)
bool bpstat_causes_stop(bpstat *bs)
static bool create_exception_master_breakpoint_hook(objfile *objfile)
static struct cmd_list_element * enablebreaklist
static void trace_command(const char *arg, int from_tty)
struct command_line * breakpoint_commands(struct breakpoint *b)
static bool ambiguous_names_p(const bp_location_range &locs)
static const char * bp_condition_evaluator(const breakpoint *b)
static CORE_ADDR bp_locations_placed_address_before_address_max
void breakpoint_set_silent(struct breakpoint *b, int silent)
breakpoint * install_breakpoint(int internal, std::unique_ptr< breakpoint > &&arg, int update_gll)
static const char dprintf_style_agent[]
static void mention(const breakpoint *)
static void print_one_breakpoint(breakpoint *b, const bp_location **last_loc, int allflag)
static void invalidate_bp_value_on_memory_change(struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data)
static void remove_inferior_breakpoints(struct inferior *inf)
static void set_breakpoint_count(int num)
static void create_overlay_event_breakpoint(void)
static int executing_breakpoint_commands
cmd_list_element * commands_cmd_element
static void save_breakpoints(const char *filename, int from_tty, bool(*filter)(const struct breakpoint *))
static void show_always_inserted_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static bp_locations_at_addr_range all_bp_locations_at_addr(CORE_ADDR addr)
void disable_breakpoint(struct breakpoint *bpt)
static void notify_breakpoint_deleted(breakpoint *b)
static int hw_watchpoint_used_count_others(struct breakpoint *except, enum bptype type, int *other_type_used)
void bpstat_do_actions(void)
static void force_breakpoint_reinsertion(struct bp_location *bl)
static int hw_breakpoint_used_count(void)
static void set_tracepoint_count(int num)
static bool automatic_hardware_breakpoints
void remove_breakpoints_inf(inferior *inf)
static bool breakpoint_cond_eval(expression *exp)
static const char * ugll_insert_mode_text(ugll_insert_mode insert_mode)
void breakpoint_free_objfile(struct objfile *objfile)
static breakpoint * add_to_breakpoint_chain(std::unique_ptr< breakpoint > &&b)
static void watchpoint_del_at_next_stop(struct watchpoint *w)
static struct breakpoint_objfile_data * get_breakpoint_objfile_data(struct objfile *objfile)
static void find_condition_and_thread(const char *tok, CORE_ADDR pc, gdb::unique_xmalloc_ptr< char > *cond_string, int *thread, int *inferior, int *task, gdb::unique_xmalloc_ptr< char > *rest)
void remove_solib_event_breakpoints(void)
int hardware_breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
static const char dprintf_style_gdb[]
static void map_breakpoint_number_range(std::pair< int, int > bp_num_range, gdb::function_view< void(breakpoint *)> function)
static void check_fast_tracepoint_sals(struct gdbarch *gdbarch, gdb::array_view< const symtab_and_line > sals)
static void parse_breakpoint_sals(location_spec *locspec, struct linespec_result *canonical)
static void extract_bp_number_and_location(const std::string &arg, std::pair< int, int > &bp_num_range, std::pair< int, int > &bp_loc_range)
static int wrap_indent_at_field(struct ui_out *uiout, const char *col_name)
static void download_tracepoint_locations(void)
static void set_breakpoint_location_condition(const char *cond_string, bp_location *loc, int bp_num, int loc_num)
int pc_at_non_inline_function(const address_space *aspace, CORE_ADDR pc, const target_waitstatus &ws)
static struct cmd_list_element * breakpoint_set_cmdlist
static void trace_pass_command(const char *, int)
static void breakpoint_sals_to_pc(std::vector< symtab_and_line > &sals)
static int internal_breakpoint_number
static void create_exception_master_breakpoint(void)
bpstat * bpstat_stop_status_nowatch(const address_space *aspace, CORE_ADDR bp_addr, thread_info *thread, const target_waitstatus &ws)
static bool watchpoint_exp_is_const(const struct expression *exp)
static int hw_watchpoint_use_count(struct breakpoint *)
static void update_watchpoint(struct watchpoint *b, bool reparse)
void bpstat_clear(bpstat **bsp)
static void handle_automatic_hardware_breakpoints(bp_location *bl)
int breakpoint_in_range_p(const address_space *aspace, CORE_ADDR addr, ULONGEST len)
static struct breakpoint * create_internal_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address, enum bptype type)
static void print_breakpoint_location(const breakpoint *b, const bp_location *loc)
static bool create_longjmp_master_breakpoint_probe(objfile *objfile)
void breakpoint_set_task(struct breakpoint *b, int task)
static int can_use_hw_watchpoints
static void dprintf_command(const char *arg, int from_tty)
static void enable_command(const char *args, int from_tty)
static struct breakpoint * momentary_breakpoint_from_master(struct breakpoint *orig, enum bptype type, int loc_enabled, int thread)
bpstat * build_bpstat_chain(const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws)
static std::string dprintf_function
struct breakpoint * create_jit_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
void disable_breakpoints_before_startup(void)
static void decref_bp_location(struct bp_location **loc)
#define BREAK_ARGS_HELP(command)
static void set_condition_evaluation_mode(const char *args, int from_tty, struct cmd_list_element *c)
void enable_watchpoints_after_interactive_call_stop(void)
static struct bp_location * find_location_by_number(int bp_num, int loc_num)
void _initialize_breakpoint()
static struct breakpoint * create_solib_event_breakpoint_1(struct gdbarch *gdbarch, CORE_ADDR address, enum ugll_insert_mode insert_mode)
#define internal_error_pure_virtual_called()
static const char condition_evaluation_both[]
static int remove_breakpoint(struct bp_location *)
void breakpoint_set_commands(struct breakpoint *b, counted_command_line &&commands)
int insert_single_step_breakpoints(struct gdbarch *gdbarch)
static std::vector< symtab_and_line > decode_static_tracepoint_spec(const char **arg_p)
static int extract_bp_num(extract_bp_kind kind, const char *start, int trailer, const char **end_out=NULL)
static void create_breakpoints_sal(struct gdbarch *, struct linespec_result *, gdb::unique_xmalloc_ptr< char >, gdb::unique_xmalloc_ptr< char >, enum bptype, enum bpdisp, int, int, int, int, int, int, int, unsigned)
void notify_breakpoint_modified(breakpoint *b)
struct tracepoint * create_tracepoint_from_upload(struct uploaded_tp *utp)
struct tracepoint * get_tracepoint(int num)
void set_ignore_count(int bptnum, int count, int from_tty)
static void set_breakpoint_location_function(struct bp_location *loc)
bpstat * bpstat_stop_status(const address_space *aspace, CORE_ADDR bp_addr, thread_info *thread, const target_waitstatus &ws, bpstat *stop_chain)
struct cmd_list_element * save_cmdlist
static const char *const condition_evaluation_enums[]
#define NUM_LONGJMP_NAMES
static const char *const longjmp_names[]
static bool msym_not_found_p(const struct minimal_symbol *msym)
int breakpoint_has_location_inserted_here(struct breakpoint *bp, const address_space *aspace, CORE_ADDR pc)
int single_step_breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
static void info_breakpoints_command(const char *args, int from_tty)
static enum print_stop_action print_bp_stop_message(bpstat *bs)
static void show_can_use_hw_watchpoints(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void print_solib_event(bool is_catchpoint)
static const char * condition_evaluation_mode_1
static bool should_be_inserted(struct bp_location *bl)
static bool bp_location_has_shadow(struct bp_location *bl)
static void build_target_command_list(struct bp_location *bl)
static bool gdb_evaluates_breakpoint_condition_p(void)
struct breakpoint * set_longjmp_breakpoint_for_call_dummy(void)
static momentary_breakpoint * new_momentary_breakpoint(struct gdbarch *gdbarch, enum bptype type, Arg &&... args)
static void default_collect_info(void)
static int bpstat_remove_breakpoint_callback(struct thread_info *th, void *data)
static void agent_printf_command(const char *arg, int from_tty)
static bool strace_marker_p(struct breakpoint *b)
void print_num_locno(const bpstat *bs, struct ui_out *uiout)
static void show_automatic_hardware_breakpoints(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void notify_breakpoint_created(breakpoint *b)
int breakpoint_inserted_here_p(const address_space *aspace, CORE_ADDR pc)
static void update_dprintf_command_list(struct breakpoint *b)
bool target_exact_watchpoints
static enum auto_boolean pending_break_support
static int tracepoint_count
static gdb::option::option_def_group make_watch_options_def_group(watch_options *opts)
static void delete_command(const char *arg, int from_tty)
static std::pair< int, int > extract_bp_or_bp_range(extract_bp_kind kind, const std::string &arg, std::string::size_type arg_offset)
static void update_dprintf_commands(const char *args, int from_tty, struct cmd_list_element *c)
void tbreak_command(const char *arg, int from_tty)
std::vector< breakpoint * > static_tracepoints_here(CORE_ADDR addr)
static bool create_exception_master_breakpoint_probe(objfile *objfile)
void clear_breakpoint_hit_counts(void)
static void enable_disable_bp_num_loc(int bp_num, int loc_num, bool enable)
static const char *const dprintf_style_enums[]
static void update_global_location_list(enum ugll_insert_mode)
static void ftrace_command(const char *arg, int from_tty)
bpstat * bpstat_copy(bpstat *bs)
static int breakpoint_address_bits(struct breakpoint *b)
int breakpoint_address_match(const address_space *aspace1, CORE_ADDR addr1, const address_space *aspace2, CORE_ADDR addr2)
static bool disconnected_dprintf
static void remove_threaded_breakpoints(thread_info *tp, gdb::optional< ULONGEST >, int)
void disable_watchpoints_before_interactive_call_start(void)
static const gdb::option::option_def watch_option_defs[]
static int compare_breakpoints(const breakpoint *a, const breakpoint *b)
static void output_thread_groups(struct ui_out *uiout, const char *field_name, const std::vector< int > &inf_nums, int mi_only)
void set_breakpoint_condition(struct breakpoint *b, const char *exp, int from_tty, bool force)
int user_breakpoint_p(struct breakpoint *b)
static int breakpoint_count
static void set_breakpoint_number(int internal, struct breakpoint *b)
static bool bp_location_inserted_here_p(const struct bp_location *bl, const address_space *aspace, CORE_ADDR pc)
struct breakpoint * create_and_insert_solib_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
static const char condition_evaluation_target[]
static void enable_once_command(const char *args, int from_tty)
void breakpoint_xfer_memory(gdb_byte *readbuf, gdb_byte *writebuf, const gdb_byte *writebuf_org, ULONGEST memaddr, LONGEST len)
static wp_check_result watchpoint_check(bpstat *bs)
void disable_breakpoints_in_shlibs(void)
void mark_breakpoints_out(void)
static void enable_disable_command(const char *args, int from_tty, bool enable)
static void delete_trace_command(const char *arg, int from_tty)
void print_breakpoint(breakpoint *b)
static bool need_moribund_for_location_type(const struct bp_location *loc)
void delete_longjmp_breakpoint_at_next_stop(int thread)
int pending_breakpoint_p(struct breakpoint *b)
static void watch_command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
static void breakpoint_about_to_proceed(void)
bool is_tracepoint(const struct breakpoint *b)
static void enable_trace_command(const char *args, int from_tty)
static void create_breakpoint_sal(struct gdbarch *gdbarch, gdb::array_view< const symtab_and_line > sals, location_spec_up &&locspec, gdb::unique_xmalloc_ptr< char > filter, gdb::unique_xmalloc_ptr< char > cond_string, gdb::unique_xmalloc_ptr< char > extra_string, enum bptype type, enum bpdisp disposition, int thread, int task, int inferior, int ignore_count, int from_tty, int enabled, int internal, unsigned flags, int display_canonical)
static void create_sals_from_location_spec_default(location_spec *locspec, linespec_result *canonical)
static void update_inserted_breakpoint_locations(void)
breakpoint_up set_momentary_breakpoint(struct gdbarch *gdbarch, struct symtab_and_line sal, struct frame_id frame_id, enum bptype type)
static bool bpstat_do_actions_1(bpstat **bsp)
static void handle_jit_event(CORE_ADDR address)
static void disable_breakpoints_in_freed_objfile(struct objfile *objfile)
void insert_breakpoints(void)
static void map_breakpoint_numbers(const char *, gdb::function_view< void(breakpoint *)>)
static const struct breakpoint_ops bkpt_probe_breakpoint_ops
struct gdbarch * get_sal_arch(struct symtab_and_line sal)
void delete_longjmp_breakpoint(int thread)
void update_breakpoints_after_exec(void)
static void disable_command(const char *args, int from_tty)
enum print_stop_action bpstat_print(bpstat *bs, target_waitkind kind)
void update_breakpoint_locations(code_breakpoint *b, struct program_space *filter_pspace, gdb::array_view< const symtab_and_line > sals, gdb::array_view< const symtab_and_line > sals_end)
void set_longjmp_breakpoint(struct thread_info *tp, struct frame_id frame)
int bpstat_locno(const bpstat *bs)
static void trace_pass_set_count(struct tracepoint *tp, int count, int from_tty)
static int prev_breakpoint_count
static void bkpt_probe_create_sals_from_location_spec(location_spec *locspec, struct linespec_result *canonical)
tracepoint_range all_tracepoints()
static intrusive_list< breakpoint > breakpoint_chain
const struct breakpoint_ops * breakpoint_ops_for_location_spec(const location_spec *locspec, bool is_tracepoint)
void disable_overlay_breakpoints(void)
static CORE_ADDR adjust_breakpoint_address(struct gdbarch *gdbarch, CORE_ADDR bpaddr, enum bptype bptype, struct program_space *pspace)
static bool always_inserted_mode
static bool breakpoint_location_address_match(struct bp_location *bl, const struct address_space *aspace, CORE_ADDR addr)
static bool is_masked_watchpoint(const struct breakpoint *b)
static const registry< objfile >::key< breakpoint_objfile_data > breakpoint_objfile_key
static bool breakpoint_enabled(struct breakpoint *b)
static void find_condition_and_thread_for_sals(const std::vector< symtab_and_line > &sals, const char *input, gdb::unique_xmalloc_ptr< char > *cond_string, int *thread, int *inferior, int *task, gdb::unique_xmalloc_ptr< char > *rest)
static CORE_ADDR find_breakpoint_range_end(struct symtab_and_line sal)
static struct breakpoint_ops strace_marker_breakpoint_ops
void insert_single_step_breakpoint(struct gdbarch *gdbarch, const address_space *aspace, CORE_ADDR next_pc)
static void swap_insertion(struct bp_location *left, struct bp_location *right)
static int insert_bp_location(struct bp_location *bl, struct ui_file *tmp_error_stream, int *disabled_breaks, int *hw_breakpoint_error, int *hw_bp_error_explained_already)
static struct symtab_and_line update_static_tracepoint(tracepoint *tp, struct symtab_and_line sal)
static int rbreak_start_breakpoint_count
static void enable_count_command(const char *args, int from_tty)
bool is_catchpoint(struct breakpoint *b)
static void check_no_tracepoint_commands(struct command_line *commands)
struct tracepoint * get_tracepoint_by_number(const char **arg, number_or_range_parser *parser)
breakpoint_safe_range all_breakpoints_safe()
static bool breakpoint_locations_match(const struct bp_location *loc1, const struct bp_location *loc2, bool sw_hw_bps_match=false)
static void condition_completer(struct cmd_list_element *cmd, completion_tracker &tracker, const char *text, const char *)
static bool is_hardware_watchpoint(const struct breakpoint *bpt)
static void validate_commands_for_breakpoint(struct breakpoint *b, struct command_line *commands)
static void rwatch_command(const char *arg, int from_tty)
void describe_other_breakpoints(struct gdbarch *gdbarch, struct program_space *pspace, CORE_ADDR pc, struct obj_section *section, int thread)
static void save_breakpoints_command(const char *args, int from_tty)
static void enable_breakpoint_disp(struct breakpoint *, enum bpdisp, int count)
static int breakpoint_kind(const struct bp_location *bl, CORE_ADDR *addr)
static bool breakpoint_location_address_range_overlap(struct bp_location *, const address_space *, CORE_ADDR, int)
static void mark_breakpoint_location_modified(struct bp_location *loc)
void enable_overlay_breakpoints(void)
static void bpstat_check_watchpoint(bpstat *bs)
#define breakpoint_debug_printf(fmt,...)
breakpoint_range all_breakpoints()
static void rethrow_on_target_close_error(const gdb_exception &e)
static std::string breakpoint_location_address_str(const bp_location *bl)
void maybe_print_thread_hit_breakpoint(struct ui_out *uiout)
iterator_range< bp_location_iterator > bp_location_range
@ 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
iterator_range< tracepoint_iterator > tracepoint_range
@ bp_gnu_ifunc_resolver_return
@ bp_std_terminate_master
@ bp_static_marker_tracepoint
@ CREATE_BREAKPOINT_FLAGS_INSERTED
void delete_breakpoint(struct breakpoint *)
std::unique_ptr< struct breakpoint, breakpoint_deleter > breakpoint_up
intrusive_list< bp_location > bp_location_list
@ ordinary_breakpoint_here
@ permanent_breakpoint_here
int breakpoint_address_match(const address_space *aspace1, CORE_ADDR addr1, const address_space *aspace2, CORE_ADDR addr2)
@ bp_loc_hardware_breakpoint
@ bp_loc_software_breakpoint
@ bp_loc_software_watchpoint
@ bp_loc_hardware_watchpoint
basic_safe_range< breakpoint_range > breakpoint_safe_range
struct gdbarch * get_sal_arch(struct symtab_and_line sal)
filtered_iterator< breakpoint_iterator, tracepoint_filter > tracepoint_iterator
void update_breakpoint_locations(code_breakpoint *b, struct program_space *filter_pspace, gdb::array_view< const symtab_and_line > sals, gdb::array_view< const symtab_and_line > sals_end)
void describe_other_breakpoints(struct gdbarch *, struct program_space *, CORE_ADDR, struct obj_section *, int)
@ watch_triggered_unknown
iterator_range< breakpoint_iterator > breakpoint_range
gdb::ref_ptr< bp_location, bp_location_ref_policy > bp_location_ref_ptr
void maybe_print_thread_hit_breakpoint(struct ui_out *uiout)
const minimal_symbol * msymbol
CORE_ADDR requested_address
bp_target_info overlay_target_info
const struct symbol * symbol
agent_expr_up cond_bytecode
bp_location(breakpoint *owner)
std::string to_string() const
condition_status condition_changed
target_hw_bp_type watchpoint_type
bp_target_info target_info
const struct objfile * objfile
ui_file_style style() const
void add_completion(gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd=NULL, const char *text=NULL, const char *word=NULL)
void advance_custom_word_point_by(int len)
struct program_space * pspace
const struct block * block() const
virtual void clear_semaphore(struct objfile *objfile, struct gdbarch *gdbarch)
virtual void set_semaphore(struct objfile *objfile, struct gdbarch *gdbarch)
virtual bool can_evaluate_arguments() const =0
const address_space * aspace() const
scoped_rbreak_breakpoints()
~scoped_rbreak_breakpoints()
void puts(const char *) override
bool open(const char *name, const char *mode)
const char * c_str() const
static void ours_for_output()
void set_thread_fsm(std::unique_ptr< struct thread_fsm > fsm)
struct frame_id initiating_frame
thread_control_state control
virtual void puts(const char *str)
void printf(const char *,...) ATTRIBUTE_PRINTF(2
ui_out_flags test_flags(ui_out_flags mask)
bool query_table_field(int colno, int *width, int *alignment, const char **col_name)
void field_core_addr(const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void field_fmt(const char *fldname, const char *format,...) ATTRIBUTE_PRINTF(3
void field_signed(const char *fldname, LONGEST value)
void field_skip(const char *fldname)
void text(const char *string)
void field_stream(const char *fldname, string_file &stream, const ui_file_style &style=ui_file_style())
void table_header(int width, ui_align align, const std::string &col_name, const std::string &col_hdr)
bool is_mi_like_p() const
void void void wrap_hint(int indent)
void message(const char *format,...) ATTRIBUTE_PRINTF(2
void end(ui_out_type type)
struct cmd_list_element * showlist
struct cmd_list_element * deletelist
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 * disablelist
struct cmd_list_element * enablelist
struct cmd_list_element * maintenanceinfolist
struct cmd_list_element * setdebuglist
struct cmd_list_element * add_alias_cmd(const char *name, cmd_list_element *target, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
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_handle_brkchars(struct cmd_list_element *cmd, completer_handle_brkchars_ftype *func)
cmd_list_element * add_com_alias(const char *name, cmd_list_element *target, command_class theclass, int abbrev_flag)
set_show_commands add_setshow_string_cmd(const char *name, enum command_class theclass, std::string *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 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)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
set_show_commands add_setshow_prefix_cmd(const char *name, command_class theclass, const char *set_doc, const char *show_doc, cmd_list_element **set_subcommands_list, cmd_list_element **show_subcommands_list, cmd_list_element **set_list, cmd_list_element **show_list)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_simple_func_ftype *fun, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
static cmd_list_element::aliases_list_type delete_cmd(const char *name, cmd_list_element **list, cmd_list_element **prehook, cmd_list_element **prehookee, cmd_list_element **posthook, cmd_list_element **posthookee)
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)
struct cmd_list_element * add_basic_prefix_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
counted_command_line read_command_lines_1(read_next_line_ftype read_next_line_func, int parse_commands, gdb::function_view< void(const char *)> validator)
void execute_control_commands(struct command_line *cmdlines, int from_tty)
counted_command_line read_command_lines(const char *prompt_arg, int from_tty, int parse_commands, gdb::function_view< void(const char *)> validator)
void print_command_lines(struct ui_out *uiout, struct command_line *cmd, unsigned int depth)
enum command_control_type execute_control_command(struct command_line *cmd, int from_tty)
std::shared_ptr< command_line > counted_command_line
cli_style_option address_style
cli_style_option function_name_style
cli_style_option file_name_style
cli_style_option metadata_style
int get_number(const char **pp)
int number_is_in_list(const char *list, int number)
std::string extract_arg(const char **arg)
int get_number_trailer(const char **pp, int trailer)
scoped_restore_tmpl< int > prevent_dont_repeat(void)
void completer_ftype(struct cmd_list_element *, completion_tracker &tracker, const char *text, const char *word)
void cmd_func_ftype(const char *args, int from_tty, cmd_list_element *c)
void expression_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
const char * advance_to_expression_complete_word_point(completion_tracker &tracker, const char *text)
void location_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
void filename_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
std::string to_string(cooked_index_flag flags)
std::string memory_error_message(enum target_xfer_status err, struct gdbarch *gdbarch, CORE_ADDR memaddr)
void set_next_address(struct gdbarch *, CORE_ADDR)
int longest_to_int(LONGEST)
int print_address_symbolic(struct gdbarch *, CORE_ADDR, struct ui_file *, int, const char *)
void dummy_frame_discard(struct frame_id dummy_id, thread_info *thread)
struct value * parse_and_eval(const char *exp, parser_flags flags)
struct value * parse_to_comma_and_eval(const char **expp)
LONGEST parse_and_eval_long(const char *exp)
void fetch_subexp_value(struct expression *exp, expr::operation *op, struct value **valp, struct value **resultp, std::vector< value_ref_ptr > *val_chain, bool preserve_errors)
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)
std::unique_ptr< expression > expression_up
@ PARSER_COMMA_TERMINATES
expression_up parse_exp_1(const char **, CORE_ADDR pc, const struct block *, parser_flags flags, innermost_block_tracker *=nullptr)
const struct extension_language_defn * get_breakpoint_cond_ext_lang(struct breakpoint *b, enum extension_language skip_lang)
const char * ext_lang_capitalized_name(const struct extension_language_defn *extlang)
bool breakpoint_ext_lang_cond_says_stop(struct breakpoint *b)
const struct frame_id null_frame_id
enum unwind_stop_reason get_frame_unwind_stop_reason(frame_info_ptr frame)
struct program_space * get_frame_program_space(frame_info_ptr frame)
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)
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)
bool frame_id_artificial_p(frame_id l)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
struct frame_id frame_unwind_caller_id(frame_info_ptr next_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)
struct gdbarch * frame_unwind_caller_arch(frame_info_ptr next_frame)
CORE_ADDR gdbarch_adjust_breakpoint_address(struct gdbarch *gdbarch, CORE_ADDR bpaddr)
const gdb_byte * gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
bool gdbarch_adjust_breakpoint_address_p(struct gdbarch *gdbarch)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
bool gdbarch_program_breakpoint_here_p(struct gdbarch *gdbarch, CORE_ADDR address)
std::vector< CORE_ADDR > gdbarch_software_single_step(struct gdbarch *gdbarch, struct regcache *regcache)
int gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR addr)
int gdbarch_has_global_breakpoints(struct gdbarch *gdbarch)
int gdbarch_fast_tracepoint_valid_at(struct gdbarch *gdbarch, CORE_ADDR addr, std::string *msg)
bool gdbarch_skip_entrypoint_p(struct gdbarch *gdbarch)
int gdbarch_breakpoint_kind_from_current_state(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR *pcptr)
CORE_ADDR gdbarch_skip_entrypoint(struct gdbarch *gdbarch, CORE_ADDR ip)
CORE_ADDR gdbarch_remove_non_address_bits(struct gdbarch *gdbarch, CORE_ADDR pointer)
bool gdbarch_get_longjmp_target_p(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
int gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr)
int thread_count(process_stratum_target *proc_target)
all_non_exited_threads_range all_non_exited_threads(process_stratum_target *proc_target=nullptr, ptid_t filter_ptid=minus_one_ptid)
int valid_global_thread_id(int global_id)
int show_thread_that_caused_stop(void)
struct thread_info * find_thread_global_id(int global_id)
const char * print_full_thread_id(struct thread_info *thr)
struct thread_info * inferior_thread(void)
struct thread_info * iterate_over_threads(thread_callback_func, void *)
const char * thread_name(thread_info *thread)
bool threads_are_executing(process_stratum_target *targ)
const char * print_thread_id(struct thread_info *thr)
int is_scalar_type_recursive(struct type *t)
struct type * check_typedef(struct type *type)
mach_port_t kern_return_t mach_port_t mach_msg_type_name_t msgportsPoly mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
int number_of_inferiors(void)
struct inferior * current_inferior(void)
bool valid_global_inferior_id(int id)
all_inferiors_range all_inferiors(process_stratum_target *proc_target=nullptr)
int thread_is_stepping_over_breakpoint(int thread)
int stepping_past_instruction_at(struct address_space *aspace, CORE_ADDR address)
void clear_proceed_status(int step)
int stepping_past_nonsteppable_watchpoint(void)
void proceed(CORE_ADDR addr, enum gdb_signal siggnal)
#define INFRUN_SCOPED_DEBUG_ENTER_EXIT
#define infrun_debug_printf(fmt,...)
void interps_notify_breakpoint_created(breakpoint *b)
void interps_notify_breakpoint_modified(breakpoint *b)
struct interp * command_interp(void)
void interps_notify_breakpoint_deleted(breakpoint *b)
void jit_event_handler(gdbarch *gdbarch, objfile *jiter)
void jit_breakpoint_re_set(void)
static void set_language(const char *language)
const struct language_defn * current_language
static const char * range
std::vector< symtab_and_line > decode_line_1(const location_spec *locspec, int flags, struct program_space *search_pspace, struct symtab *default_symtab, int default_line)
void decode_line_full(struct location_spec *locspec, int flags, struct program_space *search_pspace, struct symtab *default_symtab, int default_line, struct linespec_result *canonical, const char *select_mode, const char *filter)
std::vector< symtab_and_line > decode_line_with_current_source(const char *string, int flags)
@ DECODE_LINE_FUNFIRSTLINE
location_spec_up new_address_location_spec(CORE_ADDR addr, const char *addr_string, int addr_string_len)
const linespec_location_spec * as_linespec_location_spec(const location_spec *locspec)
location_spec_up string_to_location_spec(const char **stringp, const struct language_defn *language, symbol_name_match_type match_type)
location_spec_up new_probe_location_spec(std::string &&probe)
location_spec_up new_linespec_location_spec(const char **linespec, symbol_name_match_type match_type)
std::unique_ptr< location_spec > location_spec_up
static location_spec_up new_explicit_location_spec_function(const char *function_name)
static struct type * new_type(char *)
int memory_validate_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
struct mem_region * lookup_mem_region(CORE_ADDR addr)
int mem_ranges_overlap(CORE_ADDR start1, int len1, CORE_ADDR start2, int len2)
const char * async_reason_lookup(enum async_reply_reason reason)
@ EXEC_ASYNC_LOCATION_REACHED
@ EXEC_ASYNC_WATCHPOINT_SCOPE
@ EXEC_ASYNC_BREAKPOINT_HIT
@ EXEC_ASYNC_ACCESS_WATCHPOINT_TRIGGER
@ EXEC_ASYNC_WATCHPOINT_TRIGGER
@ EXEC_ASYNC_READ_WATCHPOINT_TRIGGER
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
struct bound_minimal_symbol lookup_minimal_symbol_text(const char *name, struct objfile *objf)
observable< struct inferior *, CORE_ADDR, ssize_t, const bfd_byte * > memory_changed
observable< struct breakpoint * > breakpoint_created
observable< struct objfile * > free_objfile
observable< struct breakpoint * > breakpoint_modified
observable< struct breakpoint * > breakpoint_deleted
observable< struct inferior * > inferior_removed
observable about_to_proceed
observable< thread_info *, gdb::optional< ULONGEST >, bool > thread_exit
observable< struct program_space *, struct so_list * > solib_unloaded
bool process_options(const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
@ PROCESS_OPTIONS_UNKNOWN_IS_ERROR
@ PROCESS_OPTIONS_UNKNOWN_IS_OPERAND
std::string build_help(const char *help_tmpl, gdb::array_view< const option_def_group > options_group)
void complete_on_all_options(completion_tracker &tracker, gdb::array_view< const option_def_group > options_group)
bool complete_options(completion_tracker &tracker, const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
bool shared_objfile_contains_address_p(struct program_space *pspace, CORE_ADDR address)
bool is_addr_in_objfile(CORE_ADDR addr, const struct objfile *objfile)
std::vector< probe * > find_probes_in_objfile(struct objfile *objfile, const char *provider, const char *name)
std::vector< symtab_and_line > parse_probes(const location_spec *locspec, struct program_space *search_pspace, struct linespec_result *canonical)
void switch_to_program_space_and_thread(program_space *pspace)
struct program_space * current_program_space
void set_current_program_space(struct program_space *pspace)
std::vector< struct program_space * > program_spaces
static gdbpy_ref field_name(struct type *type, int field)
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 solib_contains_address_p(const struct so_list *const solib, CORE_ADDR address)
const char * solib_name_from_address(struct program_space *pspace, CORE_ADDR address)
void handle_solib_event(void)
const char * symtab_to_fullname(struct symtab *s)
const char * symtab_to_filename_for_display(struct symtab *symtab)
struct symtab_and_line get_current_source_symtab_and_line(void)
struct symtab * get_last_displayed_symtab(void)
symtab_and_line get_last_displayed_sal()
int get_last_displayed_line(void)
bool last_displayed_sal_is_valid(void)
bool contains(const struct block *a, bool allow_nested=false) const
struct symbol * linkage_function() const
CORE_ADDR value_address() const
struct minimal_symbol * minsym
struct obj_section * obj_section() const
static void decref(bp_location *loc)
bp_locations_at_addr_range(CORE_ADDR addr)
std::vector< bp_location * >::iterator iterator
std::vector< agent_expr * > conditions
std::vector< agent_expr * > tcommands
struct address_space * placed_address_space
enum stop_stack_kind call_dummy
enum bpstat_what_main_action main_action
bp_location_ref_ptr bp_location_at
enum bp_print_how print_it
counted_command_line commands
struct breakpoint * breakpoint_at
struct bound_minimal_symbol terminate_msym
std::vector< probe * > exception_probes
struct bound_minimal_symbol overlay_msym
struct bound_minimal_symbol exception_msym
std::vector< probe * > longjmp_probes
struct bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES]
void(* create_sals_from_location_spec)(location_spec *locspec, struct linespec_result *canonical)
void(* create_breakpoints_sal)(struct gdbarch *, struct linespec_result *, gdb::unique_xmalloc_ptr< char >, gdb::unique_xmalloc_ptr< char >, enum bptype, enum bpdisp, int, int, int, int, int, int, int, unsigned)
counted_command_line commands
virtual int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws)
breakpoint(struct gdbarch *gdbarch_, enum bptype bptype, bool temp=true, const char *cond_string=nullptr)
bp_location_list steal_locations(program_space *pspace)
bp_location_list m_locations
virtual void print_recreate(struct ui_file *fp) const
virtual int resources_needed(const struct bp_location *)
bp_location_range locations() const
virtual void check_status(struct bpstat *bs)
gdb::unique_xmalloc_ptr< char > cond_string
void print_recreate_thread(struct ui_file *fp) const
virtual int insert_location(struct bp_location *)
virtual enum print_stop_action print_it(const bpstat *bs) const
breakpoint * related_breakpoint
bool has_locations() const
virtual struct bp_location * allocate_location()
gdb::unique_xmalloc_ptr< char > filter
bp_location & first_loc()
void unadd_location(bp_location &loc)
virtual bool print_one(const bp_location **) const
virtual bool explains_signal(enum gdb_signal)
bool has_multiple_locations() const
virtual int remove_location(struct bp_location *, enum remove_bp_reason reason)
virtual void print_one_detail(struct ui_out *) const
void add_location(bp_location &loc)
virtual void print_mention() const
gdb::unique_xmalloc_ptr< char > extra_string
bool has_single_location() const
const bp_location & last_loc() const
enum enable_state enable_state
virtual void after_condition_true(struct bpstat *bs)
location_spec_up locspec_range_end
catchpoint(struct gdbarch *gdbarch, bool temp, const char *cond_string)
completer_ftype * completer
void set_context(void *context)
~code_breakpoint() override=0
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
virtual std::vector< symtab_and_line > decode_location_spec(location_spec *locspec, struct program_space *search_pspace)
bp_location * add_location(const symtab_and_line &sal)
int insert_location(struct bp_location *) override
std::vector< symtab_and_line > location_spec_to_sals(location_spec *locspec, struct program_space *search_pspace, int *found)
code_breakpoint(struct gdbarch *gdbarch, bptype type, gdb::array_view< const symtab_and_line > sals, location_spec_up &&locspec, gdb::unique_xmalloc_ptr< char > filter, gdb::unique_xmalloc_ptr< char > cond_string, gdb::unique_xmalloc_ptr< char > extra_string, enum bpdisp disposition, int thread, int task, int inferior, int ignore_count, int from_tty, int enabled, unsigned flags, int display_canonical)
int remove_location(struct bp_location *, enum remove_bp_reason reason) override
counted_command_line body_list_0
counted_command_line body_list_1
struct command_line * next
enum command_control_type control_type
struct objfile * objfile() const
void after_condition_true(struct bpstat *bs) override
void print_recreate(struct ui_file *fp) const override
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
struct value * evaluate(struct type *expect_type=nullptr, enum noside noside=EVAL_NORMAL)
std::string to_string() const
const char * print_name() const
struct obj_section * obj_section(const struct objfile *objfile) const
enum print_stop_action print_it(const bpstat *bs) const override
void check_status(struct bpstat *bs) override
void print_mention() const override
internal_breakpoint(struct gdbarch *gdbarch, enum bptype type, CORE_ADDR address)
virtual gdb::unique_xmalloc_ptr< char > watch_location_expression(struct type *type, CORE_ADDR addr) const
std::vector< linespec_sals > lsals
std::vector< symtab_and_line > sals
enum location_spec_type type() const
~longjmp_breakpoint() override
enum print_stop_action print_it(const bpstat *bs) const override
int remove_location(struct bp_location *, enum remove_bp_reason reason) override
void print_recreate(struct ui_file *fp) const override
void print_mention() const override
void print_one_detail(struct ui_out *) const override
int resources_needed(const struct bp_location *) override
bool works_in_software_mode() const override
int insert_location(struct bp_location *) override
enum mem_access_mode mode
void check_status(struct bpstat *bs) override
enum print_stop_action print_it(const bpstat *bs) const override
momentary_breakpoint(struct gdbarch *gdbarch_, enum bptype bptype, program_space *pspace_, const struct frame_id &frame_id_, int thread_)
void print_mention() const override
struct objfile * separate_debug_objfile_backlink
struct program_space * pspace
struct gdbarch * arch() const
void print_recreate(struct ui_file *fp) const override
void print_mention() const override
enum print_stop_action print_it(const bpstat *bs) const override
int resources_needed(const struct bp_location *) override
objfiles_range objfiles()
std::vector< std::string > deleted_solibs
std::vector< struct so_list * > added_solibs
int breakpoints_not_allowed
struct address_space * aspace
enum print_stop_action print_it(const bpstat *bs) const override
void print_mention() const override
int resources_needed(const struct bp_location *) override
bool print_one(const bp_location **) const override
ranged_breakpoint(struct gdbarch *gdbarch, const symtab_and_line &sal_start, int length, location_spec_up start_locspec, location_spec_up end_locspec)
void print_one_detail(struct ui_out *) const override
void print_recreate(struct ui_file *fp) const override
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
char so_name[SO_NAME_MAX_PATH_SIZE]
std::vector< symtab_and_line > decode_location_spec(struct location_spec *locspec, struct program_space *search_pspace) override
const block * value_block() const
struct obj_section * section
struct program_space * pspace
struct minimal_symbol * msymbol
struct compunit_symtab * compunit() const
target_waitkind kind() const
struct breakpoint * single_step_breakpoints
std::string static_trace_marker_id
void print_recreate(struct ui_file *fp) const override
ULONGEST traceframe_usage
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
int static_trace_marker_id_idx
void print_one_detail(struct ui_out *uiout) const override
void print_mention() const override
void clean_up(struct thread_info *thread) override
until_break_fsm(struct interp *cmd_interp, int thread, std::vector< breakpoint_up > &&breakpoints)
std::vector< breakpoint_up > breakpoints
bool should_stop(struct thread_info *thread) override
enum async_reply_reason do_async_reply_reason() override
std::vector< gdb::unique_xmalloc_ptr< char[]> > cmd_strings
gdb::unique_xmalloc_ptr< char[]> cond_string
std::vector< gdb::unique_xmalloc_ptr< char[]> > step_actions
ULONGEST traceframe_usage
std::vector< gdb::unique_xmalloc_ptr< char[]> > actions
gdb::unique_xmalloc_ptr< char[]> at_string
gdb::unique_xmalloc_ptr< char[]> cond
void unpack_bitfield(struct value *dest_val, LONGEST bitpos, LONGEST bitsize, const gdb_byte *valaddr, LONGEST embedded_offset) const
bool deprecated_modifiable() const
static struct value * allocate(struct type *type)
struct type * type() const
enum lval_type lval() const
gdb::array_view< const gdb_byte > contents_for_printing()
int insert_location(struct bp_location *) override
int breakpoint_hit(const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, const target_waitstatus &ws) override
void check_status(struct bpstat *bs) override
struct frame_id watchpoint_frame
int remove_location(struct bp_location *, enum remove_bp_reason reason) override
virtual bool works_in_software_mode() const
gdb::unique_xmalloc_ptr< char > exp_string
gdb::unique_xmalloc_ptr< char > exp_string_reparse
enum print_stop_action print_it(const bpstat *bs) const override
bool explains_signal(enum gdb_signal) override
void print_mention() const override
int resources_needed(const struct bp_location *) override
const struct block * exp_valid_block
const struct block * cond_exp_valid_block
void print_recreate(struct ui_file *fp) const override
enum watchpoint_triggered watchpoint_triggered
struct obj_section * find_pc_overlay(CORE_ADDR pc)
CORE_ADDR overlay_unmapped_address(CORE_ADDR pc, struct obj_section *section)
int section_is_mapped(struct obj_section *osect)
int section_is_overlay(struct obj_section *section)
enum overlay_debugging_state overlay_debugging
bool find_line_pc(struct symtab *symtab, int line, CORE_ADDR *pc)
const char multiple_symbols_all[]
bool find_line_pc_range(struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
void skip_prologue_sal(struct symtab_and_line *sal)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
bool find_line_pc(struct symtab *, int, CORE_ADDR *)
#define gnu_ifunc_resolver_return_stop
struct symbol * find_pc_sect_function(CORE_ADDR, struct obj_section *)
struct symtab_and_line find_pc_line(CORE_ADDR, int)
#define gnu_ifunc_resolver_stop
std::vector< static_tracepoint_marker > target_static_tracepoint_markers_by_strid(const char *marker_id)
int target_insert_hw_breakpoint(gdbarch *gdbarch, bp_target_info *bp_tgt)
int target_region_ok_for_hw_watchpoint(CORE_ADDR addr, int len)
int target_remove_hw_breakpoint(gdbarch *gdbarch, bp_target_info *bp_tgt)
bool target_supports_stopped_by_hw_breakpoint()
bool target_can_run_breakpoint_commands()
int target_remove_mask_watchpoint(CORE_ADDR addr, CORE_ADDR mask, enum target_hw_bp_type rw)
void target_enable_tracepoint(bp_location *loc)
int target_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
bool target_can_download_tracepoint()
int target_insert_watchpoint(CORE_ADDR addr, int len, target_hw_bp_type type, expression *cond)
bool target_static_tracepoint_marker_at(CORE_ADDR addr, static_tracepoint_marker *marker)
int target_can_use_hardware_watchpoint(bptype type, int cnt, int othertype)
bool target_has_execution(inferior *inf)
void target_disable_tracepoint(bp_location *loc)
void target_download_tracepoint(bp_location *location)
bool target_supports_stopped_by_sw_breakpoint()
int target_insert_mask_watchpoint(CORE_ADDR addr, CORE_ADDR mask, enum target_hw_bp_type rw)
int target_masked_watch_num_registers(CORE_ADDR addr, CORE_ADDR mask)
bool target_is_non_stop_p()
int target_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, enum remove_bp_reason reason)
bool target_can_accel_watchpoint_condition(CORE_ADDR addr, int len, int type, expression *cond)
int target_ranged_break_num_registers(void)
bool target_stopped_by_watchpoint()
bool target_supports_evaluation_of_breakpoint_conditions()
bool target_supports_enable_disable_tracepoint()
int target_remove_watchpoint(CORE_ADDR addr, int len, target_hw_bp_type type, expression *cond)
#define target_stopped_data_address(target, addr_p)
bool may_insert_fast_tracepoints
bool may_insert_tracepoints
#define target_watchpoint_addr_within_range(target, addr, start, length)
struct thread_info * parse_thread_id(const char *tidstr, const char **end)
struct trace_status * current_trace_status(void)
void save_trace_state_variables(struct ui_file *fp)
void validate_actionline(const char *line, tracepoint *t)
std::string default_collect
static signed_field_s * signed_field(const char *name, LONGEST val, signed_field_s &&tmp={})
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
@ fix_multi_location_breakpoint_output
@ fix_breakpoint_script_output
static string_field_s * string_field(const char *name, const char *str, string_field_s &&tmp={})
#define SWITCH_THRU_ALL_UIS()
int nquery(const char *ctlstr,...)
const char * print_core_address(struct gdbarch *gdbarch, CORE_ADDR address)
int query(const char *ctlstr,...)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void fprintf_styled(struct ui_file *stream, const ui_file_style &style, const char *format,...)
void gdb_printf(struct ui_file *stream, const char *format,...)
int value_equal_contents(struct value *arg1, struct value *arg2)
struct value * value_addr(struct value *arg1)
void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options)
void get_user_print_options(struct value_print_options *opts)
CORE_ADDR value_as_address(struct value *val)
void complete_internalvar(completion_tracker &tracker, const char *name)
struct internalvar * lookup_internalvar(const char *name)
LONGEST value_as_long(struct value *val)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
struct value * value_mark(void)
void value_free_to_mark(const struct value *mark)
value_ref_ptr release_value(struct value *val)
static bool value_true(struct value *val)
gdb::ref_ptr< struct value, value_ref_policy > value_ref_ptr
@ TARGET_WAITKIND_STOPPED