59#include "gdbsupport/gdb_regex.h"
66#include "gdbsupport/format.h"
73#include "readline/tilde.h"
82#include "gdbsupport/array-view.h"
83#include "gdbsupport/gdb_optional.h"
96 gdb::unique_xmalloc_ptr<char>,
97 gdb::unique_xmalloc_ptr<char>,
101 int,
int,
int,
unsigned);
104 (
const std::vector<value_ref_ptr> &vals);
115 int loc_enabled,
int thread);
129 bool sw_hw_bps_match =
false);
150 int *other_type_used);
316 gdb_assert (thread_ > 0);
334 using ordinary_breakpoint::ordinary_breakpoint;
360 locspec = std::move (start_locspec);
379 using tracepoint::tracepoint;
442 static const char *
const bpdisps[] = {
"del",
"dstp",
"dis",
"keep"};
444 return bpdisps[(int) disp];
458 _(
"Debugger's willingness to use "
459 "watchpoint hardware is %s.\n"),
474 _(
"Debugger's behavior regarding "
475 "pending breakpoints is %s.\n"),
490 _(
"Automatic usage of hardware breakpoints is %s.\n"),
507 gdb_printf (file, _(
"Always inserted breakpoint mode is %s.\n"),
533 if (
inf->has_execution ()
540 if (tp->resumed () && tp->has_pending_waitstatus ())
617#define ALL_BREAKPOINTS_SAFE(B,TMP) \
618 for (B = breakpoint_chain; \
619 B ? (TMP=B->next, 1): 0; \
656const std::vector<bp_location *> &
666 using iterator = std::vector<bp_location *>::iterator;
673 {
return loc->address < addr_; }
676 {
return addr_ <
loc->address; }
683 m_end = it_pair.second;
828 return b->
loc !=
nullptr && b->
loc->
next !=
nullptr;
884 const char *old_mode, *new_mode;
890 warning (_(
"Target does not support breakpoint condition evaluation.\n"
891 "Using host evaluation mode instead."));
903 if (new_mode != old_mode)
926 loc->needs_update = 1;
945 _(
"Breakpoint condition evaluation "
946 "mode is %s (currently %s).\n"),
950 gdb_printf (file, _(
"Breakpoint condition evaluation mode is %s.\n"),
961 int bp_num,
int loc_num)
963 bool has_junk =
false;
972 loc->cond = std::move (new_exp);
973 if (
loc->disabled_by_cond &&
loc->enabled)
974 gdb_printf (_(
"Breakpoint %d's condition is now valid at "
975 "location %d, enabling.\n"),
978 loc->disabled_by_cond =
false;
981 catch (
const gdb_exception_error &e)
990 warning (_(
"failed to validate condition at location %d.%d, "
991 "disabling:\n %s"), bp_num, loc_num, e.what ());
993 warning (_(
"failed to validate condition at location %d, "
994 "disabling:\n %s"), loc_num, e.what ());
997 loc->disabled_by_cond =
true;
1001 error (_(
"Garbage '%s' follows condition"),
cond_string);
1006 int from_tty,
bool force)
1013 gdb::checked_static_cast<watchpoint *> (b)->cond_exp.reset ();
1020 if (
loc->disabled_by_cond &&
loc->enabled)
1021 gdb_printf (_(
"Breakpoint %d's condition is now valid at "
1022 "location %d, enabling.\n"),
1024 loc->disabled_by_cond =
false;
1041 const char *arg = exp;
1044 error (_(
"Junk at end of expression"));
1045 watchpoint *w = gdb::checked_static_cast<watchpoint *> (b);
1063 const char *arg = exp;
1067 error (_(
"Junk at end of expression"));
1070 catch (
const gdb_exception_error &e)
1075 if (
loc->next ==
nullptr && !force)
1114 if (extlang != NULL)
1116 error (_(
"Only one stop condition allowed. There is currently"
1117 " a %s stop condition defined for this breakpoint."),
1128 error (_(
"No breakpoint number %d."), bpnum);
1144 N_(
"Set the condition even if it is invalid for all current locations."),
1163 const char *text,
const char * )
1165 bool has_no_arguments = (*text ==
'\0');
1172 text = skip_spaces (text);
1173 const char *space = skip_to_space (text);
1182 if (!isdigit (text[1]))
1191 if (has_no_arguments)
1195 len = strlen (text);
1201 xsnprintf (number,
sizeof (number),
"%d", b->
number);
1203 if (strncmp (number, text, len) == 0)
1211 const char *exp_start = skip_spaces (space);
1239 error (_(
"Bad breakpoint argument: '%s'"), arg);
1253 for (c = commands; c; c = c->
next)
1256 error (_(
"The 'while-stepping' command can "
1257 "only be used for tracepoints"));
1265 if (strstr (c->
line,
"collect ") == c->
line)
1266 error (_(
"The 'collect' command can only be used for tracepoints"));
1268 if (strstr (c->
line,
"teval ") == c->
line)
1269 error (_(
"The 'teval' command can only be used for tracepoints"));
1302template<
typename... Arg>
1303static std::unique_ptr<code_breakpoint>
1314 std::forward<Arg> (args)...);
1321 std::forward<Arg> (args)...);
1326 std::forward<Arg> (args)...);
1331 std::forward<Arg> (args)...);
1335 gdb_assert_not_reached (
"invalid type");
1338 return std::unique_ptr<code_breakpoint> (b);
1370 for (c = commands; c; c = c->
next)
1375 error (_(
"The 'while-stepping' command "
1376 "cannot be used for fast tracepoint"));
1379 error (_(
"The 'while-stepping' command "
1380 "cannot be used for static tracepoint"));
1383 error (_(
"The 'while-stepping' command "
1384 "can be used only once"));
1395 gdb_assert (while_stepping->
body_list_1 ==
nullptr);
1397 for (;
c2;
c2 =
c2->next)
1400 error (_(
"The 'while-stepping' command cannot be nested"));
1413std::vector<breakpoint *>
1416 std::vector<breakpoint *> found;
1423 if (
loc->address == addr)
1424 found.push_back (b);
1439 b->
commands = std::move (commands);
1450 int old_silent = b->
silent;
1453 if (old_silent != silent)
1463 int old_thread = b->
thread;
1466 if (old_thread != thread)
1476 int old_task = b->
task;
1479 if (old_task != task)
1491 bool cmd_read =
false;
1493 std::string new_arg;
1495 if (arg == NULL || !*arg)
1513 arg = new_arg.c_str ();
1520 gdb_assert (cmd == NULL);
1521 if (control != NULL)
1526 = string_printf (_(
"Type commands for breakpoint(s) "
1527 "%s, one per line."),
1530 auto do_validate = [=] (
const char *
line)
1534 gdb::function_view<void (
const char *)> validator;
1536 validator = do_validate;
1597 const gdb_byte *writebuf_org,
1598 ULONGEST memaddr, LONGEST len,
1603 CORE_ADDR bp_addr = 0;
1619 if (bp_addr + bp_size <= memaddr)
1626 if (bp_addr >= memaddr + len)
1634 if (bp_addr < memaddr)
1637 bp_size -= memaddr - bp_addr;
1638 bptoffset = memaddr - bp_addr;
1642 if (bp_addr + bp_size > memaddr + len)
1645 bp_size -= (bp_addr + bp_size) - (memaddr + len);
1648 if (readbuf != NULL)
1652 gdb_assert (
target_info->shadow_contents >= readbuf + len
1658 memcpy (readbuf + bp_addr - memaddr,
1659 target_info->shadow_contents + bptoffset, bp_size);
1663 const unsigned char *
bp;
1669 writebuf_org + bp_addr - memaddr, bp_size);
1677 memcpy (writebuf + bp_addr - memaddr,
bp + bptoffset, bp_size);
1701 const gdb_byte *writebuf_org,
1702 ULONGEST memaddr, LONGEST len)
1706 unsigned bc_l, bc_r, bc;
1714 while (bc_l + 1 < bc_r)
1718 bc = (bc_l + bc_r) / 2;
1764 warning (_(
"reading through apparently deleted breakpoint #%d?"),
1851static struct value *
1854 struct value *bit_val;
1879 gdb_assert (b->
loc == NULL);
1940 bool within_current_scope;
1951 gdb::optional<scoped_restore_selected_frame> restore_frame;
1955 within_current_scope =
true;
1974 restore_frame.emplace ();
1977 within_current_scope = (fi != NULL);
1978 if (within_current_scope)
1987 if (within_current_scope && reparse)
2030 error (_(
"Can't set read/access watchpoint when "
2031 "hardware watchpoints are disabled."));
2034 else if (within_current_scope && b->
exp)
2036 std::vector<value_ref_ptr> val_chain;
2037 struct value *v, *result;
2060 gdb_assert (!val_chain.empty ());
2079 || (vtype->
code () != TYPE_CODE_STRUCT
2080 && vtype->
code () != TYPE_CODE_ARRAY))
2083 enum target_hw_bp_type
type;
2085 int bitpos = 0, bitsize = 0;
2117 for (tmp = &(b->
loc); *tmp != NULL; tmp = &((*tmp)->next))
2122 loc->pspace = frame_pspace;
2129 loc->length = ((bitpos % 8) + bitsize + 7) / 8;
2151 int i, target_resources_ok, other_type_used;
2184 if (target_resources_ok <= 0)
2188 if (target_resources_ok == 0 && !sw_mode)
2189 error (_(
"Target does not support this type of "
2190 "hardware watchpoint."));
2191 else if (target_resources_ok < 0 && !sw_mode)
2192 error (_(
"There are not enough available hardware "
2193 "resources for this watchpoint."));
2210 error (_(
"Can't set read/access watchpoint when "
2211 "hardware watchpoints are disabled."));
2213 error (_(
"Expression cannot be implemented with "
2214 "read/access watchpoint."));
2232 else if (!within_current_scope)
2235Watchpoint %d deleted because the program has left the block\n\
2236in which its expression is valid.\n"),
2304 "skipping watchpoint at %s:%d",
2318 scoped_restore restore_bl_duplicate
2319 = make_scoped_restore (&bl->
duplicate, 0);
2344 catch (
const gdb_exception_error &ex)
2364 bool null_condition_or_parse_error =
false;
2405 if (!
loc->cond_bytecode)
2407 null_condition_or_parse_error =
true;
2419 if (null_condition_or_parse_error)
2427 if (!
loc->cond_bytecode)
2430 loc->cond_bytecode.reset ();
2447 && !
loc->disabled_by_cond)
2464 const char *cmdrest;
2465 const char *format_start, *format_end;
2473 if (*cmdrest ==
',')
2475 cmdrest = skip_spaces (cmdrest);
2477 if (*cmdrest++ !=
'"')
2478 error (_(
"No format string following the location"));
2480 format_start = cmdrest;
2482 format_pieces fpieces (&cmdrest);
2484 format_end = cmdrest;
2486 if (*cmdrest++ !=
'"')
2487 error (_(
"Bad format string, non-terminated '\"'."));
2489 cmdrest = skip_spaces (cmdrest);
2491 if (!(*cmdrest ==
',' || *cmdrest ==
'\0'))
2492 error (_(
"Invalid argument syntax"));
2494 if (*cmdrest ==
',')
2496 cmdrest = skip_spaces (cmdrest);
2500 std::vector<struct expression *> argvec;
2501 while (*cmdrest !=
'\0')
2507 argvec.push_back (
expr.release ());
2509 if (*cmdrest ==
',')
2520 format_start, format_end - format_start,
2521 argvec.size (), argvec.data ());
2523 catch (
const gdb_exception_error &ex)
2541 bool null_command_or_parse_error =
false;
2583 loc->owner->extra_string.get ());
2588 if (!
loc->cmd_bytecode)
2590 null_command_or_parse_error =
true;
2598 if (null_command_or_parse_error)
2606 if (
loc->cmd_bytecode == NULL)
2609 loc->cmd_bytecode.reset ();
2623 &&
loc->owner->extra_string
2628 && !
loc->disabled_by_cond)
2675 if (e.error != TARGET_CLOSE_ERROR)
2696 struct ui_file *tmp_error_stream,
2697 int *disabled_breaks,
2698 int *hw_breakpoint_error,
2699 int *hw_bp_error_explained_already)
2701 gdb_exception bp_excpt;
2745 _(
"Cannot insert breakpoint %d.\n"
2746 "Cannot set software breakpoint "
2747 "at read-only address %s\n"),
2769 bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
2771 catch (gdb_exception &e)
2774 bp_excpt = std::move (e);
2787 warning (_(
"hardware breakpoint %d not supported in overlay!"),
2809 = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
2811 catch (gdb_exception &e)
2814 bp_excpt = std::move (e);
2817 if (bp_excpt.reason != 0)
2819 "Overlay breakpoint %d "
2820 "failed: in ROM?\n",
2834 bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR};
2836 catch (gdb_exception &e)
2839 bp_excpt = std::move (e);
2850 if (bp_excpt.reason != 0)
2853 gdb_assert (bl->
owner !=
nullptr);
2863 if (bp_excpt.reason == RETURN_ERROR
2864 && (bp_excpt.error == GENERIC_ERROR
2865 || bp_excpt.error == MEMORY_ERROR)
2874 if (!*disabled_breaks)
2877 "Cannot insert breakpoint %d.\n",
2880 "Temporarily disabling shared "
2881 "library breakpoints:\n");
2883 *disabled_breaks = 1;
2892 *hw_breakpoint_error = 1;
2893 *hw_bp_error_explained_already = bp_excpt.message != NULL;
2895 "Cannot insert hardware breakpoint %d%s",
2897 bp_excpt.message ?
":" :
".\n");
2898 if (bp_excpt.message != NULL)
2904 if (bp_excpt.message == NULL)
2911 "Cannot insert breakpoint %d.\n"
2918 "Cannot insert breakpoint %d: %s\n",
2951 &&
loc->watchpoint_type == hw_access
2987Error inserting catchpoint %d: Your system does not support this type\n\
2990 warning (_(
"Error inserting catchpoint %d."), bl->
owner->
number);
3025 if (
loc->owner->loc ==
loc)
3026 loc->owner->loc =
loc->next;
3028 for (tmp =
loc->owner->loc; tmp->
next != NULL; tmp = tmp->
next)
3076 int disabled_breaks = 0;
3077 int hw_breakpoint_error = 0;
3078 int hw_bp_details_reported = 0;
3084 tmp_error_stream.
puts (
"Warning:\n");
3098 if (!bl->inserted || !bl->needs_update)
3112 &hw_breakpoint_error, &hw_bp_details_reported);
3131 int disabled_breaks = 0;
3132 int hw_breakpoint_error = 0;
3133 int hw_bp_error_explained_already = 0;
3139 tmp_error_stream.
puts (
"Warning:\n");
3151 if (bl->owner->thread != -1
3166 &hw_breakpoint_error, &hw_bp_error_explained_already);
3175 bool some_failed =
false;
3199 hw_breakpoint_error = 1;
3200 tmp_error_stream.
printf (
"Could not insert "
3201 "hardware watchpoint %d.\n",
3211 if (hw_breakpoint_error && !hw_bp_error_explained_already)
3213 tmp_error_stream.
printf (
"Could not insert hardware breakpoints:\n\
3214You may have requested too many hardware breakpoints/watchpoints.\n");
3250Thread-specific breakpoint %d deleted - thread %s no longer in the thread list.\n"),
3268 if (bl->pspace !=
inf->pspace)
3271 if (bl->inserted && !bl->target_info.persist)
3306 std::unique_ptr<internal_breakpoint> b
3343 "longjmp",
"_longjmp",
"siglongjmp",
"_siglongjmp"
3345#define NUM_LONGJMP_NAMES ARRAY_SIZE(longjmp_names)
3400 if (bp_objfile_data == NULL)
3402 return bp_objfile_data;
3408 const char *
const func_name =
"_ovly_debug_event";
3426 if (m.minsym == NULL)
3465 std::vector<probe *> ret
3514 unsigned int installed_bp = 0;
3519 const char *func_name;
3531 if (m.minsym == NULL)
3547 return installed_bp > 0;
3564 if (obj->separate_debug_objfile_backlink !=
nullptr)
3584 const char *
const func_name =
"std::terminate()";
3607 if (m.minsym == NULL || (m.minsym->type () !=
mst_text
3641 std::vector<probe *> ret
3683 const char *
const func_name =
"_Unwind_DebugHook";
3700 if (debug_hook.
minsym == NULL)
3725 if (obj->separate_debug_objfile_backlink)
3761 gdb_assert (!bploc->inserted);
3871 scoped_restore save_inferior_ptid = make_scoped_restore (&
inferior_ptid);
3875 error (_(
"Cannot detach breakpoints of inferior_ptid"));
3881 if (bl->pspace !=
inf->pspace)
3913 gdb_assert (bl->
owner != NULL);
4030 warning (_(
"Could not remove hardware watchpoint %d."),
4051 gdb_assert (bl->
owner != NULL);
4166 w->
val.reset (
nullptr);
4201 bool any_breakpoint_here =
false;
4218 else if (bl->permanent)
4221 any_breakpoint_here =
true;
4232 CORE_ADDR addr, ULONGEST len)
4346 CORE_ADDR addr, ULONGEST len)
4358 if (
loc->pspace->aspace == aspace &&
loc->inserted)
4363 l = std::max<CORE_ADDR> (
loc->address, addr);
4364 h = std::min<CORE_ADDR> (
loc->address +
loc->length, addr + len);
4403 bp_location_at (other.bp_location_at),
4404 breakpoint_at (other.breakpoint_at),
4406 print (other.print),
4422 bpstat *retval =
nullptr;
4427 for (; bs != NULL; bs = bs->
next)
4450 for (; bsp != NULL; bsp = bsp->
next)
4463 for (; bsp != NULL; bsp = bsp->
next)
4469 if (sig == GDB_SIGNAL_TRAP)
4495 b = (*bsp)->breakpoint_at;
4496 *bsp = (*bsp)->
next;
4514 if (b !=
nullptr && b->
loc !=
nullptr && b->
loc->
next !=
nullptr)
4519 bl_i != bl && bl_i->
next !=
nullptr;
4527 warning (_(
"location number not found for breakpoint %d address %s."),
4544 uiout->
text (_(
"deleted breakpoint"));
4599 return cmd && (strcmp (
"silent", cmd->
line) == 0);
4612 (locno > 0 ? locno : 1));
4635 scoped_restore save_executing
4648 int printed_hit_bpnum = -1;
4649 int printed_hit_locno = -1;
4652 for (; bs != NULL; bs = bs->
next)
4664 if (printed_hit_locno == -1 && bs->
print)
4666 printed_hit_bpnum = b->
number;
4667 printed_hit_locno = locno;
4732 if (printed_hit_locno != -1)
4770 cleanup_if_error.release ();
4803 uiout->
text (
"Thread ");
4809 uiout->
text (
" \"");
4814 uiout->
text (
" hit ");
4855 internal_error (_(
"print_bp_stop_message: unrecognized enum value"));
4870 if (any_added || any_deleted)
4871 current_uiout->text (_(
"Stopped due to shared library event:\n"));
4873 current_uiout->text (_(
"Stopped due to shared library event (no "
4874 "libraries added or removed)\n"));
4942 for (; bs; bs = bs->
next)
4979 breakpoint_at (bl->owner),
4985 **bs_link_pointer =
this;
4986 *bs_link_pointer = &
next;
4991 breakpoint_at (NULL),
5008 if (!stopped_by_watchpoint)
5055 if (newaddr == start)
5091#define BP_TEMPFLAG 1
5092#define BP_HARDWAREFLAG 2
5102 bool within_current_scope;
5115 within_current_scope =
true;
5135 within_current_scope = (fr != NULL);
5139 if (within_current_scope)
5144 if (function == NULL
5146 within_current_scope =
false;
5149 if (within_current_scope)
5156 if (within_current_scope)
5164 struct value *new_val;
5183 if ((b->
val != NULL) != (new_val != NULL)
5190 if (new_val != NULL)
5224 uiout->
message (
"\nWatchpoint %pF deleted because the program has "
5225 "left the block in\n"
5226 "which its expression is valid.\n",
5250 gdb_assert (b != NULL);
5266 gdb_assert (bl != NULL);
5268 gdb_assert (b != NULL);
5271 bool must_check_value =
false;
5276 must_check_value =
true;
5281 must_check_value =
true;
5288 must_check_value =
true;
5290 if (must_check_value)
5298 catch (
const gdb_exception &ex)
5301 "Error evaluating expression "
5302 "for watchpoint %d\n",
5362 int other_write_watchpoint = 0;
5376 other_write_watchpoint = 1;
5382 if (other_write_watchpoint
5435 bool condition_result =
true;
5438 gdb_assert (bs->
stop);
5442 gdb_assert (bl != NULL);
5444 gdb_assert (b != NULL);
5447 thread->
ptid.to_string ().c_str (),
5486 cond = bl->
cond.get ();
5490 bool within_current_scope =
true;
5534 within_current_scope =
false;
5536 if (within_current_scope)
5542 catch (
const gdb_exception &ex)
5545 "Error in testing breakpoint condition:\n");
5550 warning (_(
"Watchpoint condition cannot be tested "
5551 "in the current scope"));
5558 if (cond !=
nullptr && !condition_result)
5600 bpstat *bs_head =
nullptr, **bs_link = &bs_head;
5617 if (!bl->enabled || bl->disabled_by_cond || bl->shlib_disabled)
5679 bpstat *bs_head = stop_chain;
5681 int need_remove_insert;
5690 if (bs_head == NULL)
5697 for (bs = bs_head; bs != NULL; bs = bs->
next)
5712 for (bs = bs_head; bs != NULL; bs = bs->
next)
5758 need_remove_insert = 0;
5760 for (bs = bs_head; bs != NULL; bs = bs->
next)
5768 need_remove_insert = 1;
5771 if (need_remove_insert)
5773 else if (removed_any)
5812 gdb_assert (jit_bp_sym.
objfile !=
nullptr);
5835 for (bs = bs_head; bs != NULL; bs = bs->next)
5842 if (bs->breakpoint_at == NULL)
5849 bptype = bs->breakpoint_at->type;
5974 internal_error (_(
"bpstat_what: tracepoint encountered"));
5994 internal_error (_(
"bpstat_what: unhandled bptype %d"), (
int)
bptype);
6008 for (bs = bs_head; bs != NULL; bs = bs->
next)
6046 for (; bs != NULL; bs = bs->
next)
6062 int i, total_width, width, align;
6068 if (strcmp (text, col_name) == 0)
6071 total_width += width + 1;
6088 char host_evals = 0;
6089 char target_evals = 0;
6103 if (bl->cond_bytecode)
6109 if (host_evals && target_evals)
6111 else if (target_evals)
6146 if (
loc != NULL &&
loc->shlib_disabled)
6154 else if (
loc &&
loc->symtab)
6160 uiout->
text (
"in ");
6165 uiout->
text (
"at ");
6215 struct ep_type_description
6218 const char *description;
6220 static struct ep_type_description bptypes[] =
6259 if (((
int)
type >= (
sizeof (bptypes) /
sizeof (bptypes[0])))
6261 internal_error (_(
"bptypes table does not describe type #%d."),
6264 return bptypes[(int)
type].description;
6273 const std::vector<int> &inf_nums,
6280 if (!is_mi && mi_only)
6285 for (
size_t i = 0; i < inf_nums.size (); i++)
6291 xsnprintf (mi_group,
sizeof (mi_group),
"i%d", inf_nums[i]);
6297 uiout->
text (
" inf ");
6301 uiout->
text (plongest (inf_nums[i]));
6322 int allflag,
bool raw_loc)
6325 static char bpenables[] =
"nynny";
6328 bool header_of_multiple =
false;
6329 bool part_of_multiple = (
loc != NULL);
6334 gdb_assert (!
loc || loc_number != 0);
6341 header_of_multiple =
true;
6349 if (part_of_multiple)
6356 if (part_of_multiple)
6363 if (part_of_multiple)
6370 if (part_of_multiple)
6377 auto get_enable_state = [uiout,
loc] () ->
const char *
6381 if (
loc->disabled_by_cond)
6383 else if (!
loc->enabled)
6390 if (
loc->disabled_by_cond)
6392 else if (!
loc->enabled)
6406 bool result =
false;
6407 if (!raw_loc && b->
print_one (last_loc))
6418 if (opts.addressprint)
6426 if (opts.addressprint)
6429 if (header_of_multiple)
6432 else if (b->
loc == NULL ||
loc->shlib_disabled)
6437 loc->gdbarch,
loc->address);
6440 if (!header_of_multiple)
6447 if (
loc != NULL && !header_of_multiple)
6449 std::vector<int> inf_nums;
6454 if (
inf->pspace ==
loc->pspace)
6455 inf_nums.push_back (
inf->num);
6471 if (!part_of_multiple)
6477 uiout->
text (
" thread ");
6480 else if (b->
task != 0)
6482 uiout->
text (
" task ");
6489 if (!part_of_multiple)
6495 uiout->
text (
"\tstop only in stack frame at ");
6507 uiout->
text (
"\ttrace only if ");
6509 uiout->
text (
"\tstop only if ");
6518 uiout->
message (
" (%pF evals)",
6525 if (!part_of_multiple && b->
thread != -1)
6528 uiout->
text (
"\tstop only in thread ");
6540 if (!part_of_multiple)
6546 uiout->
text (
"\tcatchpoint");
6548 uiout->
text (
"\ttracepoint");
6550 uiout->
text (
"\tbreakpoint");
6551 uiout->
text (
" already hit ");
6554 uiout->
text (
" time\n");
6556 uiout->
text (
" times\n");
6569 uiout->
message (
"\tignore next %pF hits\n",
6579 uiout->
text (
"\tdisable after ");
6583 uiout->
text (
"additional ");
6585 uiout->
text (
"next ");
6587 uiout->
text (
" hits\n");
6596 uiout->
text (
"\ttrace buffer usage ");
6598 uiout->
text (
" bytes\n");
6603 if (!part_of_multiple && l)
6607 bool use_fixed_output =
6611 gdb::optional<ui_out_emit_tuple> tuple_emitter;
6612 gdb::optional<ui_out_emit_list> list_emitter;
6614 if (use_fixed_output)
6615 list_emitter.emplace (uiout,
"script");
6617 tuple_emitter.emplace (uiout,
"script");
6629 uiout->
text (
"\tpass count ");
6631 uiout->
text (
" \n");
6636 if (!header_of_multiple &&
loc != NULL && !
loc->shlib_disabled)
6642 loc->inserted ?
"y" :
"n");
6648 uiout->
text (
"\tnot ");
6649 uiout->
text (
"installed on target\n");
6662 else if (b->
locspec !=
nullptr)
6664 const char *str = b->
locspec->to_string ();
6683 bool use_fixed_output
6687 gdb::optional<ui_out_emit_tuple> bkpt_tuple_emitter (gdb::in_place, uiout,
"bkpt");
6693 if (!use_fixed_output)
6694 bkpt_tuple_emitter.reset ();
6699 if (!printed || allflag)
6721 gdb::optional<ui_out_emit_list> locations_list;
6727 locations_list.emplace (uiout,
"locations");
6744 int print_address_bits = 0;
6752 if (addr_bit > print_address_bits)
6753 print_address_bits = addr_bit;
6756 return print_address_bits;
6782 return b->
loc == NULL;
6803 int nr_printable_breakpoints;
6805 int print_address_bits = 0;
6806 int print_type_col_width = 14;
6808 bool has_disabled_by_cond_location =
false;
6814 nr_printable_breakpoints = 0;
6818 if (filter && !filter (b))
6823 if (bp_num_list != NULL && *bp_num_list !=
'\0')
6833 int addr_bit, type_len;
6836 if (addr_bit > print_address_bits)
6837 print_address_bits = addr_bit;
6840 if (type_len > print_type_col_width)
6841 print_type_col_width = type_len;
6843 nr_printable_breakpoints++;
6849 opts.addressprint ? 6 : 5,
6850 nr_printable_breakpoints,
6853 if (nr_printable_breakpoints > 0)
6855 if (nr_printable_breakpoints > 0)
6858 if (nr_printable_breakpoints > 0)
6861 if (nr_printable_breakpoints > 0)
6864 if (nr_printable_breakpoints > 0)
6867 if (opts.addressprint)
6869 if (nr_printable_breakpoints > 0)
6871 if (print_address_bits <= 32)
6876 if (nr_printable_breakpoints > 0)
6880 if (nr_printable_breakpoints > 0)
6887 if (filter && !filter (b))
6893 if (bp_num_list != NULL && *bp_num_list !=
'\0')
6912 if (
loc->disabled_by_cond)
6913 has_disabled_by_cond_location =
true;
6918 if (nr_printable_breakpoints == 0)
6924 if (bp_num_list == NULL || *bp_num_list ==
'\0')
6925 uiout->
message (
"No breakpoints or watchpoints.\n");
6927 uiout->
message (
"No breakpoint or watchpoint matching '%s'.\n",
6936 if (has_disabled_by_cond_location && !uiout->
is_mi_like_p ())
6937 uiout->
message (_(
"(*): Breakpoint condition is invalid at this "
6945 return nr_printable_breakpoints;
6964 uiout->
text (
"default collect ");
6966 uiout->
text (
" \n");
6983 if (num_printed == 0)
6985 if (args == NULL || *args ==
'\0')
6986 uiout->
message (
"No watchpoints.\n");
6988 uiout->
message (
"No watchpoint matching '%s'.\n", args);
7007 if (bl->pspace == pspace
7008 && bl->address == pc
7039 if (b->
thread == -1 && thread != -1)
7041 else if (b->
thread != -1)
7049 : ((others == 1) ?
" and" :
""));
7086 gdb_assert (w1 != NULL);
7087 gdb_assert (w2 != NULL);
7104 w2->cond_exp.get ())))
7126 || aspace1 == aspace2)
7142 || aspace1 == aspace2)
7143 && addr2 >= addr1 && addr2 < addr1 + len1);
7173 CORE_ADDR addr,
int len)
7212 bool sw_hw_bps_match)
7214 int hw_point1, hw_point2;
7217 gdb_assert (loc1->
owner != NULL);
7218 gdb_assert (loc2->
owner != NULL);
7223 if (hw_point1 != hw_point2)
7241 int bnum,
bool have_bnum)
7248 strcpy (astr1, hex_string_custom ((
unsigned long) from_addr, 8));
7249 strcpy (astr2, hex_string_custom ((
unsigned long) to_addr, 8));
7251 warning (_(
"Breakpoint %d address previously adjusted from %s to %s."),
7252 bnum, astr1, astr2);
7254 warning (_(
"Breakpoint address adjusted from %s to %s."), astr1, astr2);
7267 gdb_assert (
pspace !=
nullptr);
7291 CORE_ADDR adjusted_bpaddr = bpaddr;
7313 if (adjusted_bpaddr != bpaddr)
7316 return adjusted_bpaddr;
7365 internal_error (_(
"unknown breakpoint type"));
7371 this->owner =
owner;
7420 b1->
next = b.release ();
7431 gdb_assert (
loc->owner != NULL);
7437 const char *function_name;
7439 if (
loc->msymbol != NULL
7445 function_name =
loc->msymbol->linkage_name ();
7455 loc->related_address =
loc->address;
7462 loc->function_name = make_unique_xstrdup (function_name);
7610 bool unwind_finished_unexpectedly =
false;
7614 if (prev ==
nullptr)
7619 if (stop_reason != UNWIND_NO_REASON
7620 && stop_reason != UNWIND_OUTERMOST)
7621 unwind_finished_unexpectedly =
true;
7625 if (unwind_finished_unexpectedly)
7808 && !
loc->shlib_disabled
7812 loc->shlib_disabled = 1;
7824 bool disabled_shlib_breaks =
false;
7832 && !
loc->shlib_disabled
7841 loc->shlib_disabled = 1;
7850 if (!disabled_shlib_breaks)
7853 warning (_(
"Temporarily disabling breakpoints "
7854 "for unloaded shared library \"%s\""),
7857 disabled_shlib_breaks =
true;
7889 bool bp_modified =
false;
7896 CORE_ADDR loc_addr =
loc->address;
7902 if (
loc->shlib_disabled != 0)
7914 loc->shlib_disabled = 1;
7935 bool temp,
const char *cond_string_)
7942 ? make_unique_xstrdup (cond_string_)
8023 *other_type_used = 0;
8034 *other_type_used = 1;
8078template<
typename... Arg>
8085 std::forward<Arg> (args)...);
8088 std::forward<Arg> (args)...);
8103 std::unique_ptr<momentary_breakpoint> b
8107 b->add_location (sal);
8126 std::unique_ptr<breakpoint> copy
8129 copy->loc = copy->allocate_location ();
8137 copy->loc->probe = orig->
loc->
probe;
8140 copy->loc->enabled = loc_enabled;
8227 static bool said =
false;
8233 "hardware breakpoints for "
8234 "read-only addresses.\n"));
8246 CORE_ADDR adjusted_address;
8249 if (loc_gdbarch == NULL)
8264 for (tmp = &(
loc); *tmp != NULL && (*tmp)->
address <= adjusted_address;
8265 tmp = &((*tmp)->next))
8267 new_loc->
next = *tmp;
8271 new_loc->
address = adjusted_address;
8275 gdb_assert (new_loc->
pspace != NULL);
8277 new_loc->
gdbarch = loc_gdbarch;
8312 gdb_assert (
loc != NULL);
8334 gdb::unique_xmalloc_ptr<char> printf_line =
nullptr;
8339 dprintf_args = skip_spaces (dprintf_args);
8343 if (*dprintf_args ==
',')
8345 dprintf_args = skip_spaces (dprintf_args);
8347 if (*dprintf_args !=
'"')
8348 error (_(
"Bad format string, missing '\"'."));
8351 printf_line = xstrprintf (
"printf %s", dprintf_args);
8355 error (_(
"No function supplied for dprintf call"));
8358 printf_line = xstrprintf (
"call (void) %s (%s,%s)",
8363 printf_line = xstrprintf (
"call (void) %s (%s)",
8370 printf_line = xstrprintf (
"agent-printf %s", dprintf_args);
8373 warning (_(
"Target cannot run dprintf commands, falling back to GDB printf"));
8374 printf_line = xstrprintf (
"printf %s", dprintf_args);
8378 internal_error (_(
"Invalid dprintf style."));
8380 gdb_assert (printf_line != NULL);
8403 gdb::array_view<const symtab_and_line> sals,
8405 gdb::unique_xmalloc_ptr<char> filter_,
8406 gdb::unique_xmalloc_ptr<char> cond_string_,
8407 gdb::unique_xmalloc_ptr<char> extra_string_,
8408 enum bpdisp disposition_,
8409 int thread_,
int task_,
int ignore_count_,
8411 int enabled_,
unsigned flags,
8412 int display_canonical_)
8419 int target_resources_ok;
8422 target_resources_ok =
8425 if (target_resources_ok == 0)
8426 error (_(
"No hardware breakpoint support in the target."));
8427 else if (target_resources_ok < 0)
8428 error (_(
"Hardware breakpoints used exceeds limit."));
8431 gdb_assert (!sals.empty ());
8445 auto *t = gdb::checked_static_cast<struct tracepoint *> (
this);
8452 const char *p = &locspec_->to_string ()[3];
8455 p = skip_spaces (p);
8457 endp = skip_to_space (p);
8459 t->static_trace_marker_id.assign (p, endp - p);
8461 gdb_printf (_(
"Probed static tracepoint marker \"%s\"\n"),
8462 t->static_trace_marker_id.c_str ());
8466 t->static_trace_marker_id = std::move (marker.
str_id);
8468 gdb_printf (_(
"Probed static tracepoint marker \"%s\"\n"),
8469 t->static_trace_marker_id.c_str ());
8472 warning (_(
"Couldn't determine the static tracepoint marker to probe"));
8475 for (
const auto &sal : sals)
8480 if (loc_gdbarch ==
nullptr)
8484 sal.pspace, sal.pc, sal.section,
thread);
8502 error (_(
"Format string required"));
8505 error (_(
"Garbage '%s' at end of command"),
extra_string.get ());
8521 if (locspec_ !=
nullptr)
8522 locspec = std::move (locspec_);
8525 filter = std::move (filter_);
8530 gdb::array_view<const symtab_and_line> sals,
8532 gdb::unique_xmalloc_ptr<char> filter,
8533 gdb::unique_xmalloc_ptr<char> cond_string,
8534 gdb::unique_xmalloc_ptr<char> extra_string,
8536 int thread,
int task,
int ignore_count,
8538 int enabled,
int internal,
unsigned flags,
8539 int display_canonical)
8541 std::unique_ptr<code_breakpoint> b
8545 std::move (locspec),
8547 std::move (cond_string),
8548 std::move (extra_string),
8550 thread, task, ignore_count,
8576 gdb::unique_xmalloc_ptr<char> cond_string,
8577 gdb::unique_xmalloc_ptr<char> extra_string,
8579 int thread,
int task,
int ignore_count,
8581 int enabled,
int internal,
unsigned flags)
8584 gdb_assert (canonical->
lsals.size () == 1);
8586 for (
const auto &lsal : canonical->
lsals)
8591 = (canonical->
locspec !=
nullptr
8592 ? canonical->
locspec->clone ()
8594 gdb::unique_xmalloc_ptr<char> filter_string
8595 (lsal.canonical != NULL ? xstrdup (lsal.canonical) : NULL);
8598 std::move (locspec),
8599 std::move (filter_string),
8600 std::move (cond_string),
8601 std::move (extra_string),
8603 thread, task, ignore_count,
8604 from_tty, enabled, internal,
flags,
8639 CORE_ADDR
pc = sal.
pc;
8655 canonical->lsals.push_back (std::move (lsal));
8659 error (_(
"No default breakpoint address now."));
8673 const char *spec = NULL;
8680 && strchr (
"+-", spec[0]) != NULL
8702 for (
auto &sal :
sals)
8715 gdb::array_view<const symtab_and_line>
sals)
8717 for (
const auto &sal :
sals)
8728 error (_(
"May not have a fast tracepoint at %s%s"),
8729 paddress (sarch, sal.pc), msg.c_str ());
8742 gdb::unique_xmalloc_ptr<char> *cond_string,
8743 int *thread,
int *task,
8744 gdb::unique_xmalloc_ptr<char> *rest)
8746 cond_string->reset ();
8754 const char *end_tok;
8756 const char *cond_start = NULL;
8757 const char *cond_end = NULL;
8759 tok = skip_spaces (tok);
8761 if ((*tok ==
'"' || *tok ==
',') && rest)
8763 rest->reset (savestring (tok, strlen (tok)));
8767 end_tok = skip_to_space (tok);
8769 toklen = end_tok - tok;
8771 if (toklen >= 1 && strncmp (tok,
"if", toklen) == 0)
8773 tok = cond_start = end_tok + 1;
8778 catch (
const gdb_exception_error &)
8783 tok = tok + strlen (tok);
8786 cond_string->reset (savestring (cond_start, cond_end - cond_start));
8788 else if (toklen >= 1 && strncmp (tok,
"-force-condition", toklen) == 0)
8793 else if (toklen >= 1 && strncmp (tok,
"thread", toklen) == 0)
8801 error (_(
"Junk after thread keyword."));
8805 else if (toklen >= 1 && strncmp (tok,
"task", toklen) == 0)
8810 *task = strtol (tok, &tmptok, 0);
8812 error (_(
"Junk after task keyword."));
8814 error (_(
"Unknown task %d."), *task);
8819 rest->reset (savestring (tok, strlen (tok)));
8823 error (_(
"Junk at end of arguments."));
8835 gdb::unique_xmalloc_ptr<char> *cond_string,
8836 int *thread,
int *task,
8837 gdb::unique_xmalloc_ptr<char> *rest)
8839 int num_failures = 0;
8840 for (
auto &sal : sals)
8842 gdb::unique_xmalloc_ptr<char> cond;
8845 gdb::unique_xmalloc_ptr<char> remaining;
8856 &task_id, &remaining);
8857 *cond_string = std::move (cond);
8858 *thread = thread_id;
8860 *rest = std::move (remaining);
8863 catch (
const gdb_exception_error &e)
8867 if (num_failures == sals.size ())
8875static std::vector<symtab_and_line>
8878 const char *p = &(*arg_p)[3];
8881 p = skip_spaces (p);
8883 endp = skip_to_space (p);
8885 std::string marker_str (p, endp - p);
8887 std::vector<static_tracepoint_marker> markers
8889 if (markers.empty ())
8890 error (_(
"No known static tracepoint marker named %s"),
8891 marker_str.c_str ());
8893 std::vector<symtab_and_line> sals;
8894 sals.reserve (markers.size ());
8899 sal.
pc = marker.address;
8900 sals.push_back (sal);
8936 if (locspec !=
nullptr)
8947 const char *cond_string,
8948 int thread,
const char *extra_string,
8949 bool force_condition,
int parse_extra,
8950 int tempflag,
enum bptype type_wanted,
8954 int from_tty,
int enabled,
int internal,
8962 gdb_assert (ops != NULL);
8965 if (extra_string != NULL && *extra_string ==
'\0')
8966 extra_string = NULL;
8972 catch (
const gdb_exception_error &e)
8976 if (e.error == NOT_FOUND_ERROR)
8989 && !
nquery (_(
"Make %s pending on future shared library load? "),
9010 for (
auto &lsal : canonical.
lsals)
9017 for (
const auto &lsal : canonical.
lsals)
9026 gdb::unique_xmalloc_ptr<char> cond_string_copy;
9027 gdb::unique_xmalloc_ptr<char> extra_string_copy;
9031 gdb::unique_xmalloc_ptr<char> rest;
9032 gdb::unique_xmalloc_ptr<char> cond;
9037 &cond, &thread, &task, &rest);
9038 cond_string_copy = std::move (cond);
9039 extra_string_copy = std::move (rest);
9044 && extra_string != NULL && *extra_string !=
'\0')
9045 error (_(
"Garbage '%s' at end of location"), extra_string);
9051 if (cond_string !=
nullptr && !force_condition)
9053 int num_failures = 0;
9055 for (
const auto &sal : lsal.
sals)
9057 const char *cond = cond_string;
9064 catch (
const gdb_exception_error &)
9068 if (num_failures == lsal.
sals.size ())
9076 cond_string_copy.reset (xstrdup (cond_string));
9079 extra_string_copy.reset (xstrdup (extra_string));
9083 std::move (cond_string_copy),
9084 std::move (extra_string_copy),
9087 thread, task, ignore_count,
9088 from_tty, enabled, internal,
flags);
9094 b->locspec =
locspec->clone ();
9097 b->cond_string = NULL;
9101 b->cond_string.reset (cond_string != NULL
9102 ? xstrdup (cond_string)
9108 b->extra_string.reset (extra_string != NULL
9109 ? xstrdup (extra_string)
9111 b->ignore_count = ignore_count;
9113 b->condition_not_parsed = 1;
9122 if (canonical.
lsals.size () > 1)
9124 warning (_(
"Multiple breakpoints were set.\nUse the "
9125 "\"delete\" command to delete unwanted breakpoints."));
9156 NULL, 0, arg,
false, 1 ,
9157 tempflag, type_wanted,
9174 if (sal->
pc == 0 && sal->
symtab != NULL)
9177 error (_(
"No line %d in file \"%s\"."),
9190 const struct block *b;
9260 if (arg[0] !=
',' || arg[1] ==
'\0')
9261 error (_(
"Format string required"));
9271 NULL, 0, arg,
false, 1 ,
9285 error (_(
"May only run agent-printf on the target"));
9297 || ws.
sig () != GDB_SIGNAL_TRAP)
9301 bl->
length, aspace, bp_addr);
9323 gdb_assert (bl && bl->
next == NULL);
9330 uiout->
text (
"Temporary ranged breakpoint ");
9332 uiout->
text (
"Ranged breakpoint ");
9355 gdb_assert (bl && bl->
next == NULL);
9359 if (opts.addressprint)
9375 CORE_ADDR address_start, address_end;
9382 address_end = address_start + bl->
length - 1;
9384 uiout->
text (
"\taddress range: ");
9403 uiout->
message (_(
"Hardware assisted ranged breakpoint %d from %s to %s."),
9440 error (_(
"Could not find location of the end of the range."));
9454 const char *arg_start;
9456 int bp_count, can_use_bp, length;
9461 error (_(
"This target does not support hardware ranged breakpoints."));
9468 error (_(
"Hardware breakpoints used exceeds limit."));
9470 arg = skip_spaces (arg);
9471 if (arg == NULL || arg[0] ==
'\0')
9472 error(_(
"No address range specified."));
9480 error (_(
"Too few arguments."));
9481 else if (canonical_start.
lsals.empty ())
9482 error (_(
"Could not find location of the beginning of the range."));
9486 if (canonical_start.
lsals.size () > 1
9487 || lsal_start.
sals.size () != 1)
9488 error (_(
"Cannot create a ranged breakpoint with multiple locations."));
9491 std::string addr_string_start (arg_start, arg - arg_start);
9494 arg = skip_spaces (arg);
9510 &canonical_end, NULL, NULL);
9512 if (canonical_end.
lsals.empty ())
9513 error (_(
"Could not find location of the end of the range."));
9516 if (canonical_end.
lsals.size () > 1
9517 || lsal_end.
sals.size () != 1)
9518 error (_(
"Cannot create a ranged breakpoint with multiple locations."));
9523 if (sal_start.
pc > end)
9524 error (_(
"Invalid address range, end precedes start."));
9526 length = end - sal_start.
pc + 1;
9529 error (_(
"Address range too large."));
9530 else if (length == 1)
9541 std::unique_ptr<breakpoint> br
9544 std::move (start_locspec),
9545 std::move (end_locspec)));
9558 return exp->
op->constant_p ();
9682 gdb::optional<ui_out_emit_tuple> tuple_emitter;
9691 tuple_emitter.emplace (uiout,
"value");
9692 uiout->
text (
"\nOld value = ");
9695 uiout->
text (
"\nNew value = ");
9708 tuple_emitter.emplace (uiout,
"value");
9709 uiout->
text (
"\nValue = ");
9724 tuple_emitter.emplace (uiout,
"value");
9725 uiout->
text (
"\nOld value = ");
9728 uiout->
text (
"\nNew value = ");
9737 tuple_emitter.emplace (uiout,
"value");
9738 uiout->
text (
"\nValue = ");
9758 const char *tuple_name;
9763 uiout->
text (
"Watchpoint ");
9767 uiout->
text (
"Hardware watchpoint ");
9771 uiout->
text (
"Hardware read watchpoint ");
9772 tuple_name =
"hw-rwpt";
9775 uiout->
text (
"Hardware access (read/write) watchpoint ");
9776 tuple_name =
"hw-awpt";
9779 internal_error (_(
"Invalid hardware watchpoint type."));
9806 internal_error (_(
"Invalid watchpoint type."));
9828 using watchpoint::watchpoint;
9914 internal_error (_(
"Invalid hardware watchpoint type."));
9919Check the underlying instruction at PC for the memory\n\
9920address and value which triggered this watchpoint.\n"));
9936 uiout->
text (
"\tmask ");
9948 const char *tuple_name;
9953 uiout->
text (
"Masked hardware watchpoint ");
9957 uiout->
text (
"Masked hardware read watchpoint ");
9958 tuple_name =
"hw-rwpt";
9961 uiout->
text (
"Masked hardware access (read/write) watchpoint ");
9962 tuple_name =
"hw-awpt";
9965 internal_error (_(
"Invalid hardware watchpoint type."));
9992 internal_error (_(
"Invalid hardware watchpoint type."));
10013 bool just_location,
bool internal)
10016 const struct block *exp_valid_block = NULL, *cond_exp_valid_block = NULL;
10017 struct value *result;
10018 int saved_bitpos = 0, saved_bitsize = 0;
10019 const char *exp_start = NULL;
10020 const char *exp_end = NULL;
10021 const char *tok, *end_tok;
10023 const char *cond_start = NULL;
10024 const char *cond_end = NULL;
10029 bool use_mask =
false;
10030 CORE_ADDR mask = 0;
10034 if (arg != NULL && arg[0] !=
'\0')
10036 const char *value_start;
10038 exp_end = arg + strlen (arg);
10042 for (tok = exp_end - 1; tok > arg; tok--)
10045 while (tok > arg && (*tok ==
' ' || *tok ==
'\t'))
10050 while (tok > arg && (*tok !=
' ' && *tok !=
'\t'))
10052 value_start = tok + 1;
10055 while (tok > arg && (*tok ==
' ' || *tok ==
'\t'))
10062 while (tok > arg && (*tok !=
' ' && *tok !=
'\t'))
10065 toklen = end_tok - tok + 1;
10067 if (toklen == 6 && startswith (tok,
"thread"))
10076 error(_(
"You can specify only one thread."));
10082 if (*endp !=
' ' && *endp !=
'\t' && *endp !=
'\0')
10087 else if (toklen == 4 && startswith (tok,
"task"))
10091 task = strtol (value_start, &tmp, 0);
10092 if (tmp == value_start)
10093 error (_(
"Junk after task keyword."));
10095 error (_(
"Unknown task %d."), task);
10097 else if (toklen == 4 && startswith (tok,
"mask"))
10102 struct value *mask_value;
10105 error(_(
"You can specify only one mask."));
10107 use_mask = just_location =
true;
10128 std::string
expression (arg, exp_end - arg);
10136 while (exp_end > exp_start && (exp_end[-1] ==
' ' || exp_end[-1] ==
'\t'))
10144 len = exp_end - exp_start;
10145 while (len > 0 && isspace (exp_start[len - 1]))
10147 error (_(
"Cannot watch constant value `%.*s'."), len, exp_start);
10150 exp_valid_block = tracker.
block ();
10152 struct value *val_as_value =
nullptr;
10156 if (val_as_value != NULL && just_location)
10167 exp_valid_block = NULL;
10176 error (_(
"This target does not support masked watchpoints."));
10177 else if (ret == -2)
10178 error (_(
"Invalid mask or memory region."));
10181 else if (val_as_value != NULL)
10184 tok = skip_spaces (arg);
10185 end_tok = skip_to_space (tok);
10187 toklen = end_tok - tok;
10188 if (toklen >= 1 && strncmp (tok,
"if", toklen) == 0)
10190 tok = cond_start = end_tok + 1;
10196 cond_exp_valid_block = if_tracker.
block ();
10201 error (_(
"Junk at end of command."));
10213 if (exp_valid_block != NULL && wp_frame != NULL)
10235 scope_breakpoint->
frame_id = caller_frame_id;
10238 scope_breakpoint->
loc->
gdbarch = caller_arch;
10243 scope_breakpoint->
type,
10253 if (accessflag == hw_read)
10255 else if (accessflag == hw_access)
10260 std::unique_ptr<watchpoint> w;
10266 w->thread = thread;
10270 w->exp = std::move (exp);
10271 w->exp_valid_block = exp_valid_block;
10272 w->cond_exp_valid_block = cond_exp_valid_block;
10278 w->exp_string_reparse
10281 w->exp_string = xstrprintf (
"-location %.*s",
10282 (
int) (exp_end - exp_start), exp_start);
10285 w->exp_string.reset (savestring (exp_start, exp_end - exp_start));
10289 w->hw_wp_mask = mask;
10294 w->val_bitpos = saved_bitpos;
10295 w->val_bitsize = saved_bitsize;
10296 w->val_valid =
true;
10300 w->cond_string.reset (savestring (cond_start, cond_end - cond_start));
10302 w->cond_string = 0;
10306 w->watchpoint_frame = watchpoint_frame;
10312 w->watchpoint_thread = null_ptid;
10315 if (scope_breakpoint != NULL)
10319 w->related_breakpoint = scope_breakpoint;
10323 if (!just_location)
10339 int found_memory_cnt = 0;
10345 gdb_assert (!vals.empty ());
10346 struct value *head = vals[0].get ();
10369 struct value *v = iter.get ();
10390 || (vtype->
code () != TYPE_CODE_STRUCT
10391 && vtype->
code () != TYPE_CODE_ARRAY))
10405 found_memory_cnt += num_regs;
10418 return found_memory_cnt;
10452This evaluates EXPRESSION and watches the memory to which is refers.\n\
10453-l can be used as a short form of -location."),
10476 if (arg !=
nullptr && *arg ==
'\0')
10486 const char *text,
const char * )
10562 bp.get ()) != NULL)
10595 struct gdbarch *frame_gdbarch;
10608 std::vector<symtab_and_line> sals
10617 error (_(
"Couldn't get information on specified line."));
10620 error (_(
"Junk at end of arguments."));
10638 std::vector<breakpoint_up> breakpoints;
10640 gdb::optional<delete_longjmp_breakpoint_cleanup> lj_deleter;
10645 struct gdbarch *caller_gdbarch;
10654 breakpoints.emplace_back (std::move (caller_breakpoint));
10657 lj_deleter.emplace (thread);
10676 breakpoints.emplace_back (std::move (location_breakpoint));
10680 (std::unique_ptr<thread_fsm>
10682 std::move (breakpoints))));
10685 lj_deleter->release ();
10687 proceed (-1, GDB_SIGNAL_DEFAULT);
10697 uintptr_t ua = (uintptr_t) a;
10698 uintptr_t ub = (uintptr_t) b;
10709 return ua > ub ? 1 : 0;
10719 std::vector<symtab_and_line> decoded_sals;
10721 gdb::array_view<symtab_and_line> sals;
10729 sals = decoded_sals;
10737 if (last_sal.
symtab == 0)
10738 error (_(
"No source file specified."));
10766 std::vector<struct breakpoint *> found;
10767 for (
const auto &sal : sals)
10769 const char *sal_fullname;
10783 sal_fullname = (sal.symtab == NULL
10798 int pc_match = (!sal.explicit_line
10800 && (
loc->pspace == sal.pspace)
10801 && (
loc->address == sal.pc)
10803 ||
loc->section == sal.section));
10804 int line_match = 0;
10806 if ((default_match || sal.explicit_line)
10807 &&
loc->symtab != NULL
10808 && sal_fullname != NULL
10809 && sal.pspace ==
loc->pspace
10810 &&
loc->line_number == sal.line
10812 sal_fullname) == 0)
10815 if (pc_match || line_match)
10824 found.push_back (b);
10829 if (found.empty ())
10832 error (_(
"No breakpoint at %s."), arg);
10834 error (_(
"No breakpoint at this line."));
10838 std::sort (found.begin (), found.end (),
10841 return compare_breakpoints (bp_a, bp_b) < 0;
10843 found.erase (std::unique (found.begin (), found.end (),
10846 return compare_breakpoints (bp_a, bp_b) == 0;
10850 if (found.size () > 1)
10854 if (found.size () == 1)
10877 for (; bs; bs = bs->
next)
10945 CORE_ADDR start, end, addr;
10950 start = bl->target_info.placed_address;
10951 end = start + bl->target_info.shadow_len;
10953 gdb_assert (bl->address >= start);
10954 addr = bl->address - start;
10960 gdb_assert (bl->address < end);
10961 addr = end - bl->address;
10972 enum tribool can_download_tracepoint = TRIBOOL_UNKNOWN;
10979 bool bp_location_downloaded =
false;
10986 if (can_download_tracepoint == TRIBOOL_UNKNOWN)
10989 can_download_tracepoint = TRIBOOL_TRUE;
10991 can_download_tracepoint = TRIBOOL_FALSE;
10994 if (can_download_tracepoint == TRIBOOL_FALSE)
11010 bp_location_downloaded =
true;
11014 if (bp_location_downloaded)
11024 const int left_inserted = left->
inserted;
11025 const int left_duplicate = left->
duplicate;
11053 CORE_ADDR address = 0;
11074 || pspace_num !=
loc->pspace->num)
11086 loc->cond_bytecode.reset ();
11102 CORE_ADDR last_addr = 0;
11104 int last_pspace_num = -1;
11119 std::vector<bp_location *> old_locations = std::move (
bp_locations);
11154 bool found_object =
false;
11156 bool keep_in_target =
false;
11157 bool removed =
false;
11165 for (
size_t loc2_i = loc_i;
11175 && (last_addr != old_loc->address
11176 || last_pspace_num != old_loc->pspace->num))
11179 last_pspace_num = old_loc->pspace->num;
11183 found_object =
true;
11188 last_addr = old_loc->address;
11200 if (old_loc->inserted)
11209 keep_in_target =
true;
11225 for (
size_t loc2_i = loc_i;
11232 if (loc2 == old_loc)
11252 keep_in_target =
true;
11260 if (!keep_in_target)
11273 "breakpoint %d\n"),
11274 old_loc->owner->number);
11332 if (
inf->pspace == old_loc->pspace)
11334 proc_target =
inf->process_target ();
11337 if (proc_target !=
nullptr)
11338 old_loc->events_till_retirement
11341 old_loc->events_till_retirement = 1;
11342 old_loc->owner = NULL;
11348 old_loc->owner = NULL;
11364 bp_loc_first = NULL;
11365 wp_loc_first = NULL;
11366 awp_loc_first = NULL;
11367 rwp_loc_first = NULL;
11389 loc_first_p = &wp_loc_first;
11391 loc_first_p = &rwp_loc_first;
11393 loc_first_p = &awp_loc_first;
11395 loc_first_p = &bp_loc_first;
11397 if (*loc_first_p == NULL
11401 *loc_first_p =
loc;
11402 loc->duplicate = 0;
11406 loc->needs_update = 1;
11419 loc->duplicate = 1;
11451 if (--(
loc->events_till_retirement) == 0)
11468 catch (
const gdb_exception_error &e)
11480 for (bs = bps; bs; bs = bs->
next)
11511 if (b->
loc == NULL)
11535 if (opts.addressprint || b->
loc->
symtab == NULL)
11546 const char *filename
11584#define internal_error_pure_virtual_called() \
11585 gdb_assert_not_reached ("pure virtual function called")
11663 if (result == 0 && bl->
probe.
prob !=
nullptr)
11696 || ws.
sig () != GDB_SIGNAL_TRAP)
11762 uiout->
text (
"Temporary breakpoint ");
11764 uiout->
text (
"Breakpoint ");
11766 uiout->
text (
", ");
11787 gdb_printf (_(
" at gnu-indirect-function resolver"));
11813 internal_error (_(
"unhandled breakpoint type %d"), (
int)
type);
11825std::vector<symtab_and_line>
11839 gdb_assert (canonical.
lsals.size () < 2);
11841 if (!canonical.
lsals.empty ())
11844 return std::move (lsal.
sals);
11907 gdb_printf (_(
"Thread Event Breakpoint: gdb should not stop!\n"));
11912 gdb_printf (_(
"Overlay Event Breakpoint: gdb should not stop!\n"));
11917 gdb_printf (_(
"Longjmp Master Breakpoint: gdb should not stop!\n"));
11922 gdb_printf (_(
"std::terminate Master Breakpoint: "
11923 "gdb should not stop!\n"));
11928 gdb_printf (_(
"Exception Master Breakpoint: "
11929 "gdb should not stop!\n"));
11993 canonical->lsals.push_back (std::move (lsal));
11996static std::vector<symtab_and_line>
12001 std::vector<symtab_and_line>
sals
12004 error (_(
"probe not found"));
12026 uiout->
message (
"\tmarker id is %pF\n",
12054 internal_error (_(
"unhandled tracepoint type %d"), (
int)
type);
12071 internal_error (_(
"unhandled tracepoint type %d"), (
int)
type);
12144 gdb_assert (cmds !=
nullptr);
12156 const char *arg_start, *arg;
12161 std::string str (arg_start, arg - arg_start);
12162 const char *ptr = str.c_str ();
12167 canonical->lsals.push_back (std::move (lsal));
12173 gdb::unique_xmalloc_ptr<char> cond_string,
12174 gdb::unique_xmalloc_ptr<char> extra_string,
12175 enum bptype type_wanted,
12176 enum bpdisp disposition,
12178 int task,
int ignore_count,
12179 int from_tty,
int enabled,
12180 int internal,
unsigned flags)
12191 for (
size_t i = 0; i < lsal.
sals.size (); i++)
12195 std::unique_ptr<tracepoint> tp
12199 std::move (locspec),
12201 std::move (cond_string),
12202 std::move (extra_string),
12204 thread, task, ignore_count,
12205 from_tty, enabled,
flags,
12214 tp->static_trace_marker_id_idx = i;
12220std::vector<symtab_and_line>
12256 gdb_assert (bpt != NULL);
12311 if (b->
next == bpt)
12348 gdb::function_view<
void (
breakpoint *)> function)
12360 if (
next == related)
12363 function (related);
12371 function (related);
12375 while (related != b);
12385 int breaks_to_delete = 0;
12393 breaks_to_delete = 1;
12399 || (breaks_to_delete &&
query (_(
"Delete all breakpoints? "))))
12422 && !
loc->shlib_disabled
12423 && !
loc->pspace->executing_startup)
12436 htab_up htab (htab_create_alloc (13, htab_hash_string, htab_eq_string, NULL,
12439 for (l =
loc; l != NULL; l = l->
next)
12448 slot = (
const char **) htab_find_slot (htab.get (), (
const void *)
name,
12507 warning (_(
"static tracepoint %d changed probed marker from %s to %s"),
12509 marker.
str_id.c_str ());
12518 if (!sal.explicit_pc
12520 && sal.symtab != NULL
12523 std::vector<static_tracepoint_marker> markers
12527 if (!markers.empty ())
12533 tpmarker = &markers[0];
12537 warning (_(
"marker for static tracepoint %d (%s) not "
12538 "found at previous line number"),
12543 uiout->
text (
"Now in ");
12548 uiout->
text (
" at ");
12563 uiout->
text (
"\n");
12568 std::unique_ptr<explicit_location_spec> els
12570 els->source_filename
12575 b->
locspec = std::move (els);
12608 if ((a == NULL) != (b == NULL))
12661 gdb::array_view<const symtab_and_line> sals,
12662 gdb::array_view<const symtab_and_line> sals_end)
12666 if (!sals_end.empty () && (sals.size () != 1 || sals_end.size () != 1))
12672 _(
"Could not reset ranged breakpoint %d: "
12673 "multiple locations found\n"),
12689 for (
const auto &sal : sals)
12710 catch (
const gdb_exception_error &e)
12716 if (!sals_end.empty ())
12720 new_loc->
length = end - sals[0].pc + 1;
12735 for (; e; e = e->
next)
12739 if (have_ambiguous_names)
12761 if (l->function_name
12763 l->function_name.get ()) == 0)
12781std::vector<symtab_and_line>
12786 struct gdb_exception exception;
12788 std::vector<symtab_and_line> sals;
12794 catch (gdb_exception_error &e)
12796 int not_found_and_ok =
false;
12805 if (e.error == NOT_FOUND_ERROR
12808 && search_pspace != NULL
12813 not_found_and_ok =
true;
12815 if (!not_found_and_ok)
12827 exception = std::move (e);
12830 if (exception.reason == 0 || exception.error != NOT_FOUND_ERROR)
12832 for (
auto &sal : sals)
12836 gdb::unique_xmalloc_ptr<char> local_cond, local_extra;
12837 int local_thread, local_task;
12840 &local_cond, &local_thread,
12841 &local_task, &local_extra);
12843 if (local_cond !=
nullptr)
12847 if (local_extra !=
nullptr)
12871 std::vector<symtab_and_line> expanded, expanded_end;
12878 expanded = std::move (sals);
12882 std::vector<symtab_and_line> sals_end
12884 filter_pspace, &found);
12886 expanded_end = std::move (sals_end);
12921 scoped_restore save_input_radix = make_scoped_restore (&
input_radix);
12934 scoped_restore save_language_mode = make_scoped_restore (&
language_mode);
12948 catch (
const gdb_exception &ex)
12951 "Error in re-setting breakpoint %d: ",
12998 if (b->
number == bptnum)
13002 if (from_tty && count != 0)
13003 gdb_printf (_(
"Ignore count ignored for tracepoint %d."),
13013 "breakpoint %d is reached."),
13015 else if (count == 1)
13016 gdb_printf (_(
"Will ignore next crossing of breakpoint %d."),
13020 "crossings of breakpoint %d."),
13027 error (_(
"No breakpoint number %d."), bptnum);
13035 const char *p = args;
13043 error (_(
"bad breakpoint number: '%s'"), args);
13045 error (_(
"Second argument (specified ignore-count) is missing."));
13060 gdb::function_view<
void (
breakpoint *)> function)
13062 if (bp_num_range.first == 0)
13064 warning (_(
"bad breakpoint number at or near '%d'"),
13065 bp_num_range.first);
13069 for (
int i = bp_num_range.first; i <= bp_num_range.second; i++)
13071 bool match =
false;
13081 gdb_printf (_(
"No breakpoint number %d.\n"), i);
13091 gdb::function_view<
void (
breakpoint *)> function)
13093 if (args == NULL || *args ==
'\0')
13113 if (!b || b->
number != bp_num)
13114 error (_(
"Bad breakpoint number '%d'"), bp_num);
13117 error (_(
"Bad breakpoint location number '%d'"), loc_num);
13121 if (++n == loc_num)
13124 error (_(
"Bad breakpoint location number '%d'"), loc_num);
13145 int trailer,
const char **end_out = NULL)
13147 const char *end = start;
13151 ? _(
"Negative breakpoint number '%.*s'")
13152 : _(
"Negative breakpoint location number '%.*s'"),
13153 int (end - start), start);
13156 ? _(
"Bad breakpoint number '%.*s'")
13157 : _(
"Bad breakpoint location number '%.*s'"),
13158 int (end - start), start);
13160 if (end_out != NULL)
13170static std::pair<int, int>
13172 const std::string &arg,
13173 std::string::size_type arg_offset)
13175 std::pair<int, int>
range;
13176 const char *bp_loc = &arg[arg_offset];
13177 std::string::size_type dash = arg.find (
'-', arg_offset);
13178 if (dash != std::string::npos)
13181 if (arg.length () == dash + 1)
13183 ? _(
"Bad breakpoint number at or near: '%s'")
13184 : _(
"Bad breakpoint location number at or near: '%s'"),
13188 const char *start_first = bp_loc;
13189 const char *start_second = &arg[dash + 1];
13195 ? _(
"Inverted breakpoint range at '%.*s'")
13196 : _(
"Inverted breakpoint location range at '%.*s'"),
13197 int (end - start_first), start_first);
13223 std::pair<int, int> &bp_num_range,
13224 std::pair<int, int> &bp_loc_range)
13226 std::string::size_type dot = arg.find (
'.');
13228 if (dot != std::string::npos)
13232 if (arg.length () == dot + 1 || dot == 0)
13233 error (_(
"Bad breakpoint number at or near: '%s'"), arg.c_str ());
13237 bp_num_range.second = bp_num_range.first;
13247 bp_loc_range.first = 0;
13248 bp_loc_range.second = 0;
13262 error (_(
"Breakpoint %d's condition is invalid at location %d, "
13263 "cannot enable."), bp_num, loc_num);
13286 if (
loc !=
nullptr &&
loc->owner !=
nullptr)
13306 if (
loc ==
nullptr)
13307 error (_(
"Breakpoint location is invalid."));
13309 if (
loc->owner ==
nullptr)
13310 error (_(
"Breakpoint location does not have an owner breakpoint."));
13316 error (_(
"Breakpoint location LOC_NUM could not be found."));
13318 error (_(
"Breakpoint %d's condition is invalid at location %d, "
13319 "cannot enable."),
loc->owner->number, loc_num);
13345 std::pair<int, int> &bp_loc_range,
13348 for (
int i = bp_loc_range.first; i <= bp_loc_range.second; i++)
13405 while (!num.empty ())
13407 std::pair<int, int> bp_num_range, bp_loc_range;
13411 if (bp_loc_range.first == bp_loc_range.second
13412 && (bp_loc_range.first == 0
13413 || (bp_loc_range.first == 1
13414 && bp_num_range.first == bp_num_range.second
13429 (bp_num_range.first, bp_loc_range,
enable);
13451 int target_resources_ok;
13457 target_resources_ok =
13460 if (target_resources_ok == 0)
13461 error (_(
"No hardware breakpoint support in the target."));
13462 else if (target_resources_ok < 0)
13463 error (_(
"Hardware breakpoints used exceeds limit."));
13479 catch (
const gdb_exception &e)
13580 CORE_ADDR addr, ssize_t len,
13581 const bfd_byte *data)
13593 &&
loc->address +
loc->length > addr
13594 && addr + len >
loc->address)
13612 CORE_ADDR
pc = next_pc;
13616 std::unique_ptr<breakpoint> b
13632 = (gdb::checked_static_cast<momentary_breakpoint *>
13634 ss_bp->add_location (sal);
13645 std::vector<CORE_ADDR> next_pcs;
13649 if (!next_pcs.empty ())
13654 for (CORE_ADDR pc : next_pcs)
13710 (locspec.get (),
true );
13714 NULL, 0, arg,
false, 1 ,
13732 NULL, 0, arg,
false, 1 ,
13754 if (arg && startswith (arg,
"-m") && isspace (arg[2]))
13770 NULL, 0, arg,
false, 1 ,
13790 char *rslt =
nullptr;
13810 const char *addr_str;
13811 char small_buf[100];
13822 warning (_(
"Uploaded tracepoint %d has no "
13823 "source location, using raw address"),
13825 xsnprintf (small_buf,
sizeof (small_buf),
"*%s", hex_string (utp->
addr));
13826 addr_str = small_buf;
13831 warning (_(
"Uploaded tracepoint %d condition "
13832 "has no source form, ignoring it"),
13855 gdb_assert (tp != NULL);
13859 xsnprintf (small_buf,
sizeof (small_buf),
"%d %d", utp->
pass,
13880 else if (!utp->
actions.empty ()
13882 warning (_(
"Uploaded tracepoint %d actions "
13883 "have no source form, ignoring them"),
13904 if (num_printed == 0)
13906 if (args == NULL || *args ==
'\0')
13907 uiout->
message (
"No tracepoints.\n");
13909 uiout->
message (
"No tracepoint matching '%s'.\n", args);
13939 int breaks_to_delete = 0;
13948 breaks_to_delete = 1;
13954 || (breaks_to_delete &&
query (_(
"Delete all tracepoints? "))))
13977 gdb_printf (_(
"Setting tracepoint %d's passcount to %d\n"),
13993 if (args == 0 || *args == 0)
13994 error (_(
"passcount command requires an "
13995 "argument (count + optional TP num)"));
13997 count = strtoulst (args, &args, 10);
13999 args = skip_spaces (args);
14000 if (*args && strncasecmp (args,
"all", 3) == 0)
14004 error (_(
"Junk at end of arguments."));
14012 else if (*args ==
'\0')
14034 if (t->number == num)
14068 const char *instring = arg == NULL ? NULL : *arg;
14070 if (parser != NULL)
14072 gdb_assert (!parser->
finished ());
14075 else if (arg == NULL || *arg == NULL || ! **arg)
14082 if (instring && *instring)
14083 gdb_printf (_(
"bad tracepoint number at or near '%s'\n"),
14091 if (t->number == tpnum)
14094 gdb_printf (
"No tracepoint number %d.\n", tpnum);
14120 int extra_trace_bits = 0;
14122 if (filename == 0 || *filename == 0)
14123 error (_(
"Argument required (file name in which to save)"));
14140 extra_trace_bits = 1;
14149 warning (_(
"Nothing to save."));
14153 gdb::unique_xmalloc_ptr<char> expanded_filename (tilde_expand (filename));
14157 if (!fp.
open (expanded_filename.get (),
"w"))
14158 error (_(
"Unable to open file '%s' for saving (%s)"),
14159 expanded_filename.get (), safe_strerror (errno));
14161 if (extra_trace_bits)
14174 tp->print_recreate (&fp);
14180 if (tp->cond_string)
14181 fp.
printf (
" condition $bpnum %s\n", tp->cond_string.get ());
14183 if (tp->ignore_count)
14184 fp.
printf (
" ignore $bpnum %d\n", tp->ignore_count);
14188 fp.
puts (
" commands\n");
14193 fp.
puts (
" end\n");
14197 fp.
puts (
"disable $bpnum\n");
14209 fp.
printf (
"disable $bpnum.%d\n", n);
14220 gdb_printf (_(
"Saved to file '%s'.\n"), expanded_filename.get ());
14243#define LOCATION_SPEC_HELP_STRING \
14244"Linespecs are colon-separated lists of location parameters, such as\n\
14245source filename, function name, label name, and line number.\n\
14246Example: To specify the start of a label named \"the_top\" in the\n\
14247function \"fact\" in the file \"factorial.c\", use\n\
14248\"factorial.c:fact:the_top\".\n\
14250Address locations begin with \"*\" and specify an exact address in the\n\
14251program. Example: To specify the fourth byte past the start function\n\
14252\"main\", use \"*main + 4\".\n\
14254Explicit locations are similar to linespecs but use an option/argument\n\
14255syntax to specify location parameters.\n\
14256Example: To specify the start of the label named \"the_top\" in the\n\
14257function \"fact\" in the file \"factorial.c\", use \"-source factorial.c\n\
14258-function fact -label the_top\".\n\
14260By default, a specified function is matched against the program's\n\
14261functions in all scopes. For C++, this means in all namespaces and\n\
14262classes. For Ada, this means in all packages. E.g., in C++,\n\
14263\"func()\" matches \"A::func()\", \"A::B::func()\", etc. The\n\
14264\"-qualified\" flag overrides this behavior, making GDB interpret the\n\
14265specified name as a complete fully-qualified name instead."
14272#define BREAK_ARGS_HELP(command) \
14273command" [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]\n\
14274\t[-force-condition] [if CONDITION]\n\
14275PROBE_MODIFIER shall be present if the command is to be placed in a\n\
14276probe point. Accepted values are `-probe' (for a generic, automatically\n\
14277guessed probe type), `-probe-stap' (for a SystemTap probe) or \n\
14278`-probe-dtrace' (for a DTrace probe).\n\
14279LOCATION may be a linespec, address, or explicit location as described\n\
14282With no LOCATION, uses current execution address of the selected\n\
14283stack frame. This is useful for breaking on return to a stack frame.\n\
14285THREADNUM is the number from \"info threads\".\n\
14286CONDITION is a boolean expression.\n\
14288With the \"-force-condition\" flag, the condition is defined even when\n\
14289it is invalid for all current locations.\n\
14290\n" LOCATION_SPEC_HELP_STRING "\n\n\
14291Multiple breakpoints at one place are permitted, and useful if their\n\
14292conditions are different.\n\
14294Do \"help breakpoints\" for info on other commands dealing with breakpoints."
14306 void *user_data_catch,
14307 void *user_data_tcatch)
14349 if (!bl->shlib_disabled
14364 if (
loc->symtab != NULL &&
loc->symtab->compunit ()->objfile () ==
objfile)
14365 loc->symtab = NULL;
14397Set ignore-count of breakpoint number N to COUNT.\n\
14398Usage is `ignore N COUNT'."));
14402Set commands to be executed when the given breakpoints are hit.\n\
14403Give a space-separated breakpoint list as argument after \"commands\".\n\
14404A list element can be a breakpoint number (e.g. `5') or a range of numbers\n\
14406With no argument, the targeted breakpoint is the last one set.\n\
14407The commands themselves follow starting on the next line.\n\
14408Type a line containing \"end\" to indicate the end of them.\n\
14409Give \"silent\" as the first line to make the breakpoint silent;\n\
14410then no output is printed when it is hit, except what the commands print."));
14413 static std::string condition_command_help
14415Specify breakpoint number N to break only if COND is true.\n\
14416Usage is `condition [OPTION] N COND', where N is an integer and COND\n\
14417is an expression to be evaluated whenever breakpoint N is reached.\n\
14420%OPTIONS%"), cc_opts);
14423 condition_command_help.c_str ());
14427Set a temporary breakpoint.\n\
14428Like \"break\" except the breakpoint is only temporary,\n\
14429so it will be deleted when hit. Equivalent to \"break\" followed\n\
14430by using \"enable delete\" on the breakpoint number.\n\
14436Set a hardware assisted breakpoint.\n\
14437Like \"break\" except the breakpoint requires hardware support,\n\
14438some target hardware may not have this support.\n\
14444Set a temporary hardware assisted breakpoint.\n\
14445Like \"hbreak\" except the breakpoint is only temporary,\n\
14446so it will be deleted when hit.\n\
14453Enable all or some breakpoints.\n\
14454Usage: enable [BREAKPOINTNUM]...\n\
14455Give breakpoint numbers (separated by spaces) as arguments.\n\
14456With no subcommand, breakpoints are enabled until you command otherwise.\n\
14457This is used to cancel the effect of the \"disable\" command.\n\
14458With a subcommand you can enable temporarily."),
14464Enable all or some breakpoints.\n\
14465Usage: enable breakpoints [BREAKPOINTNUM]...\n\
14466Give breakpoint numbers (separated by spaces) as arguments.\n\
14467This is used to cancel the effect of the \"disable\" command.\n\
14468May be abbreviated to simply \"enable\"."),
14472Enable some breakpoints for one hit.\n\
14473Usage: enable breakpoints once BREAKPOINTNUM...\n\
14474If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
14478Enable some breakpoints and delete when hit.\n\
14479Usage: enable breakpoints delete BREAKPOINTNUM...\n\
14480If a breakpoint is hit while enabled in this fashion, it is deleted."),
14484Enable some breakpoints for COUNT hits.\n\
14485Usage: enable breakpoints count COUNT BREAKPOINTNUM...\n\
14486If a breakpoint is hit while enabled in this fashion,\n\
14487the count is decremented; when it reaches zero, the breakpoint is disabled."),
14491Enable some breakpoints and delete when hit.\n\
14492Usage: enable delete BREAKPOINTNUM...\n\
14493If a breakpoint is hit while enabled in this fashion, it is deleted."),
14497Enable some breakpoints for one hit.\n\
14498Usage: enable once BREAKPOINTNUM...\n\
14499If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
14503Enable some breakpoints for COUNT hits.\n\
14504Usage: enable count COUNT BREAKPOINTNUM...\n\
14505If a breakpoint is hit while enabled in this fashion,\n\
14506the count is decremented; when it reaches zero, the breakpoint is disabled."),
14511Disable all or some breakpoints.\n\
14512Usage: disable [BREAKPOINTNUM]...\n\
14513Arguments are breakpoint numbers with spaces in between.\n\
14514To disable all breakpoints, give no argument.\n\
14515A disabled breakpoint is not forgotten, but has no effect until re-enabled."),
14521Disable all or some breakpoints.\n\
14522Usage: disable breakpoints [BREAKPOINTNUM]...\n\
14523Arguments are breakpoint numbers with spaces in between.\n\
14524To disable all breakpoints, give no argument.\n\
14525A disabled breakpoint is not forgotten, but has no effect until re-enabled.\n\
14526This command may be abbreviated \"disable\"."),
14531Delete all or some breakpoints.\n\
14532Usage: delete [BREAKPOINTNUM]...\n\
14533Arguments are breakpoint numbers with spaces in between.\n\
14534To delete all breakpoints, give no argument.\n\
14536Also a prefix command for deletion of other GDB objects."),
14542Delete all or some breakpoints or auto-display expressions.\n\
14543Usage: delete breakpoints [BREAKPOINTNUM]...\n\
14544Arguments are breakpoint numbers with spaces in between.\n\
14545To delete all breakpoints, give no argument.\n\
14546This command may be abbreviated \"delete\"."),
14551Clear breakpoint at specified location.\n\
14552Argument may be a linespec, explicit, or address location as described below.\n\
14554With no argument, clears all breakpoints in the line that the selected frame\n\
14557See also the \"delete\" command which clears breakpoints by number."));
14562Set breakpoint at specified location.\n"
14573Status of specified breakpoints (all user-settable breakpoints if no argument).\n\
14574The \"Type\" column indicates one of:\n\
14575\tbreakpoint - normal breakpoint\n\
14576\twatchpoint - watchpoint\n\
14577The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
14578the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
14579breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
14580address and file/line number respectively.\n\
14582Convenience variable \"$_\" and default examine address for \"x\"\n\
14583are set to the address of the last breakpoint listed unless the command\n\
14584is prefixed with \"server \".\n\n\
14585Convenience variable \"$bpnum\" contains the number of the last\n\
14591Status of all breakpoints, or breakpoint number NUMBER.\n\
14592The \"Type\" column indicates one of:\n\
14593\tbreakpoint - normal breakpoint\n\
14594\twatchpoint - watchpoint\n\
14595\tlongjmp - internal breakpoint used to step through longjmp()\n\
14596\tlongjmp resume - internal breakpoint at the target of longjmp()\n\
14597\tuntil - internal breakpoint used by the \"until\" command\n\
14598\tfinish - internal breakpoint used by the \"finish\" command\n\
14599The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
14600the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
14601breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
14602address and file/line number respectively.\n\
14604Convenience variable \"$_\" and default examine address for \"x\"\n\
14605are set to the address of the last breakpoint listed unless the command\n\
14606is prefixed with \"server \".\n\n\
14607Convenience variable \"$bpnum\" contains the number of the last\n\
14612Set catchpoints to catch events."),
14617Set temporary catchpoints to catch events."),
14624Set a watchpoint for EXPRESSION.\n\
14625Usage: watch [-location] EXPRESSION\n\
14630A watchpoint stops execution of your program whenever the value of\n\
14631an expression changes."), opts);
14633 watch_help.c_str ());
14637Set a read watchpoint for EXPRESSION.\n\
14638Usage: rwatch [-location] EXPRESSION\n\
14643A read watchpoint stops execution of your program whenever the value of\n\
14644an expression is read."), opts);
14646 rwatch_help.c_str ());
14650Set an access watchpoint for EXPRESSION.\n\
14651Usage: awatch [-location] EXPRESSION\n\
14656An access watchpoint stops execution of your program whenever the value\n\
14657of an expression is either read or written."), opts);
14659 awatch_help.c_str ());
14663Status of specified watchpoints (all watchpoints if no argument)."));
14669Set debugger's willingness to use watchpoint hardware."), _(
"\
14670Show debugger's willingness to use watchpoint hardware."), _(
"\
14671If zero, gdb will not use hardware for new watchpoints, even if\n\
14672such is available. (However, any hardware watchpoints that were\n\
14673created before setting this to nonzero, will continue to use watchpoint\n\
14685Set a tracepoint at specified location.\n\
14688Do \"help tracepoints\" for info on other tracepoint commands."));
14697Set a fast tracepoint at specified location.\n\
14700Do \"help tracepoints\" for info on other tracepoint commands."));
14704Set a static tracepoint at location or marker.\n\
14706strace [LOCATION] [if CONDITION]\n\
14707LOCATION may be a linespec, explicit, or address location (described below) \n\
14708or -m MARKER_ID.\n\n\
14709If a marker id is specified, probe the marker with that name. With\n\
14710no LOCATION, uses current execution address of the selected stack frame.\n\
14711Static tracepoints accept an extra collect action -- ``collect $_sdata''.\n\
14712This collects arbitrary user data passed in the probe point call to the\n\
14713tracing library. You can inspect it when analyzing the trace buffer,\n\
14714by printing the $_sdata variable like any other convenience variable.\n\
14716CONDITION is a boolean expression.\n\
14718Multiple tracepoints at one place are permitted, and useful if their\n\
14719conditions are different.\n\
14721Do \"help breakpoints\" for info on other commands dealing with breakpoints.\n\
14722Do \"help tracepoints\" for info on other tracepoint commands."));
14727Status of specified tracepoints (all tracepoints if no argument).\n\
14728Convenience variable \"$tpnum\" contains the number of the\n\
14729last tracepoint set."));
14735Delete specified tracepoints.\n\
14736Arguments are tracepoint numbers, separated by spaces.\n\
14737No argument means delete all tracepoints."),
14742Disable specified tracepoints.\n\
14743Arguments are tracepoint numbers, separated by spaces.\n\
14744No argument means disable all tracepoints."),
14749Enable specified tracepoints.\n\
14750Arguments are tracepoint numbers, separated by spaces.\n\
14751No argument means enable all tracepoints."),
14756Set the passcount for a tracepoint.\n\
14757The trace will end when the tracepoint has been passed 'count' times.\n\
14758Usage: passcount COUNT TPNUM, where TPNUM may also be \"all\";\n\
14759if TPNUM is omitted, passcount refers to the last tracepoint defined."));
14762 _(
"Save breakpoint definitions as a script."),
14767Save current breakpoint definitions as a script.\n\
14768This includes all types of breakpoints (breakpoints, watchpoints,\n\
14769catchpoints, tracepoints). Use the 'source' command in another debug\n\
14770session to restore them."),
14776Save current tracepoint definitions as a script.\n\
14777Use the 'source' command in another debug session to restore them."),
14786Breakpoint specific settings.\n\
14787Configure various breakpoint-specific variables such as\n\
14788pending breakpoint behavior."),
14790Breakpoint specific settings.\n\
14791Configure various breakpoint-specific variables such as\n\
14792pending breakpoint behavior."),
14798Set debugger's behavior regarding pending breakpoints."), _(
"\
14799Show debugger's behavior regarding pending breakpoints."), _(
"\
14800If on, an unrecognized breakpoint location will cause gdb to create a\n\
14801pending breakpoint. If off, an unrecognized breakpoint location results in\n\
14802an error. If auto, an unrecognized breakpoint location results in a\n\
14803user-query to see if a pending breakpoint should be created."),
14813Set automatic usage of hardware breakpoints."), _(
"\
14814Show automatic usage of hardware breakpoints."), _(
"\
14815If set, the debugger will automatically use hardware breakpoints for\n\
14816breakpoints set with \"break\" but falling in read-only memory. If not set,\n\
14817a warning will be emitted for such breakpoints."),
14825Set mode for inserting breakpoints."), _(
"\
14826Show mode for inserting breakpoints."), _(
"\
14827When this mode is on, breakpoints are inserted immediately as soon as\n\
14828they're created, kept inserted even when execution stops, and removed\n\
14829only when the user deletes them. When this mode is off (the default),\n\
14830breakpoints are inserted only when execution continues, and removed\n\
14831when execution stops."),
14840Set mode of breakpoint condition evaluation."), _(
"\
14841Show mode of breakpoint condition evaluation."), _(
"\
14842When this is set to \"host\", breakpoint conditions will be\n\
14843evaluated on the host's side by GDB. When it is set to \"target\",\n\
14844breakpoint conditions will be downloaded to the target (if the target\n\
14845supports such feature) and conditions will be evaluated on the target's side.\n\
14846If this is set to \"auto\" (default), this will be automatically set to\n\
14847\"target\" if it supports condition evaluation, otherwise it will\n\
14848be set to \"host\"."),
14855Set a breakpoint for an address range.\n\
14856break-range START-LOCATION, END-LOCATION\n\
14857where START-LOCATION and END-LOCATION can be one of the following:\n\
14858 LINENUM, for that line in the current file,\n\
14859 FILE:LINENUM, for that line in that file,\n\
14860 +OFFSET, for that number of lines after the current line\n\
14861 or the start of the range\n\
14862 FUNCTION, for the first line in that function,\n\
14863 FILE:FUNCTION, to distinguish among like-named static functions.\n\
14864 *ADDRESS, for the instruction at that address.\n\
14866The breakpoint will stop execution of the inferior whenever it executes\n\
14867an instruction at any address within the [START-LOCATION, END-LOCATION]\n\
14868range (including START-LOCATION and END-LOCATION)."));
14871Set a dynamic printf at specified location.\n\
14872dprintf location,format string,arg1,arg2,...\n\
14873location may be a linespec, explicit, or address location.\n"
14879Set the style of usage for dynamic printf."), _(
"\
14880Show the style of usage for dynamic printf."), _(
"\
14881This setting chooses how GDB will do a dynamic printf.\n\
14882If the value is \"gdb\", then the printing is done by GDB to its own\n\
14883console, as with the \"printf\" command.\n\
14884If the value is \"call\", the print is done by calling a function in your\n\
14885program; by default printf(), but you can choose a different function or\n\
14886output stream by setting dprintf-function and dprintf-channel."),
14892Set the function to use for dynamic printf."), _(
"\
14893Show the function to use for dynamic printf."), NULL,
14899Set the channel to use for dynamic printf."), _(
"\
14900Show the channel to use for dynamic printf."), NULL,
14906Set whether dprintf continues after GDB disconnects."), _(
"\
14907Show whether dprintf continues after GDB disconnects."), _(
"\
14908Use this to let dprintf commands continue to hit and produce output\n\
14909even if GDB disconnects or detaches from the target."),
14915Target agent only formatted printing, like the C \"printf\" function.\n\
14916Usage: agent-printf \"format string\", ARG1, ARG2, ARG3, ..., ARGN\n\
14917This supports most C printf format specifications, like %s, %d, etc.\n\
14918This 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)
bool contained_in(const struct block *a, const struct block *b, bool allow_nested)
const struct block * block_for_pc(CORE_ADDR pc)
struct symbol * block_linkage_function(const struct block *bl)
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)
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 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 struct symtab_and_line update_static_tracepoint(struct breakpoint *b, struct symtab_and_line sal)
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 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 ignore_count, int from_tty, int enabled, int internal, unsigned flags, int display_canonical)
static CORE_ADDR bp_locations_shadow_len_after_address_max
static void say_where(const breakpoint *b)
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 struct breakpoint * breakpoint_chain
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[]
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)
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)
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 void print_one_breakpoint(struct breakpoint *b, struct bp_location **last_loc, int allflag)
static bool has_multiple_locations(int num)
static void enable_delete_command(const char *args, int from_tty)
#define LOCATION_SPEC_HELP_STRING
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)
static int find_loc_num_by_location(const bp_location *loc)
static bool watchpoint_in_thread_scope(struct watchpoint *b)
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
int create_breakpoint(struct gdbarch *gdbarch, location_spec *locspec, const char *cond_string, int thread, 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 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 void print_breakpoint_location(const breakpoint *b, struct bp_location *loc)
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 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)
static const char dprintf_style_agent[]
static void mention(const breakpoint *)
static void invalidate_bp_value_on_memory_change(struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data)
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 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)
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 bool print_one_breakpoint_location(struct breakpoint *b, struct bp_location *loc, int loc_number, struct bp_location **last_loc, int allflag, bool raw_loc)
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 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 void find_condition_and_thread(const char *tok, CORE_ADDR pc, gdb::unique_xmalloc_ptr< char > *cond_string, int *thread, int *task, gdb::unique_xmalloc_ptr< char > *rest)
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 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, unsigned)
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)
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 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 *task, gdb::unique_xmalloc_ptr< char > *rest)
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)
static void remove_threaded_breakpoints(struct thread_info *tp, int silent)
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 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 ignore_count, int from_tty, int enabled, int internal, unsigned flags)
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
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)
static bool ambiguous_names_p(struct bp_location *loc)
struct breakpoint * create_and_insert_solib_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
static const char condition_evaluation_target[]
#define ALL_BREAKPOINTS_SAFE(B, TMP)
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_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)
void install_breakpoint(int internal, std::unique_ptr< breakpoint > &&arg, int update_gll)
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()
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 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 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)
static void disable_breakpoints_in_unloaded_shlib(struct so_list *solib)
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 bool locations_are_equal(struct bp_location *a, struct bp_location *b)
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 struct bp_location * hoist_existing_locations(struct breakpoint *b, struct program_space *pspace)
static void bpstat_check_watchpoint(bpstat *bs)
breakpoint_range all_breakpoints()
static void rethrow_on_target_close_error(const gdb_exception &e)
void maybe_print_thread_hit_breakpoint(struct ui_out *uiout)
@ 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
next_range< bp_location > bp_location_range
bool is_watchpoint(const struct breakpoint *bpt)
@ 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
@ 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)
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
gdb::unique_xmalloc_ptr< char > function_name
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)
target_ops * top_target()
const struct block * block() const
virtual CORE_ADDR get_relocated_address(struct objfile *objfile)=0
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)
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 * disablelist
struct cmd_list_element * enablelist
struct cmd_list_element * maintenanceinfolist
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 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_to_comma_and_eval(const char **expp)
struct value * evaluate_expression(struct expression *exp, struct type *expect_type)
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)
struct value * parse_and_eval(const char *exp)
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
expression_up parse_exp_1(const char **, CORE_ADDR pc, const struct block *, int, innermost_block_tracker *=nullptr)
int breakpoint_ext_lang_cond_says_stop(struct breakpoint *b)
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)
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)
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)
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,...)
struct interp * command_interp(void)
void jit_event_handler(gdbarch *gdbarch, objfile *jiter)
void jit_breakpoint_re_set(void)
const struct language_defn * current_language
enum language set_language(enum language lang)
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 so_list * > solib_unloaded
observable< struct breakpoint * > breakpoint_created
observable< struct objfile * > free_objfile
observable< struct breakpoint * > breakpoint_modified
observable< struct breakpoint * > breakpoint_deleted
observable< struct thread_info *, int > thread_exit
observable about_to_proceed
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)
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, 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)
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
virtual struct bp_location * allocate_location()
gdb::unique_xmalloc_ptr< char > filter
virtual bool print_one(bp_location **) const
virtual bool explains_signal(enum gdb_signal)
virtual int remove_location(struct bp_location *, enum remove_bp_reason reason)
virtual void print_one_detail(struct ui_out *) const
virtual void print_mention() const
gdb::unique_xmalloc_ptr< char > extra_string
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
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 ignore_count, int from_tty, int enabled, unsigned flags, int display_canonical)
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)
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
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
separate_debug_range separate_debug_objfiles()
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
bool print_one(bp_location **) const override
int resources_needed(const struct bp_location *) 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]
struct program_space * pspace
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
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 symbol * fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
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)
void ATTRIBUTE_NORETURN invalid_thread_id_error(const char *string)
#define SWITCH_THRU_ALL_UIS()
struct trace_status * current_trace_status(void)
void save_trace_state_variables(struct ui_file *fp)
std::string default_collect
void validate_actionline(const char *line, struct breakpoint *b)
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={})
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,...)
void error_stream(const string_file &stream)
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)
struct type * value_type(const struct value *value)
void unpack_value_bitfield(struct value *dest_val, LONGEST bitpos, LONGEST bitsize, const gdb_byte *valaddr, LONGEST embedded_offset, const struct value *val)
LONGEST value_offset(const struct value *value)
LONGEST value_bitsize(const struct value *value)
int value_lazy(const struct value *value)
struct value * allocate_value(struct type *type)
CORE_ADDR value_as_address(struct value *val)
CORE_ADDR value_address(const struct value *value)
void complete_internalvar(completion_tracker &tracker, const char *name)
struct internalvar * lookup_internalvar(const char *name)
LONGEST value_as_long(struct value *val)
struct value * value_copy(const value *arg)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
gdb::array_view< const gdb_byte > value_contents_for_printing(struct value *value)
int deprecated_value_modifiable(const struct value *value)
struct value * value_mark(void)
void value_free_to_mark(const struct value *mark)
value_ref_ptr release_value(struct value *val)
LONGEST value_bitpos(const struct value *value)
static bool value_true(struct value *val)
gdb::ref_ptr< struct value, value_ref_policy > value_ref_ptr
@ TARGET_WAITKIND_STOPPED