40 #include "filenames.h"
72 #include "readline/readline.h"
73 #include "readline/history.h"
118 char *,
char *,
enum bptype,
122 int,
int,
int,
unsigned);
167 struct bp_location *loc2);
210 int *other_type_used);
328 static const char dprintf_style_gdb[] =
"gdb";
329 static const char dprintf_style_call[] =
"call";
330 static const char dprintf_style_agent[] =
"agent";
331 static const char *
const dprintf_style_enums[] = {
344 static char *dprintf_function =
"";
354 static char *dprintf_channel =
"";
358 static int disconnected_dprintf = 1;
388 static const char *
const bpdisps[] = {
"del",
"dstp",
"dis",
"keep"};
390 return bpdisps[(
int) disp];
404 _(
"Debugger's willingness to use "
405 "watchpoint hardware is %s.\n"),
420 _(
"Debugger's behavior regarding "
421 "pending breakpoints is %s.\n"),
436 _(
"Automatic usage of hardware breakpoints is %s.\n"),
447 static int always_inserted_mode = 0;
471 if (always_inserted_mode)
484 static const char condition_evaluation_both[] =
"host or target";
487 static const char condition_evaluation_auto[] =
"auto";
488 static const char condition_evaluation_host[] =
"host";
489 static const char condition_evaluation_target[] =
"target";
490 static const char *
const condition_evaluation_enums[] = {
512 if (mode == condition_evaluation_auto)
539 return (mode == condition_evaluation_host);
551 int target_exact_watchpoints = 0;
557 #define ALL_BREAKPOINTS(B) for (B = breakpoint_chain; B; B = B->next)
559 #define ALL_BREAKPOINTS_SAFE(B,TMP) \
560 for (B = breakpoint_chain; \
561 B ? (TMP=B->next, 1): 0; \
568 #define ALL_BP_LOCATIONS(B,BP_TMP) \
569 for (BP_TMP = bp_location; \
570 BP_TMP < bp_location + bp_location_count && (B = *BP_TMP); \
579 #define ALL_BP_LOCATIONS_AT_ADDR(BP_LOCP_TMP, BP_LOCP_START, ADDRESS) \
580 for (BP_LOCP_START = BP_LOCP_START == NULL ? get_first_locp_gte_addr (ADDRESS) : BP_LOCP_START, \
581 BP_LOCP_TMP = BP_LOCP_START; \
583 && (BP_LOCP_TMP < bp_location + bp_location_count \
584 && (*BP_LOCP_TMP)->address == ADDRESS); \
589 #define ALL_TRACEPOINTS(B) \
590 for (B = breakpoint_chain; B; B = B->next) \
591 if (is_tracepoint (B))
628 static int breakpoint_count;
634 static int prev_breakpoint_count;
638 static int tracepoint_count;
654 if (
func (b, user_data) != 0)
673 prev_breakpoint_count = breakpoint_count;
674 breakpoint_count = num;
688 rbreak_start_breakpoint_count = breakpoint_count;
743 if (--(*cmdp)->refc == 0)
793 struct bp_location *loc;
806 for (loc = b->
loc; loc; loc = loc->
next)
838 const char *old_mode, *new_mode;
840 if ((condition_evaluation_mode_1 == condition_evaluation_target)
844 warning (
_(
"Target does not support breakpoint condition evaluation.\n"
845 "Using host evaluation mode instead."));
857 if (new_mode != old_mode)
859 struct bp_location *loc, **loc_tmp;
867 if (new_mode == condition_evaluation_target)
898 if (condition_evaluation_mode == condition_evaluation_auto)
900 _(
"Breakpoint condition evaluation "
901 "mode is %s (currently %s).\n"),
916 struct bp_location *a = *(
void **) ap;
917 struct bp_location *b = *(
void **) bp;
930 static struct bp_location **
933 struct bp_location dummy_loc;
934 struct bp_location *dummy_locp = &dummy_loc;
935 struct bp_location **locp_found = NULL;
938 memset (&dummy_loc, 0,
sizeof (
struct bp_location));
942 locp_found = bsearch (&dummy_locp, bp_location, bp_location_count,
943 sizeof (
struct bp_location **),
947 if (locp_found == NULL)
952 while ((locp_found - 1) >= bp_location
953 && (*(locp_found - 1))->address == address)
975 struct bp_location *loc;
977 for (loc = b->
loc; loc; loc = loc->
next)
995 const char *arg = exp;
1010 error (
_(
"Junk at end of expression"));
1015 struct bp_location *loc;
1017 for (loc = b->
loc; loc; loc = loc->
next)
1024 error (
_(
"Junk at end of expression"));
1037 const char *text,
const char *
word)
1052 if (isdigit (text[1]))
1054 return complete_internalvar (&text[1]);
1058 len = strlen (text);
1066 if (strncmp (number, text, len) == 0)
1075 return expression_completer (cmd, text, word);
1093 error (
_(
"Bad breakpoint argument: '%s'"), arg);
1104 if (extlang != NULL)
1106 error (
_(
"Only one stop condition allowed. There is currently"
1107 " a %s stop condition defined for this breakpoint."),
1118 error (
_(
"No breakpoint number %d."), bnum);
1130 for (c = commands; c; c = c->
next)
1135 error (
_(
"The 'while-stepping' command can "
1136 "only be used for tracepoints"));
1144 if (strstr (c->
line,
"collect ") == c->
line)
1145 error (
_(
"The 'collect' command can only be used for tracepoints"));
1147 if (strstr (c->
line,
"teval ") == c->
line)
1148 error (
_(
"The 'teval' command can only be used for tracepoints"));
1197 for (c = commands; c; c = c->
next)
1202 error (
_(
"The 'while-stepping' command "
1203 "cannot be used for fast tracepoint"));
1205 error (
_(
"The 'while-stepping' command "
1206 "cannot be used for static tracepoint"));
1209 error (
_(
"The 'while-stepping' command "
1210 "can be used only once"));
1223 for (; c2; c2 = c2->
next)
1226 error (
_(
"The 'while-stepping' command cannot be nested"));
1240 static_tracepoints_here (
CORE_ADDR addr)
1244 struct bp_location *loc;
1249 for (loc = b->
loc; loc; loc = loc->
next)
1278 int old_silent = b->
silent;
1281 if (old_silent != silent)
1291 int old_thread = b->
thread;
1294 if (old_thread != thread)
1304 int old_task = b->
task;
1307 if (old_task != task)
1347 if (info->
cmd == NULL)
1358 str =
xstrprintf (
_(
"Type commands for breakpoint(s) "
1359 "%s, one per line."),
1402 if (arg == NULL || !*arg)
1404 if (breakpoint_count - prev_breakpoint_count > 1)
1405 arg =
xstrprintf (
"%d-%d", prev_breakpoint_count + 1,
1407 else if (breakpoint_count > 0)
1420 arg = xstrdup (arg);
1429 if (info.
cmd == NULL)
1430 error (
_(
"No breakpoints specified."));
1500 if (bp_addr + bp_size <= memaddr)
1507 if (bp_addr >= memaddr + len)
1515 if (bp_addr < memaddr)
1518 bp_size -= memaddr - bp_addr;
1519 bptoffset = memaddr - bp_addr;
1523 if (bp_addr + bp_size > memaddr + len)
1526 bp_size -= (bp_addr + bp_size) - (memaddr + len);
1529 if (readbuf != NULL)
1539 memcpy (readbuf + bp_addr - memaddr,
1544 const unsigned char *bp;
1550 writebuf_org + bp_addr - memaddr, bp_size);
1558 memcpy (writebuf + bp_addr - memaddr, bp + bptoffset, bp_size);
1587 unsigned bc_l, bc_r, bc;
1596 while (bc_l + 1 < bc_r)
1598 struct bp_location *bl;
1600 bc = (bc_l + bc_r) / 2;
1601 bl = bp_location[bc];
1612 if ((bl->
address + bp_location_shadow_len_after_address_max
1614 && (bl->
address + bp_location_shadow_len_after_address_max
1642 struct bp_location *bl = bp_location[bc];
1649 warning (
_(
"reading through apparently deleted breakpoint #%d?"),
1655 if (bl->
address >= bp_location_placed_address_before_address_max
1656 && memaddr + len <= (bl->
address
1657 - bp_location_placed_address_before_address_max))
1741 static struct value *
1744 struct value *bit_val;
1816 int within_current_scope;
1833 within_current_scope = 1;
1856 within_current_scope = (fi != NULL);
1857 if (within_current_scope)
1866 if (within_current_scope && reparse)
1911 if (!can_use_hw_watchpoints)
1916 error (
_(
"Can't set read/access watchpoint when "
1917 "hardware watchpoints are disabled."));
1920 else if (within_current_scope && b->
exp)
1923 struct value *val_chain, *v, *result, *
next;
1970 struct bp_location *loc, **tmp;
1971 int bitpos = 0, bitsize = 0;
2003 for (tmp = &(b->
base.
loc); *tmp != NULL; tmp = &((*tmp)->next))
2008 loc->
pspace = frame_pspace;
2014 loc->
length = ((bitpos % 8) + bitsize + 7) / 8;
2032 struct bp_location *bl;
2038 int i, target_resources_ok, other_type_used;
2043 b->
exact = target_exact_watchpoints && reg_cnt == 1;
2071 if (target_resources_ok <= 0)
2075 if (target_resources_ok == 0 && !sw_mode)
2076 error (
_(
"Target does not support this type of "
2077 "hardware watchpoint."));
2078 else if (target_resources_ok < 0 && !sw_mode)
2079 error (
_(
"There are not enough available hardware "
2080 "resources for this watchpoint."));
2096 if (!can_use_hw_watchpoints)
2097 error (
_(
"Can't set read/access watchpoint when "
2098 "hardware watchpoints are disabled."));
2100 error (
_(
"Expression cannot be implemented with "
2101 "read/access watchpoint."));
2112 for (v = val_chain; v; v =
next)
2133 else if (!within_current_scope)
2136 Watchpoint %d deleted because the program has left the block\n\
2137 in which its expression is valid.\n"),
2189 "infrun: skipping breakpoint: "
2190 "stepping past insn at: %s\n",
2204 "infrun: stepping past non-steppable watchpoint. "
2205 "skipping watchpoint at %s:%d\n",
2222 const int save_duplicate = bl->
duplicate;
2272 struct bp_location **locp = NULL, **loc2p;
2273 int null_condition_or_parse_error = 0;
2275 struct bp_location *loc;
2320 null_condition_or_parse_error = 1;
2332 if (null_condition_or_parse_error)
2376 struct cleanup *old_cleanups = 0;
2379 const char *cmdrest;
2380 const char *format_start, *format_end;
2390 if (*cmdrest ==
',')
2394 if (*cmdrest++ !=
'"')
2395 error (
_(
"No format string following the location"));
2397 format_start = cmdrest;
2403 format_end = cmdrest;
2405 if (*cmdrest++ !=
'"')
2406 error (
_(
"Bad format string, non-terminated '\"'."));
2410 if (!(*cmdrest ==
',' || *cmdrest ==
'\0'))
2411 error (
_(
"Invalid argument syntax"));
2413 if (*cmdrest ==
',')
2419 argvec = (
struct expression **) alloca (strlen (cmd)
2423 while (*cmdrest !=
'\0')
2429 argvec[nargs++] = expr;
2431 if (*cmdrest ==
',')
2440 format_start, format_end - format_start,
2441 fpieces, nargs, argvec);
2465 struct bp_location **locp = NULL, **loc2p;
2466 int null_command_or_parse_error = 0;
2468 struct bp_location *loc;
2477 if (dprintf_style != dprintf_style_agent)
2523 null_command_or_parse_error = 1;
2531 if (null_command_or_parse_error)
2582 struct ui_file *tmp_error_stream,
2583 int *disabled_breaks,
2584 int *hw_breakpoint_error,
2585 int *hw_bp_error_explained_already)
2588 const char *bp_err_message = NULL;
2647 if (automatic_hardware_breakpoints)
2658 static int said = 0;
2664 _(
"Note: automatically using "
2665 "hardware breakpoints for "
2666 "read-only addresses.\n"));
2675 _(
"Cannot insert breakpoint %d.\n"
2676 "Cannot set software breakpoint "
2677 "at read-only address %s\n"),
2702 bp_err_message = e.message;
2710 if (!overlay_events_enabled)
2716 warning (
_(
"hardware breakpoint %d not supported in overlay!"),
2739 bp_err_message = e.message;
2745 "Overlay breakpoint %d "
2746 "failed: in ROM?\n",
2765 bp_err_message = e.message;
2798 if (!*disabled_breaks)
2801 "Cannot insert breakpoint %d.\n",
2804 "Temporarily disabling shared "
2805 "library breakpoints:\n");
2807 *disabled_breaks = 1;
2816 *hw_breakpoint_error = 1;
2817 *hw_bp_error_explained_already = bp_err_message != NULL;
2819 "Cannot insert hardware breakpoint %d%s",
2821 if (bp_err_message != NULL)
2826 if (bp_err_message == NULL)
2834 "Cannot insert breakpoint %d.\n"
2842 "Cannot insert breakpoint %d: %s\n",
2873 struct bp_location *loc, **loc_temp;
2919 Error inserting catchpoint %d: Your system does not support this type\n\
2944 struct bp_location *loc, **loc_temp;
2957 struct bp_location *tmp;
2959 if (loc->
pspace == pspace)
2966 if (tmp->
next == loc)
3007 struct bp_location *loc, **loc_tmp;
3011 callback (loc, NULL);
3022 struct bp_location *bl, **blp_tmp;
3025 int disabled_breaks = 0;
3026 int hw_breakpoint_error = 0;
3027 int hw_bp_details_reported = 0;
3062 &hw_breakpoint_error, &hw_bp_details_reported);
3082 struct bp_location *bl, **blp_tmp;
3085 int disabled_breaks = 0;
3086 int hw_breakpoint_error = 0;
3087 int hw_bp_error_explained_already = 0;
3121 &hw_breakpoint_error, &hw_bp_error_explained_already);
3130 int some_failed = 0;
3131 struct bp_location *loc;
3142 for (loc = bpt->
loc; loc; loc = loc->
next)
3150 for (loc = bpt->
loc; loc; loc = loc->
next)
3154 hw_breakpoint_error = 1;
3156 "Could not insert hardware watchpoint %d.\n",
3166 if (hw_breakpoint_error && !hw_bp_error_explained_already)
3169 "Could not insert hardware breakpoints:\n\
3170 You may have requested too many hardware breakpoints/watchpoints.\n");
3186 struct bp_location *bl, **blp_tmp;
3212 Thread-specific breakpoint %d deleted - thread %d no longer in the thread list.\n"),
3226 struct bp_location *bl, **blp_tmp;
3249 struct bp_location *bl, **blp_tmp;
3251 struct ui_file *tmp_error_stream;
3252 int dummy1 = 0, dummy2 = 0, dummy3 = 0;
3288 static int internal_breakpoint_number = -1;
3300 b->
number = internal_breakpoint_number--;
3304 b->
number = breakpoint_count;
3323 b->
number = internal_breakpoint_number--;
3329 static const char *
const longjmp_names[] =
3331 "longjmp",
"_longjmp",
"siglongjmp",
"_siglongjmp"
3333 #define NUM_LONGJMP_NAMES ARRAY_SIZE(longjmp_names)
3357 int exception_searched;
3384 bp_objfile_data = objfile_data (objfile, breakpoint_objfile_key);
3385 if (bp_objfile_data == NULL)
3388 sizeof (*bp_objfile_data));
3390 memset (bp_objfile_data, 0,
sizeof (*bp_objfile_data));
3391 set_objfile_data (objfile, breakpoint_objfile_key, bp_objfile_data);
3393 return bp_objfile_data;
3409 const char *
const func_name =
"_ovly_debug_event";
3427 if (m.minsym == NULL)
3445 overlay_events_enabled = 1;
3450 overlay_events_enabled = 0;
3484 ret = find_probes_in_objfile (objfile,
"libc",
"longjmp");
3498 bp_objfile_data->longjmp_probes = ret;
3502 if (bp_objfile_data->longjmp_probes != NULL)
3510 bp_objfile_data->longjmp_probes,
3521 b->
addr_string = xstrdup (
"-probe-stap libc:longjmp");
3534 const char *func_name;
3540 func_name = longjmp_names[i];
3546 if (m.minsym == NULL)
3574 const char *
const func_name =
"std::terminate()";
3595 if (bp_objfile_data->terminate_msym.minsym == NULL)
3607 bp_objfile_data->terminate_msym =
m;
3630 const char *
const func_name =
"_Unwind_DebugHook";
3642 if (!bp_objfile_data->exception_searched)
3646 ret = find_probes_in_objfile (objfile,
"libgcc",
"unwind");
3661 bp_objfile_data->exception_probes = ret;
3662 bp_objfile_data->exception_searched = 1;
3665 if (bp_objfile_data->exception_probes != NULL)
3673 bp_objfile_data->exception_probes,
3684 b->
addr_string = xstrdup (
"-probe-stap libgcc:unwind");
3698 if (bp_objfile_data->exception_msym.minsym == NULL)
3703 if (debug_hook.minsym == NULL)
3709 bp_objfile_data->exception_msym = debug_hook;
3728 struct bp_location *bploc, **bplocp_tmp;
3849 struct bp_location *bl, **blp_tmp;
3855 error (
_(
"Cannot detach breakpoints of inferior_ptid"));
3942 if (!overlay_events_enabled)
4012 warning (
_(
"Could not remove hardware watchpoint %d."),
4060 struct bp_location *bl, **blp_tmp;
4083 struct bp_location *bl, **blp_tmp;
4189 struct bp_location *bl, **blp_tmp;
4190 int any_breakpoint_here = 0;
4210 any_breakpoint_here = 1;
4222 struct bp_location *loc;
4258 struct bp_location **blp, **blp_tmp = NULL;
4259 struct bp_location *bl;
4263 struct bp_location *bl = *blp;
4282 struct bp_location **blp, **blp_tmp = NULL;
4283 struct bp_location *bl;
4287 struct bp_location *bl = *blp;
4305 struct bp_location **blp, **blp_tmp = NULL;
4306 struct bp_location *bl;
4310 struct bp_location *bl = *blp;
4330 struct bp_location *loc;
4339 for (loc = bpt->
loc; loc; loc = loc->
next)
4411 for (; bs != NULL; bs = bs->
next)
4414 memcpy (tmp, bs,
sizeof (*tmp));
4442 for (; bsp != NULL; bsp = bsp->
next)
4455 for (; bsp != NULL; bsp = bsp->
next)
4461 if (sig == GDB_SIGNAL_TRAP)
4496 b = (*bsp)->breakpoint_at;
4497 *bsp = (*bsp)->
next;
4549 breakpoint_proceeded = 1;
4557 executing_breakpoint_commands = 0;
4566 return cmd && (strcmp (
"silent", cmd->
line) == 0);
4587 if (executing_breakpoint_commands)
4590 executing_breakpoint_commands = 1;
4598 breakpoint_proceeded = 0;
4599 for (; bs != NULL; bs = bs->
next)
4603 struct cleanup *this_cmd_tree_chain;
4618 cmd = ccmd ? ccmd->
commands : NULL;
4629 if (breakpoint_proceeded)
4638 if (breakpoint_proceeded)
4740 _(
"print_bp_stop_message: unrecognized enum value"));
4757 if (any_added || any_deleted)
4759 _(
"Stopped due to shared library event:\n"));
4762 _(
"Stopped due to shared library event (no "
4763 "libraries added or removed)\n"));
4847 for (; bs; bs = bs->
next)
4896 **bs_link_pointer = bs;
4897 *bs_link_pointer = &bs->
next;
4918 if (!stopped_by_watchpoint)
4956 struct bp_location *loc;
4959 for (loc = b->
loc; loc; loc = loc->
next)
4966 if (newaddr == start)
4989 #define WP_DELETED 1
4991 #define WP_VALUE_CHANGED 2
4993 #define WP_VALUE_NOT_CHANGED 3
4997 #define BP_TEMPFLAG 1
4998 #define BP_HARDWAREFLAG 2
5012 int within_current_scope;
5025 within_current_scope = 1;
5045 within_current_scope = (fr != NULL);
5049 if (within_current_scope)
5054 if (
function == NULL
5057 within_current_scope = 0;
5060 if (within_current_scope)
5067 if (within_current_scope)
5076 struct value *new_val;
5094 if ((b->
val != NULL) != (new_val != NULL)
5097 if (new_val != NULL)
5137 " deleted because the program has left the block in\n\
5138 which its expression is valid.\n");
5171 const struct bp_location *bl;
5181 int must_check_value = 0;
5186 must_check_value = 1;
5191 must_check_value = 1;
5198 must_check_value = 1;
5200 if (must_check_value)
5203 =
xstrprintf (
"Error evaluating expression for watchpoint %d\n",
5257 int other_write_watchpoint = 0;
5273 other_write_watchpoint = 1;
5279 if (other_write_watchpoint
5333 const struct bp_location *bl;
5335 int value_is_zero = 0;
5383 int within_current_scope = 1;
5428 within_current_scope = 0;
5430 if (within_current_scope)
5433 "Error in testing breakpoint condition:\n",
5437 warning (
_(
"Watchpoint condition cannot be tested "
5438 "in the current scope"));
5447 if (cond && value_is_zero)
5498 struct bp_location *bl;
5499 struct bp_location *loc;
5501 bpstat bs_head = NULL, *bs_link = &bs_head;
5505 int need_remove_insert;
5520 for (bl = b->
loc; bl != NULL; bl = bl->
next)
5583 for (bs = bs_head; bs != NULL; bs = bs->
next)
5598 for (bs = bs_head; bs != NULL; bs = bs->
next)
5645 need_remove_insert = 0;
5647 for (bs = bs_head; bs != NULL; bs = bs->
next)
5655 need_remove_insert = 1;
5658 if (need_remove_insert)
5660 else if (removed_any)
5699 for (bs = bs_head; bs != NULL; bs = bs->
next)
5836 _(
"bpstat_what: tracepoint encountered"));
5857 _(
"bpstat_what: unhandled bptype %d"), (
int) bptype);
5874 for (bs = bs_head; bs != NULL; bs = bs->
next)
5912 for (; bs != NULL; bs = bs->
next)
5929 int i, total_width, width, align;
5935 if (strcmp (text, col_name) == 0)
5937 gdb_assert (total_width <
sizeof wrap_indent);
5938 memset (wrap_indent,
' ', total_width);
5939 wrap_indent[total_width] = 0;
5944 total_width += width + 1;
5961 struct bp_location *bl;
5962 char host_evals = 0;
5963 char target_evals = 0;
5975 for (bl = b->
loc; bl; bl = bl->
next)
5983 if (host_evals && target_evals)
5985 else if (target_evals)
6014 struct bp_location *loc)
6027 else if (loc && loc->
symtab)
6080 struct ep_type_description
6085 static struct ep_type_description bptypes[] =
6123 if (((
int) type >= (
sizeof (bptypes) /
sizeof (bptypes[0])))
6124 || ((
int) type != bptypes[(
int) type].type))
6126 _(
"bptypes table does not describe type #%d."),
6129 return bptypes[(
int) type].description;
6137 const char *field_name,
6148 if (!is_mi && mi_only)
6153 for (i = 0;
VEC_iterate (
int, inf_num, i, inf); ++i)
6159 xsnprintf (mi_group,
sizeof (mi_group),
"i%d", inf);
6180 struct bp_location *loc,
6182 struct bp_location **last_loc,
6186 static char bpenables[] =
"nynny";
6189 int header_of_multiple = 0;
6190 int part_of_multiple = (loc != NULL);
6201 header_of_multiple = 1;
6209 if (part_of_multiple)
6223 if (part_of_multiple)
6230 if (part_of_multiple)
6238 if (part_of_multiple)
6260 _(
"print_one_breakpoint: bp_none encountered\n"));
6311 if (header_of_multiple)
6320 if (!header_of_multiple)
6328 if (loc != NULL && !header_of_multiple)
6331 VEC(
int) *inf_num = NULL;
6354 if (!part_of_multiple)
6363 else if (b->
task != 0)
6372 if (!part_of_multiple)
6378 ui_out_text (uiout,
"\tstop only in stack frame at ");
6399 == condition_evaluation_target)
6409 if (!part_of_multiple && b->
thread != -1)
6417 if (!part_of_multiple)
6481 if (!part_of_multiple && l)
6538 struct bp_location **last_loc,
6565 struct bp_location *loc;
6568 for (loc = b->
loc; loc; loc = loc->
next, ++n)
6582 int print_address_bits = 0;
6583 struct bp_location *loc;
6585 for (loc = b->
loc; loc; loc = loc->
next)
6595 if (addr_bit > print_address_bits)
6596 print_address_bits = addr_bit;
6599 return print_address_bits;
6612 struct bp_location *dummy_loc = NULL;
6627 char **error_message)
6662 struct bp_location *last_loc = NULL;
6663 int nr_printable_breakpoints;
6664 struct cleanup *bkpttbl_chain;
6666 int print_address_bits = 0;
6667 int print_type_col_width = 14;
6674 nr_printable_breakpoints = 0;
6678 if (filter && !filter (b))
6683 if (args != NULL && *args !=
'\0')
6693 int addr_bit, type_len;
6696 if (addr_bit > print_address_bits)
6697 print_address_bits = addr_bit;
6700 if (type_len > print_type_col_width)
6701 print_type_col_width = type_len;
6703 nr_printable_breakpoints++;
6710 nr_printable_breakpoints,
6715 nr_printable_breakpoints,
6718 if (nr_printable_breakpoints > 0)
6720 if (nr_printable_breakpoints > 0)
6723 if (nr_printable_breakpoints > 0)
6727 if (nr_printable_breakpoints > 0)
6730 if (nr_printable_breakpoints > 0)
6735 if (nr_printable_breakpoints > 0)
6737 if (print_address_bits <= 32)
6744 if (nr_printable_breakpoints > 0)
6748 if (nr_printable_breakpoints > 0)
6755 if (filter && !filter (b))
6761 if (args != NULL && *args !=
'\0')
6782 if (nr_printable_breakpoints == 0)
6788 if (args == NULL || *args ==
'\0')
6792 "No breakpoint or watchpoint matching '%s'.\n",
6806 return nr_printable_breakpoints;
6844 if (num_printed == 0)
6846 if (args == NULL || *args ==
'\0')
6849 ui_out_message (uiout, 0,
"No watchpoint matching '%s'.\n", args);
6866 struct bp_location *bl = b->
loc;
6868 for (; bl; bl = bl->
next)
6904 if (b->
thread == -1 && thread != -1)
6906 else if (b->
thread != -1)
6914 : ((others == 1) ?
" and" :
""));
6951 struct bp_location *loc2)
6997 || aspace1 == aspace2)
7012 || aspace1 == aspace2)
7013 && addr2 >= addr1 && addr2 < addr1 + len1);
7040 struct bp_location *loc2)
7057 struct bp_location *loc2)
7059 int hw_point1, hw_point2;
7068 if (hw_point1 != hw_point2)
7083 int bnum,
int have_bnum)
7093 warning (
_(
"Breakpoint %d address previously adjusted from %s to %s."),
7094 bnum, astr1, astr2);
7096 warning (
_(
"Breakpoint address adjusted from %s to %s."), astr1, astr2);
7144 if (adjusted_bpaddr != bpaddr)
7147 return adjusted_bpaddr;
7155 memset (loc, 0,
sizeof (*loc));
7166 switch (owner->
type)
7220 static struct bp_location *
7249 if (--(*blp)->refc == 0)
7266 breakpoint_chain = b;
7283 memset (b, 0,
sizeof (*b));
7333 const char *function_name;
7337 &func_addr, NULL, &is_gnu_ifunc);
7339 if (is_gnu_ifunc && !explicit_loc)
7574 overlay_events_enabled = 1;
7588 overlay_events_enabled = 0;
7750 struct bp_location *loc, **locp_tmp;
7783 struct bp_location *loc, **locp_tmp;
7784 int disabled_shlib_breaks = 0;
7791 && bfd_get_flavour (
exec_bfd) == bfd_target_aout_flavour)
7818 if (!disabled_shlib_breaks)
7821 warning (
_(
"Temporarily disabling breakpoints "
7822 "for unloaded shared library \"%s\""),
7825 disabled_shlib_breaks = 1;
7839 if (objfile == NULL)
7859 struct bp_location *loc;
7860 int bp_modified = 0;
7865 for (loc = b->
loc; loc != NULL; loc = loc->
next)
8181 regfree (&self->compiled);
8182 xfree (self->regex);
8184 base_breakpoint_ops.
dtor (b);
8213 struct bp_location *other_bl;
8215 if (other == bl->
owner)
8221 if (self->base.pspace != NULL && other->pspace != self->base.pspace)
8224 for (other_bl = other->loc; other_bl != NULL; other_bl = other_bl->
next)
8226 if (other->ops->breakpoint_hit (other_bl, aspace, bp_addr, ws))
8251 || regexec (&self->compiled, iter->
so_name, 0, NULL, 0) == 0)
8265 || regexec (&self->compiled, iter, 0, NULL, 0) == 0)
8315 msg =
xstrprintf (
_(
"load of library matching %s"), self->regex);
8317 msg = xstrdup (
_(
"load of library"));
8322 msg =
xstrprintf (
_(
"unload of library matching %s"), self->regex);
8324 msg = xstrdup (
_(
"unload of library"));
8331 self->is_load ?
"load" :
"unload");
8340 self->is_load ?
"load" :
"unload");
8350 self->is_load ?
"load" :
"unload");
8383 errcode = regcomp (&c->
compiled, arg, REG_NOSUB);
8389 error (
_(
"Invalid regexp (%s): %s"), err, arg);
8391 c->
regex = xstrdup (arg);
8412 const int enabled = 1;
8451 b->
cond_string = (cond_string == NULL) ? NULL : xstrdup (cond_string);
8472 int tempflag,
char *cond_string,
8513 base_breakpoint_ops.
dtor (b);
8618 struct bp_location *bl;
8623 for (bl = b->
loc; bl; bl = bl->
next)
8641 struct bp_location *bl;
8646 for (bl = b->
loc; bl; bl = bl->
next)
8668 *other_type_used = 0;
8676 if (b->
type == type)
8679 *other_type_used = 1;
8812 copy->
number = internal_breakpoint_number--;
8840 sal.explicit_pc = 1;
8860 static struct bp_location *
8864 struct bp_location *loc, **tmp;
8868 if (loc_gdbarch == NULL)
8882 for (tmp = &(b->
loc); *tmp != NULL && (*tmp)->
address <= adjusted_address;
8883 tmp = &((*tmp)->next))
8889 loc->
address = adjusted_address;
8941 target_mem = alloca (len);
8949 && memcmp (target_mem, bpoint, len) == 0)
8992 char *printf_line = NULL;
9001 if (*dprintf_args ==
',')
9005 if (*dprintf_args !=
'"')
9006 error (
_(
"Bad format string, missing '\"'."));
9008 if (strcmp (dprintf_style, dprintf_style_gdb) == 0)
9009 printf_line =
xstrprintf (
"printf %s", dprintf_args);
9010 else if (strcmp (dprintf_style, dprintf_style_call) == 0)
9012 if (!dprintf_function)
9013 error (
_(
"No function supplied for dprintf call"));
9015 if (dprintf_channel && strlen (dprintf_channel) > 0)
9016 printf_line =
xstrprintf (
"call (void) %s (%s,%s)",
9021 printf_line =
xstrprintf (
"call (void) %s (%s)",
9025 else if (strcmp (dprintf_style, dprintf_style_agent) == 0)
9028 printf_line =
xstrprintf (
"agent-printf %s", dprintf_args);
9031 warning (
_(
"Target cannot run dprintf commands, falling back to GDB printf"));
9032 printf_line =
xstrprintf (
"printf %s", dprintf_args);
9037 _(
"Invalid dprintf style."));
9048 printf_cmd_line->
next = NULL;
9049 printf_cmd_line->
line = printf_line;
9083 int enabled,
int internal,
unsigned flags,
9090 int target_resources_ok;
9093 target_resources_ok =
9096 if (target_resources_ok == 0)
9097 error (
_(
"No hardware breakpoint support in the target."));
9098 else if (target_resources_ok < 0)
9099 error (
_(
"Hardware breakpoints used exceeds limit."));
9104 for (i = 0; i < sals.
nelts; ++i)
9107 struct bp_location *loc;
9113 loc_gdbarch = gdbarch;
9143 char *p = &addr_string[3];
9168 warning (
_(
"Couldn't determine the static "
9169 "tracepoint marker to probe"));
9188 error (
_(
"Garbage '%s' follows condition"), arg);
9198 error (
_(
"Format string required"));
9218 char *filter,
char *cond_string,
9221 int thread,
int task,
int ignore_count,
9223 int enabled,
int internal,
unsigned flags,
9224 int display_canonical)
9243 filter, cond_string, extra_string,
9245 thread, task, ignore_count,
9247 enabled,
internal, flags,
9272 char *cond_string,
char *extra_string,
9274 int thread,
int task,
int ignore_count,
9276 int enabled,
int internal,
unsigned flags)
9298 cond_string, extra_string,
9300 thread, task, ignore_count, ops,
9301 from_tty, enabled,
internal, flags,
9359 error (
_(
"No default breakpoint address now."));
9374 || ((strchr (
"+-", (*address)[0]) != NULL)
9375 && ((*address)[1] !=
'['))))
9379 canonical, NULL, NULL);
9382 cursal.
symtab, cursal.
line, canonical, NULL, NULL);
9395 for (i = 0; i < sals->
nelts; i++)
9415 for (i = 0; i < sals->
nelts; i++)
9417 struct gdbarch *sarch;
9419 sal = &sals->
sals[i];
9431 error (
_(
"May not have a fast tracepoint at 0x%s%s"),
9432 paddress (sarch, sal->
pc), (msg ? msg :
""));
9440 static void ATTRIBUTE_NORETURN
9443 error (
_(
"Unknown thread %d."),
id);
9455 char **cond_string,
int *thread,
int *task,
9458 *cond_string = NULL;
9465 const char *end_tok;
9467 const char *cond_start = NULL;
9468 const char *cond_end = NULL;
9472 if ((*tok ==
'"' || *tok ==
',') && rest)
9480 toklen = end_tok - tok;
9482 if (toklen >= 1 && strncmp (tok,
"if", toklen) == 0)
9486 tok = cond_start = end_tok + 1;
9490 *cond_string =
savestring (cond_start, cond_end - cond_start);
9492 else if (toklen >= 1 && strncmp (tok,
"thread", toklen) == 0)
9497 *thread = strtol (tok, &tmptok, 0);
9499 error (
_(
"Junk after thread keyword."));
9504 else if (toklen >= 1 && strncmp (tok,
"task", toklen) == 0)
9509 *task = strtol (tok, &tmptok, 0);
9511 error (
_(
"Junk after task keyword."));
9513 error (
_(
"Unknown task %d."), *task);
9522 error (
_(
"Junk at end of arguments."));
9534 char *p = &(*arg_p)[3];
9548 error (
_(
"No known static tracepoint marker named %s"), marker_str);
9553 for (i = 0; i < sals.
nelts; i++)
9586 char *arg,
char *cond_string,
9587 int thread,
char *extra_string,
9589 int tempflag,
enum bptype type_wanted,
9593 int from_tty,
int enabled,
int internal,
9596 char *copy_arg = NULL;
9597 char *addr_start = arg;
9600 struct cleanup *bkpt_chain = NULL;
9603 int prev_bkpt_count = breakpoint_count;
9612 addr_start, ©_arg);
9631 && !
nquery (
_(
"Make %s pending on future shared library load? "),
9642 copy_arg = xstrdup (addr_start);
9707 &thread, &task, &rest);
9713 extra_string = rest;
9718 error (
_(
"Garbage '%s' at end of location"), arg);
9723 cond_string = xstrdup (cond_string);
9729 extra_string = xstrdup (extra_string);
9735 cond_string, extra_string, type_wanted,
9737 thread, task, ignore_count, ops,
9738 from_tty, enabled,
internal, flags);
9769 cond_string = xstrdup (cond_string);
9773 if (extra_string != NULL)
9775 extra_string = xstrdup (extra_string);
9795 warning (
_(
"Multiple breakpoints were set.\nUse the "
9796 "\"delete\" command to delete unwanted breakpoints."));
9797 prev_breakpoint_count = prev_bkpt_count;
9827 const char *arg_cp = arg;
9838 tempflag, type_wanted,
9840 pending_break_support,
9855 if (sal->
pc == 0 && sal->
symtab != NULL)
9858 error (
_(
"No line %d in file \"%s\"."),
9871 const struct block *b;
9935 Usage: stop in <function | address>\n\
9936 stop at <line>\n"));
9944 if (arg == (
char *) NULL)
9946 else if (*arg !=
'*')
9954 while (*argptr && !hasColon)
9956 hasColon = (*argptr ==
':');
9961 badInput = (*argptr !=
':');
9963 badInput = isdigit (*arg);
9977 if (arg == (
char *) NULL || *arg ==
'*')
9986 while (*argptr && !hasColon)
9988 hasColon = (*argptr ==
':');
9993 badInput = (*argptr ==
':');
9995 badInput = !isdigit (*arg);
10017 pending_break_support,
10028 error (
_(
"May only run agent-printf on the target"));
10041 || ws->
value.
sig != GDB_SIGNAL_TRAP)
10045 bl->
length, aspace, bp_addr);
10064 struct bp_location *bl = b->
loc;
10074 ui_out_text (uiout,
"\nTemporary ranged breakpoint ");
10094 struct bp_location **last_loc)
10096 struct bp_location *bl = b->
loc;
10122 struct bp_location *bl = b->
loc;
10129 address_end = address_start + bl->
length - 1;
10147 struct bp_location *bl = b->
loc;
10156 printf_filtered (
_(
"Hardware assisted ranged breakpoint %d from %s to %s."),
10197 error (
_(
"Could not find location of the end of the range."));
10211 char *arg_start, *addr_string_start, *addr_string_end;
10213 int bp_count, can_use_bp, length;
10217 struct cleanup *cleanup_bkpt;
10222 error (
_(
"This target does not support hardware ranged breakpoints."));
10228 if (can_use_bp < 0)
10229 error (
_(
"Hardware breakpoints used exceeds limit."));
10232 if (arg == NULL || arg[0] ==
'\0')
10233 error(
_(
"No address range specified."));
10243 error (
_(
"Too few arguments."));
10245 error (
_(
"Could not find location of the beginning of the range."));
10251 error (
_(
"Cannot create a ranged breakpoint with multiple locations."));
10253 sal_start = lsal_start->
sals.
sals[0];
10254 addr_string_start =
savestring (arg_start, arg - arg_start);
10272 &canonical_end, NULL, NULL);
10277 error (
_(
"Could not find location of the end of the range."));
10282 error (
_(
"Cannot create a ranged breakpoint with multiple locations."));
10285 addr_string_end =
savestring (arg_start, arg - arg_start);
10289 if (sal_start.
pc > end)
10290 error (
_(
"Invalid address range, end precedes start."));
10292 length = end - sal_start.
pc + 1;
10295 error (
_(
"Address range too large."));
10296 else if (length == 1)
10311 b->
number = breakpoint_count;
10332 int i = exp->
nelts;
10352 case BINOP_LOGICAL_AND:
10353 case BINOP_LOGICAL_OR:
10354 case BINOP_BITWISE_AND:
10355 case BINOP_BITWISE_IOR:
10356 case BINOP_BITWISE_XOR:
10358 case BINOP_NOTEQUAL:
10385 case OP_OBJC_NSSTRING:
10388 case UNOP_LOGICAL_NOT:
10389 case UNOP_COMPLEMENT:
10394 case UNOP_CAST_TYPE:
10395 case UNOP_REINTERPRET_CAST:
10396 case UNOP_DYNAMIC_CAST:
10451 base_breakpoint_ops.
dtor (
self);
10662 struct cleanup *ui_out_chain;
10677 ui_out_text (uiout,
"Hardware read watchpoint ");
10681 ui_out_text (uiout,
"Hardware access (read/write) watchpoint ");
10686 _(
"Invalid hardware watchpoint type."));
10717 _(
"Invalid watchpoint type."));
10823 _(
"Invalid hardware watchpoint type."));
10828 Check the underlying instruction at PC for the memory\n\
10829 address and value which triggered this watchpoint.\n"));
10861 struct cleanup *ui_out_chain;
10866 ui_out_text (uiout,
"Masked hardware watchpoint ");
10870 ui_out_text (uiout,
"Masked hardware read watchpoint ");
10874 ui_out_text (uiout,
"Masked hardware access (read/write) watchpoint ");
10879 _(
"Invalid hardware watchpoint type."));
10910 _(
"Invalid hardware watchpoint type."));
10935 int just_location,
int internal)
10937 struct breakpoint *b, *scope_breakpoint = NULL;
10939 const struct block *exp_valid_block = NULL, *cond_exp_valid_block = NULL;
10940 struct value *val, *mark, *result;
10941 int saved_bitpos = 0, saved_bitsize = 0;
10943 const char *exp_start = NULL;
10944 const char *exp_end = NULL;
10945 const char *tok, *end_tok;
10947 const char *cond_start = NULL;
10948 const char *cond_end = NULL;
10961 if (arg != NULL && arg[0] !=
'\0')
10963 const char *value_start;
10965 exp_end = arg + strlen (arg);
10969 for (tok = exp_end - 1; tok >
arg; tok--)
10972 while (tok > arg && (*tok ==
' ' || *tok ==
'\t'))
10977 while (tok > arg && (*tok !=
' ' && *tok !=
'\t'))
10979 value_start = tok + 1;
10982 while (tok > arg && (*tok ==
' ' || *tok ==
'\t'))
10989 while (tok > arg && (*tok !=
' ' && *tok !=
'\t'))
10992 toklen = end_tok - tok + 1;
10994 if (toklen == 6 &&
startswith (tok,
"thread"))
11002 error(
_(
"You can specify only one thread."));
11005 thread = strtol (value_start, &endp, 0);
11009 if (*endp !=
' ' && *endp !=
'\t' && *endp !=
'\0')
11010 error (
_(
"Invalid thread ID specification %s."), value_start);
11016 else if (toklen == 4 &&
startswith (tok,
"mask"))
11021 struct value *mask_value, *mark;
11024 error(
_(
"You can specify only one mask."));
11026 use_mask = just_location = 1;
11049 expression =
savestring (arg, exp_end - arg);
11051 exp_start = arg = expression;
11057 while (exp_end > exp_start && (exp_end[-1] ==
' ' || exp_end[-1] ==
'\t'))
11065 len = exp_end - exp_start;
11066 while (len > 0 && isspace (exp_start[len - 1]))
11068 error (
_(
"Cannot watch constant value `%.*s'."), len, exp_start);
11075 if (val != NULL && just_location)
11085 exp_valid_block = NULL;
11095 error (
_(
"This target does not support masked watchpoints."));
11096 else if (ret == -2)
11097 error (
_(
"Invalid mask or memory region."));
11100 else if (val != NULL)
11106 toklen = end_tok - tok;
11107 if (toklen >= 1 && strncmp (tok,
"if", toklen) == 0)
11109 struct expression *cond;
11112 tok = cond_start = end_tok + 1;
11123 error (
_(
"Junk at end of command."));
11131 if (exp_valid_block && frame)
11157 scope_breakpoint->
type);
11201 (
int) (exp_end - exp_start), exp_start);
11237 if (scope_breakpoint != NULL)
11245 if (!just_location)
11271 int found_memory_cnt = 0;
11272 struct value *head = v;
11275 if (!can_use_hw_watchpoints)
11325 len = (target_exact_watchpoints
11333 found_memory_cnt += num_regs;
11346 return found_memory_cnt;
11361 int just_location = 0;
11436 struct gdbarch *frame_gdbarch;
11440 struct breakpoint *breakpoint2 = NULL;
11456 (
struct symtab *) NULL, 0);
11458 if (sals.
nelts != 1)
11459 error (
_(
"Couldn't get information on specified line."));
11461 sal = sals.
sals[0];
11465 error (
_(
"Junk at end of arguments."));
11518 proceed (-1, GDB_SIGNAL_DEFAULT);
11528 args =
xmalloc (
sizeof (*args));
11556 if (((*arg)[0] !=
'i') || ((*arg)[1] !=
'f') || !isspace ((*arg)[2]))
11565 cond_string = *arg;
11569 (*arg) += strlen (cond_string);
11571 return cond_string;
11589 char *cond_string = NULL;
11608 if ((*arg !=
'\0') && !isspace (*arg))
11609 error (
_(
"Junk at end of arguments."));
11626 error (
_(
"unsupported or unknown fork kind; cannot catch it"));
11638 char *cond_string = NULL;
11653 if ((*arg !=
'\0') && !isspace (*arg))
11654 error (
_(
"Junk at end of arguments."));
11678 loc_gdbarch = gdbarch;
11703 error (
_(
"Catch requires an event name."));
11710 error (
_(
"Catch requires an event name."));
11719 uintptr_t ua = (uintptr_t) *ba;
11721 uintptr_t ub = (uintptr_t) *bb;
11723 if ((*ba)->number < (*bb)->number)
11725 else if ((*ba)->number > (*bb)->number)
11732 return ua > ub ? 1 : 0;
11769 error (
_(
"No source file specified."));
11771 sals.
sals[0] = sal;
11801 for (i = 0; i < sals.
nelts; i++)
11803 const char *sal_fullname;
11817 sal = sals.
sals[i];
11818 sal_fullname = (sal.
symtab == NULL
11828 struct bp_location *loc = b->
loc;
11829 for (; loc; loc = loc->
next)
11839 int line_match = 0;
11843 && sal_fullname != NULL
11847 sal_fullname) == 0)
11850 if (pc_match || line_match)
11867 error (
_(
"No breakpoint at %s."), arg);
11869 error (
_(
"No breakpoint at this line."));
11918 for (; bs; bs = bs->
next)
11941 struct bp_location *a = *(
void **) ap;
11942 struct bp_location *b = *(
void **) bp;
11967 return (a > b) - (a < b);
11977 struct bp_location *bl, **blp_tmp;
11979 bp_location_placed_address_before_address_max = 0;
11980 bp_location_shadow_len_after_address_max = 0;
11994 if (addr > bp_location_placed_address_before_address_max)
11995 bp_location_placed_address_before_address_max = addr;
12001 if (addr > bp_location_shadow_len_after_address_max)
12002 bp_location_shadow_len_after_address_max = addr;
12021 struct bp_location *bl;
12023 int bp_location_downloaded = 0;
12030 for (bl = b->
loc; bl; bl = bl->
next)
12043 bp_location_downloaded = 1;
12047 if (bp_location_downloaded)
12059 const int left_inserted = left->
inserted;
12060 const int left_duplicate = left->
duplicate;
12088 struct bp_location **locp = NULL, **loc2p;
12089 struct bp_location *loc;
12144 struct bp_location **locp, *loc;
12149 int last_pspace_num = -1;
12157 struct bp_location *bp_loc_first;
12158 struct bp_location *wp_loc_first;
12159 struct bp_location *awp_loc_first;
12160 struct bp_location *rwp_loc_first;
12164 struct bp_location **old_location, **old_locp;
12165 unsigned old_location_count;
12169 bp_location = NULL;
12170 bp_location_count = 0;
12174 for (loc = b->
loc; loc; loc = loc->
next)
12175 bp_location_count++;
12177 bp_location =
xmalloc (
sizeof (*bp_location) * bp_location_count);
12180 for (loc = b->
loc; loc; loc = loc->
next)
12182 qsort (bp_location, bp_location_count,
sizeof (*bp_location),
12198 for (old_locp = old_location; old_locp < old_location + old_location_count;
12201 struct bp_location *old_loc = *old_locp;
12202 struct bp_location **loc2p;
12206 int found_object = 0;
12208 int keep_in_target = 0;
12213 while (locp < bp_location + bp_location_count
12218 (loc2p < bp_location + bp_location_count
12227 && (last_addr != old_loc->
address
12228 || last_pspace_num != old_loc->
pspace->
num))
12231 last_pspace_num = old_loc->
pspace->
num;
12234 if (*loc2p == old_loc)
12240 last_addr = old_loc->
address;
12261 keep_in_target = 1;
12278 (loc2p < bp_location + bp_location_count
12282 struct bp_location *loc2 = *loc2p;
12298 if (loc2 != old_loc
12302 keep_in_target = 1;
12310 if (!keep_in_target)
12323 "breakpoint %d\n"),
12381 old_loc->
owner = NULL;
12387 old_loc->
owner = NULL;
12403 bp_loc_first = NULL;
12404 wp_loc_first = NULL;
12405 awp_loc_first = NULL;
12406 rwp_loc_first = NULL;
12411 struct bp_location **loc_first_p;
12427 loc_first_p = &wp_loc_first;
12429 loc_first_p = &rwp_loc_first;
12431 loc_first_p = &awp_loc_first;
12433 loc_first_p = &bp_loc_first;
12435 if (*loc_first_p == NULL
12439 *loc_first_p = loc;
12488 struct bp_location *loc;
12521 for (bs = bps; bs; bs = bs->
next)
12552 if (b->
loc == NULL)
12581 struct bp_location *loc = b->
loc;
12583 for (; loc; loc = loc->
next)
12595 xfree (self->cond);
12596 if (self->cond_bytecode)
12598 xfree (self->function_name);
12604 static const struct bp_location_ops bp_location_ops =
12616 xfree (self->cond_string);
12617 xfree (self->extra_string);
12618 xfree (self->addr_string);
12619 xfree (self->filter);
12620 xfree (self->addr_string_range_end);
12623 static struct bp_location *
12626 struct bp_location *loc;
12628 loc = XNEW (
struct bp_location);
12639 #define internal_error_pure_virtual_called() \
12640 gdb_assert_not_reached ("pure virtual function called")
12715 enum bptype type_wanted,
12726 char *extra_string,
12727 enum bptype type_wanted,
12728 enum bpdisp disposition,
12730 int task,
int ignore_count,
12733 int internal,
unsigned flags)
12824 || ws->
value.
sig != GDB_SIGNAL_TRAP)
12844 if (dprintf_style == dprintf_style_agent
12868 const struct bp_location *bl;
12942 _(
"unhandled breakpoint type %d"), (
int) tp->
type);
12951 enum bptype type_wanted,
12952 char *addr_start,
char **copy_arg)
12955 addr_start, copy_arg);
12962 char *extra_string,
12963 enum bptype type_wanted,
12964 enum bpdisp disposition,
12966 int task,
int ignore_count,
12968 int from_tty,
int enabled,
12969 int internal,
unsigned flags)
12972 cond_string, extra_string,
12974 disposition, thread, task,
12975 ignore_count, ops, from_tty,
12976 enabled,
internal, flags);
13064 "gdb should not stop!\n"));
13070 "gdb should not stop!\n"));
13185 enum bptype type_wanted,
13186 char *addr_start,
char **copy_arg)
13204 error (
_(
"probe not found"));
13263 _(
"unhandled tracepoint type %d"), (
int) b->
type);
13282 _(
"unhandled tracepoint type %d"), (
int) self->type);
13294 enum bptype type_wanted,
13295 char *addr_start,
char **copy_arg)
13298 addr_start, copy_arg);
13305 char *extra_string,
13306 enum bptype type_wanted,
13307 enum bpdisp disposition,
13309 int task,
int ignore_count,
13311 int from_tty,
int enabled,
13312 int internal,
unsigned flags)
13315 cond_string, extra_string,
13317 disposition, thread, task,
13318 ignore_count, ops, from_tty,
13319 enabled,
internal, flags);
13337 enum bptype type_wanted,
13338 char *addr_start,
char **copy_arg)
13342 addr_start, copy_arg);
13368 error (
_(
"Format string required"));
13407 struct bpstats tmp_bs = { NULL };
13408 struct bpstats *tmp_bs_p = &tmp_bs;
13438 enum bptype type_wanted,
13439 char *addr_start,
char **copy_arg)
13445 *copy_arg =
savestring (addr_start, *arg - addr_start);
13456 char *extra_string,
13457 enum bptype type_wanted,
13458 enum bpdisp disposition,
13460 int task,
int ignore_count,
13462 int from_tty,
int enabled,
13463 int internal,
unsigned flags)
13467 canonical->sals, 0);
13483 expanded.
nelts = 1;
13492 cond_string, extra_string,
13493 type_wanted, disposition,
13494 thread, task, ignore_count, ops,
13495 from_tty, enabled,
internal, flags,
13594 if (breakpoint_chain == bpt)
13595 breakpoint_chain = bpt->
next;
13598 if (b->
next == bpt)
13662 if (next == related)
13665 function (related, data);
13673 function (related, data);
13677 while (related != b);
13704 int breaks_to_delete = 0;
13712 breaks_to_delete = 1;
13718 || (breaks_to_delete &&
query (
_(
"Delete all breakpoints? "))))
13746 struct bp_location *l;
13747 htab_t htab = htab_create_alloc (13, htab_hash_string,
13748 (
int (*) (
const void *,
13749 const void *))
streq,
13752 for (l = loc; l != NULL; l = l->
next)
13761 slot = (
const char **) htab_find_slot (htab, (
const void *)
name,
13767 htab_delete (htab);
13773 htab_delete (htab);
13824 warning (
_(
"static tracepoint %d changed probed marker from %s to %s"),
13837 if (!sal.explicit_pc
13839 && sal.symtab != NULL
13859 warning (
_(
"marker for static tracepoint %d (%s) not "
13860 "found at previous line number"),
13890 b->loc->line_number = sal2.
line;
13893 xfree (b->addr_string);
13896 b->loc->line_number);
13928 if ((a == NULL) != (b == NULL))
13944 struct bp_location *existing_locations = b->
loc;
13953 "multiple locations found\n"),
13969 for (i = 0; i < sals.
nelts; ++i)
13971 struct bp_location *new_loc;
13992 warning (
_(
"failed to reevaluate condition "
13993 "for breakpoint %d: %s"),
14000 if (sals_end.
nelts)
14011 struct bp_location *e = existing_locations;
14019 for (; e; e = e->
next)
14023 struct bp_location *l = b->
loc;
14024 if (have_ambiguous_names)
14026 for (; l; l = l->
next)
14035 for (; l; l = l->
next)
14068 b->ops->decode_linespec (b, &s, &sals);
14072 int not_found_and_ok = 0;
14084 && (b->condition_not_parsed
14085 || (b->loc && b->loc->shlib_disabled)
14086 || (b->loc && b->loc->pspace->executing_startup)
14088 not_found_and_ok = 1;
14090 if (!not_found_and_ok)
14108 for (i = 0; i < sals.
nelts; ++i)
14110 if (b->condition_not_parsed && s && s[0])
14112 char *cond_string, *extra_string;
14116 &cond_string, &thread, &task,
14119 b->cond_string = cond_string;
14120 b->thread = thread;
14123 b->extra_string = extra_string;
14124 b->condition_not_parsed = 0;
14163 expanded_end = sals_end;
14176 enum bptype type_wanted,
14177 char *addr_start,
char **copy_arg)
14190 char *extra_string,
14191 enum bptype type_wanted,
14192 enum bpdisp disposition,
14194 int task,
int ignore_count,
14196 int from_tty,
int enabled,
14197 int internal,
unsigned flags)
14201 type_wanted, disposition,
14202 thread, task, ignore_count, ops, from_tty,
14203 enabled,
internal, flags);
14217 (
struct symtab *) NULL, 0,
14229 *sals = lsal->
sals;
14277 int save_input_radix;
14287 char *message =
xstrprintf (
"Error in re-setting breakpoint %d: ",
14339 if (b->
number == bptnum)
14343 if (from_tty && count != 0)
14354 "breakpoint %d is reached."),
14356 else if (count == 1)
14361 "crossings of breakpoint %d."),
14368 error (
_(
"No breakpoint number %d."), bptnum);
14384 error (
_(
"bad breakpoint number: '%s'"), args);
14386 error (
_(
"Second argument (specified ignore-count) is missing."));
14408 if (args == 0 || *args ==
'\0')
14415 const char *p = state.
string;
14422 warning (
_(
"bad breakpoint number at or near '%s'"), p);
14430 function (b, data);
14439 static struct bp_location *
14442 char *dot = strchr (number,
'.');
14447 struct bp_location *loc;
14454 error (
_(
"Bad breakpoint number '%s'"), number);
14457 if (b->
number == bp_num)
14462 if (!b || b->
number != bp_num)
14463 error (
_(
"Bad breakpoint number '%s'"), number);
14468 error (
_(
"Bad breakpoint location number '%s'"), number);
14472 for (;loc_num && loc; --loc_num, loc = loc->
next)
14475 error (
_(
"Bad breakpoint location number '%s'"), dot+1);
14502 struct bp_location *location;
14504 for (location = bpt->
loc; location; location = location->
next)
14547 if (strchr (num,
'.'))
14576 int target_resources_ok;
14582 target_resources_ok =
14585 if (target_resources_ok == 0)
14586 error (
_(
"No hardware breakpoint support in the target."));
14587 else if (target_resources_ok < 0)
14588 error (
_(
"Hardware breakpoints used exceeds limit."));
14622 struct bp_location *location;
14624 for (location = bpt->
loc; location; location = location->
next)
14678 if (strchr (num,
'.'))
14715 struct disp_data disp_data = *(
struct disp_data *) arg;
14786 const bfd_byte *data)
14798 struct bp_location *loc;
14800 for (loc = bp->
loc; loc != NULL; loc = loc->
next)
14803 && addr + len > loc->
address)
14846 struct bp_location *loc;
14848 for (loc = bp->
loc; loc != NULL; loc = loc->
next)
14880 tracepoint_count = num;
14888 const char *arg_cp = arg;
14901 pending_break_support,
14917 pending_break_support,
14933 if (arg &&
startswith (arg,
"-m") && isspace (arg[2]))
14944 pending_break_support,
14978 char *addr_str, small_buf[100];
14989 warning (
_(
"Uploaded tracepoint %d has no "
14990 "source location, using raw address"),
14993 addr_str = small_buf;
14998 warning (
_(
"Uploaded tracepoint %d condition "
14999 "has no source form, ignoring it"),
15009 pending_break_support,
15023 xsnprintf (small_buf,
sizeof (small_buf),
"%d %d", utp->
pass,
15046 warning (
_(
"Uploaded tracepoint %d actions "
15047 "have no source form, ignoring them"),
15068 if (num_printed == 0)
15070 if (args == NULL || *args ==
'\0')
15073 ui_out_message (uiout, 0,
"No tracepoint matching '%s'.\n", args);
15105 int breaks_to_delete = 0;
15114 breaks_to_delete = 1;
15120 || (breaks_to_delete &&
query (
_(
"Delete all tracepoints? "))))
15153 unsigned int count;
15155 if (args == 0 || *args == 0)
15156 error (
_(
"passcount command requires an "
15157 "argument (count + optional TP num)"));
15159 count = strtoul (args, &args, 10);
15162 if (*args && strncasecmp (args,
"all", 3) == 0)
15168 error (
_(
"Junk at end of arguments."));
15176 else if (*args ==
'\0')
15239 char *instring = arg == NULL ? NULL : *arg;
15246 else if (arg == NULL || *arg == NULL || ! **arg)
15247 tpnum = tracepoint_count;
15253 if (instring && *instring)
15296 int extra_trace_bits = 0;
15298 if (filename == 0 || *filename == 0)
15299 error (
_(
"Argument required (file name in which to save)"));
15309 if (filter && !filter (tp))
15316 extra_trace_bits = 1;
15329 filename = tilde_expand (filename);
15333 error (
_(
"Unable to open file '%s' for saving (%s)"),
15337 if (extra_trace_bits)
15347 if (filter && !filter (tp))
15392 struct bp_location *loc;
15395 for (loc = tp->
loc; loc != NULL; loc = loc->
next, n++)
15428 all_tracepoints (
void)
15446 #define BREAK_ARGS_HELP(command) \
15447 command" [PROBE_MODIFIER] [LOCATION] [thread THREADNUM] [if CONDITION]\n\
15448 PROBE_MODIFIER shall be present if the command is to be placed in a\n\
15449 probe point. Accepted values are `-probe' (for a generic, automatically\n\
15450 guessed probe type), `-probe-stap' (for a SystemTap probe) or \n\
15451 `-probe-dtrace' (for a DTrace probe).\n\
15452 LOCATION may be a line number, function name, or \"*\" and an address.\n\
15453 If a line number is specified, break at start of code for that line.\n\
15454 If a function is specified, break at start of code for that function.\n\
15455 If an address is specified, break at that exact address.\n\
15456 With no LOCATION, uses current execution address of the selected\n\
15457 stack frame. This is useful for breaking on return to a stack frame.\n\
15459 THREADNUM is the number from \"info threads\".\n\
15460 CONDITION is a boolean expression.\n\
15462 Multiple breakpoints at one place are permitted, and useful if their\n\
15463 conditions are different.\n\
15465 Do \"help breakpoints\" for info on other commands dealing with breakpoints."
15477 void *user_data_catch,
15478 void *user_data_tcatch)
15499 "the name of a save subcommand.\n"));
15511 if ((*callback) (b, data))
15540 struct bp_location *bl;
15547 for (bl = b->
loc; bl != NULL; bl = bl->
next)
15563 struct bp_location **locp, *loc;
15573 static int initialized = 0;
15769 breakpoint_objfile_key
15772 breakpoint_chain = 0;
15775 breakpoint_count = 0;
15777 tracepoint_count = 0;
15780 Set ignore-count of breakpoint number N to COUNT.\n\
15781 Usage is `ignore N COUNT'."));
15784 Set commands to be executed when a breakpoint is hit.\n\
15785 Give breakpoint number as argument after \"commands\".\n\
15786 With no argument, the targeted breakpoint is the last one set.\n\
15787 The commands themselves follow starting on the next line.\n\
15788 Type a line containing \"end\" to indicate the end of them.\n\
15789 Give \"silent\" as the first line to make the breakpoint silent;\n\
15790 then no output is printed when it is hit, except what the commands print."));
15793 Specify breakpoint number N to break only if COND is true.\n\
15794 Usage is `condition N COND', where N is an integer and COND is an\n\
15795 expression to be evaluated whenever breakpoint N is reached."));
15799 Set a temporary breakpoint.\n\
15800 Like \"break\" except the breakpoint is only temporary,\n\
15801 so it will be deleted when hit. Equivalent to \"break\" followed\n\
15802 by using \"enable delete\" on the breakpoint number.\n\
15808 Set a hardware assisted breakpoint.\n\
15809 Like \"break\" except the breakpoint requires hardware support,\n\
15810 some target hardware may not have this support.\n\
15816 Set a temporary hardware assisted breakpoint.\n\
15817 Like \"hbreak\" except the breakpoint is only temporary,\n\
15818 so it will be deleted when hit.\n\
15824 Enable some breakpoints.\n\
15825 Give breakpoint numbers (separated by spaces) as arguments.\n\
15826 With no subcommand, breakpoints are enabled until you command otherwise.\n\
15827 This is used to cancel the effect of the \"disable\" command.\n\
15828 With a subcommand you can enable temporarily."),
15834 Enable some breakpoints.\n\
15835 Give breakpoint numbers (separated by spaces) as arguments.\n\
15836 This is used to cancel the effect of the \"disable\" command.\n\
15837 May be abbreviated to simply \"enable\".\n"),
15838 &enablebreaklist,
"enable breakpoints ", 1, &
enablelist);
15841 Enable breakpoints for one hit. Give breakpoint numbers.\n\
15842 If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
15846 Enable breakpoints and delete when hit. Give breakpoint numbers.\n\
15847 If a breakpoint is hit while enabled in this fashion, it is deleted."),
15851 Enable breakpoints for COUNT hits. Give count and then breakpoint numbers.\n\
15852 If a breakpoint is hit while enabled in this fashion,\n\
15853 the count is decremented; when it reaches zero, the breakpoint is disabled."),
15857 Enable breakpoints and delete when hit. Give breakpoint numbers.\n\
15858 If a breakpoint is hit while enabled in this fashion, it is deleted."),
15862 Enable breakpoints for one hit. Give breakpoint numbers.\n\
15863 If a breakpoint is hit while enabled in this fashion, it becomes disabled."),
15867 Enable breakpoints for COUNT hits. Give count and then breakpoint numbers.\n\
15868 If a breakpoint is hit while enabled in this fashion,\n\
15869 the count is decremented; when it reaches zero, the breakpoint is disabled."),
15873 Disable some breakpoints.\n\
15874 Arguments are breakpoint numbers with spaces in between.\n\
15875 To disable all breakpoints, give no argument.\n\
15876 A disabled breakpoint is not forgotten, but has no effect until re-enabled."),
15882 Disable some breakpoints.\n\
15883 Arguments are breakpoint numbers with spaces in between.\n\
15884 To disable all breakpoints, give no argument.\n\
15885 A disabled breakpoint is not forgotten, but has no effect until re-enabled.\n\
15886 This command may be abbreviated \"disable\"."),
15890 Delete some breakpoints or auto-display expressions.\n\
15891 Arguments are breakpoint numbers with spaces in between.\n\
15892 To delete all breakpoints, give no argument.\n\
15894 Also a prefix command for deletion of other GDB objects.\n\
15895 The \"unset\" command is also an alias for \"delete\"."),
15901 Delete some breakpoints or auto-display expressions.\n\
15902 Arguments are breakpoint numbers with spaces in between.\n\
15903 To delete all breakpoints, give no argument.\n\
15904 This command may be abbreviated \"delete\"."),
15908 Clear breakpoint at specified line or function.\n\
15909 Argument may be line number, function name, or \"*\" and an address.\n\
15910 If line number is specified, all breakpoints in that line are cleared.\n\
15911 If function is specified, breakpoints at beginning of function are cleared.\n\
15912 If an address is specified, breakpoints at that address are cleared.\n\
15914 With no argument, clears all breakpoints in the line that the selected frame\n\
15915 is executing in.\n\
15917 See also the \"delete\" command which clears breakpoints by number."));
15921 Set breakpoint at specified line or function.\n"
15933 Break in function/address or break at a line in the current file."),
15936 _(
"Break in function or address."), &
stoplist);
15938 _(
"Break at a line in the current file."), &
stoplist);
15940 Status of user-settable breakpoints, or breakpoint number NUMBER.\n\
15941 The \"Type\" column indicates one of:\n\
15942 \tbreakpoint - normal breakpoint\n\
15943 \twatchpoint - watchpoint\n\
15944 The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
15945 the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
15946 breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
15947 address and file/line number respectively.\n\
15949 Convenience variable \"$_\" and default examine address for \"x\"\n\
15950 are set to the address of the last breakpoint listed unless the command\n\
15951 is prefixed with \"server \".\n\n\
15952 Convenience variable \"$bpnum\" contains the number of the last\n\
15953 breakpoint set."));
15957 Status of specified breakpoints (all user-settable breakpoints if no argument).\n\
15958 The \"Type\" column indicates one of:\n\
15959 \tbreakpoint - normal breakpoint\n\
15960 \twatchpoint - watchpoint\n\
15961 The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
15962 the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
15963 breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
15964 address and file/line number respectively.\n\
15966 Convenience variable \"$_\" and default examine address for \"x\"\n\
15967 are set to the address of the last breakpoint listed unless the command\n\
15968 is prefixed with \"server \".\n\n\
15969 Convenience variable \"$bpnum\" contains the number of the last\n\
15970 breakpoint set."));
15975 Status of all breakpoints, or breakpoint number NUMBER.\n\
15976 The \"Type\" column indicates one of:\n\
15977 \tbreakpoint - normal breakpoint\n\
15978 \twatchpoint - watchpoint\n\
15979 \tlongjmp - internal breakpoint used to step through longjmp()\n\
15980 \tlongjmp resume - internal breakpoint at the target of longjmp()\n\
15981 \tuntil - internal breakpoint used by the \"until\" command\n\
15982 \tfinish - internal breakpoint used by the \"finish\" command\n\
15983 The \"Disp\" column contains one of \"keep\", \"del\", or \"dis\" to indicate\n\
15984 the disposition of the breakpoint after it gets hit. \"dis\" means that the\n\
15985 breakpoint will be disabled. The \"Address\" and \"What\" columns indicate the\n\
15986 address and file/line number respectively.\n\
15988 Convenience variable \"$_\" and default examine address for \"x\"\n\
15989 are set to the address of the last breakpoint listed unless the command\n\
15990 is prefixed with \"server \".\n\n\
15991 Convenience variable \"$bpnum\" contains the number of the last\n\
15996 Set catchpoints to catch events."),
15997 &catch_cmdlist,
"catch ",
16001 Set temporary catchpoints to catch events."),
16002 &tcatch_cmdlist,
"tcatch ",
16021 Usage: catch load [REGEX]\n\
16022 If REGEX is given, only stop for libraries matching the regular expression."),
16028 Usage: catch unload [REGEX]\n\
16029 If REGEX is given, only stop for libraries matching the regular expression."),
16036 Set a watchpoint for an expression.\n\
16037 Usage: watch [-l|-location] EXPRESSION\n\
16038 A watchpoint stops execution of your program whenever the value of\n\
16039 an expression changes.\n\
16040 If -l or -location is given, this evaluates EXPRESSION and watches\n\
16041 the memory to which it refers."));
16045 Set a read watchpoint for an expression.\n\
16046 Usage: rwatch [-l|-location] EXPRESSION\n\
16047 A watchpoint stops execution of your program whenever the value of\n\
16048 an expression is read.\n\
16049 If -l or -location is given, this evaluates EXPRESSION and watches\n\
16050 the memory to which it refers."));
16054 Set a watchpoint for an expression.\n\
16055 Usage: awatch [-l|-location] EXPRESSION\n\
16056 A watchpoint stops execution of your program whenever the value of\n\
16057 an expression is either read or written.\n\
16058 If -l or -location is given, this evaluates EXPRESSION and watches\n\
16059 the memory to which it refers."));
16063 Status of specified watchpoints (all watchpoints if no argument)."));
16068 &can_use_hw_watchpoints,
_(
"\
16069 Set debugger's willingness to use watchpoint hardware."),
_(
"\
16070 Show debugger's willingness to use watchpoint hardware."),
_(
"\
16071 If zero, gdb will not use hardware for new watchpoints, even if\n\
16072 such is available. (However, any hardware watchpoints that were\n\
16073 created before setting this to nonzero, will continue to use watchpoint\n\
16079 can_use_hw_watchpoints = 1;
16084 Set a tracepoint at specified line or function.\n\
16087 Do \"help tracepoints\" for info on other tracepoint commands."));
16096 Set a fast tracepoint at specified line or function.\n\
16099 Do \"help tracepoints\" for info on other tracepoint commands."));
16103 Set a static tracepoint at specified line, function or marker.\n\
16105 strace [LOCATION] [if CONDITION]\n\
16106 LOCATION may be a line number, function name, \"*\" and an address,\n\
16107 or -m MARKER_ID.\n\
16108 If a line number is specified, probe the marker at start of code\n\
16109 for that line. If a function is specified, probe the marker at start\n\
16110 of code for that function. If an address is specified, probe the marker\n\
16111 at that exact address. If a marker id is specified, probe the marker\n\
16112 with that name. With no LOCATION, uses current execution address of\n\
16113 the selected stack frame.\n\
16114 Static tracepoints accept an extra collect action -- ``collect $_sdata''.\n\
16115 This collects arbitrary user data passed in the probe point call to the\n\
16116 tracing library. You can inspect it when analyzing the trace buffer,\n\
16117 by printing the $_sdata variable like any other convenience variable.\n\
16119 CONDITION is a boolean expression.\n\
16121 Multiple tracepoints at one place are permitted, and useful if their\n\
16122 conditions are different.\n\
16124 Do \"help breakpoints\" for info on other commands dealing with breakpoints.\n\
16125 Do \"help tracepoints\" for info on other tracepoint commands."));
16129 Status of specified tracepoints (all tracepoints if no argument).\n\
16130 Convenience variable \"$tpnum\" contains the number of the\n\
16131 last tracepoint set."));
16136 Delete specified tracepoints.\n\
16137 Arguments are tracepoint numbers, separated by spaces.\n\
16138 No argument means delete all tracepoints."),
16143 Disable specified tracepoints.\n\
16144 Arguments are tracepoint numbers, separated by spaces.\n\
16145 No argument means disable all tracepoints."),
16150 Enable specified tracepoints.\n\
16151 Arguments are tracepoint numbers, separated by spaces.\n\
16152 No argument means enable all tracepoints."),
16157 Set the passcount for a tracepoint.\n\
16158 The trace will end when the tracepoint has been passed 'count' times.\n\
16159 Usage: passcount COUNT TPNUM, where TPNUM may also be \"all\";\n\
16160 if TPNUM is omitted, passcount refers to the last tracepoint defined."));
16163 _(
"Save breakpoint definitions as a script."),
16164 &save_cmdlist,
"save ",
16168 Save current breakpoint definitions as a script.\n\
16169 This includes all types of breakpoints (breakpoints, watchpoints,\n\
16170 catchpoints, tracepoints). Use the 'source' command in another debug\n\
16171 session to restore them."),
16176 Save current tracepoint definitions as a script.\n\
16177 Use the 'source' command in another debug session to restore them."),
16185 Breakpoint specific settings\n\
16186 Configure various breakpoint-specific variables such as\n\
16187 pending breakpoint behavior"),
16188 &breakpoint_set_cmdlist,
"set breakpoint ",
16191 Breakpoint specific settings\n\
16192 Configure various breakpoint-specific variables such as\n\
16193 pending breakpoint behavior"),
16194 &breakpoint_show_cmdlist,
"show breakpoint ",
16198 &pending_break_support,
_(
"\
16199 Set debugger's behavior regarding pending breakpoints."),
_(
"\
16200 Show debugger's behavior regarding pending breakpoints."),
_(
"\
16201 If on, an unrecognized breakpoint location will cause gdb to create a\n\
16202 pending breakpoint. If off, an unrecognized breakpoint location results in\n\
16203 an error. If auto, an unrecognized breakpoint location results in a\n\
16204 user-query to see if a pending breakpoint should be created."),
16207 &breakpoint_set_cmdlist,
16208 &breakpoint_show_cmdlist);
16213 &automatic_hardware_breakpoints,
_(
"\
16214 Set automatic usage of hardware breakpoints."),
_(
"\
16215 Show automatic usage of hardware breakpoints."),
_(
"\
16216 If set, the debugger will automatically use hardware breakpoints for\n\
16217 breakpoints set with \"break\" but falling in read-only memory. If not set,\n\
16218 a warning will be emitted for such breakpoints."),
16221 &breakpoint_set_cmdlist,
16222 &breakpoint_show_cmdlist);
16225 &always_inserted_mode,
_(
"\
16226 Set mode for inserting breakpoints."),
_(
"\
16227 Show mode for inserting breakpoints."),
_(
"\
16228 When this mode is on, breakpoints are inserted immediately as soon as\n\
16229 they're created, kept inserted even when execution stops, and removed\n\
16230 only when the user deletes them. When this mode is off (the default),\n\
16231 breakpoints are inserted only when execution continues, and removed\n\
16232 when execution stops."),
16235 &breakpoint_set_cmdlist,
16236 &breakpoint_show_cmdlist);
16239 condition_evaluation_enums,
16240 &condition_evaluation_mode_1,
_(
"\
16241 Set mode of breakpoint condition evaluation."),
_(
"\
16242 Show mode of breakpoint condition evaluation."),
_(
"\
16243 When this is set to \"host\", breakpoint conditions will be\n\
16244 evaluated on the host's side by GDB. When it is set to \"target\",\n\
16245 breakpoint conditions will be downloaded to the target (if the target\n\
16246 supports such feature) and conditions will be evaluated on the target's side.\n\
16247 If this is set to \"auto\" (default), this will be automatically set to\n\
16248 \"target\" if it supports condition evaluation, otherwise it will\n\
16249 be set to \"gdb\""),
16252 &breakpoint_set_cmdlist,
16253 &breakpoint_show_cmdlist);
16256 Set a breakpoint for an address range.\n\
16257 break-range START-LOCATION, END-LOCATION\n\
16258 where START-LOCATION and END-LOCATION can be one of the following:\n\
16259 LINENUM, for that line in the current file,\n\
16260 FILE:LINENUM, for that line in that file,\n\
16261 +OFFSET, for that number of lines after the current line\n\
16262 or the start of the range\n\
16263 FUNCTION, for the first line in that function,\n\
16264 FILE:FUNCTION, to distinguish among like-named static functions.\n\
16265 *ADDRESS, for the instruction at that address.\n\
16267 The breakpoint will stop execution of the inferior whenever it executes\n\
16268 an instruction at any address within the [START-LOCATION, END-LOCATION]\n\
16269 range (including START-LOCATION and END-LOCATION)."));
16272 Set a dynamic printf at specified line or function.\n\
16273 dprintf location,format string,arg1,arg2,...\n\
16274 location may be a line number, function name, or \"*\" and an address.\n\
16275 If a line number is specified, break at start of code for that line.\n\
16276 If a function is specified, break at start of code for that function."));
16280 dprintf_style_enums, &dprintf_style,
_(
"\
16281 Set the style of usage for dynamic printf."),
_(
"\
16282 Show the style of usage for dynamic printf."),
_(
"\
16283 This setting chooses how GDB will do a dynamic printf.\n\
16284 If the value is \"gdb\", then the printing is done by GDB to its own\n\
16285 console, as with the \"printf\" command.\n\
16286 If the value is \"call\", the print is done by calling a function in your\n\
16287 program; by default printf(), but you can choose a different function or\n\
16288 output stream by setting dprintf-function and dprintf-channel."),
16292 dprintf_function = xstrdup (
"printf");
16294 &dprintf_function,
_(
"\
16295 Set the function to use for dynamic printf"),
_(
"\
16296 Show the function to use for dynamic printf"), NULL,
16300 dprintf_channel = xstrdup (
"");
16302 &dprintf_channel,
_(
"\
16303 Set the channel to use for dynamic printf"),
_(
"\
16304 Show the channel to use for dynamic printf"), NULL,
16309 &disconnected_dprintf,
_(
"\
16310 Set whether dprintf continues after GDB disconnects."),
_(
"\
16311 Show whether dprintf continues after GDB disconnects."),
_(
"\
16312 Use this to let dprintf commands continue to hit and produce output\n\
16313 even if GDB disconnects or detaches from the target."),
16319 agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
16320 (target agent only) This is useful for formatted output in user-defined commands."));
16322 automatic_hardware_breakpoints = 1;
int threads_are_executing(void)
void error_no_arg(const char *why)
struct gdbarch * target_gdbarch(void)
int frame_id_p(struct frame_id l)
static int watchpoint_locations_match(struct bp_location *loc1, struct bp_location *loc2)
static struct breakpoint_ops catch_exec_breakpoint_ops
static void watch_maybe_just_location(char *arg, int accessflag, int from_tty)
struct frame_info * frame_find_by_id(struct frame_id id)
static struct breakpoint_ops tracepoint_probe_breakpoint_ops
static void strace_command(char *arg, int from_tty)
#define target_can_async_p()
static int breakpoint_1(char *, int, int(*)(const struct breakpoint *))
void annotate_watchpoint(int num)
struct agent_expr * cond_bytecode
void set_cmd_context(struct cmd_list_element *cmd, void *context)
void free_agent_expr(struct agent_expr *x)
static int remove_catch_exec(struct bp_location *bl)
static struct bp_location * find_location_by_number(char *number)
static struct breakpoint_ops bkpt_probe_breakpoint_ops
#define target_remove_fork_catchpoint(pid)
static int all_locations_are_pending(struct bp_location *loc)
union exp_element elts[1]
enum condition_status condition_changed
char * hex_string(LONGEST num)
struct value * value_mark(void)
void(* walk_bp_location_callback)(struct bp_location *, void *)
int moribund_breakpoint_here_p(struct address_space *aspace, CORE_ADDR pc)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
static const struct objfile_data * breakpoint_objfile_key
void release_static_tracepoint_marker(struct static_tracepoint_marker *marker)
const char * symtab_to_filename_for_display(struct symtab *symtab)
static const char * bp_location_condition_evaluator(struct bp_location *bl)
void annotate_breakpoints_table(void)
#define SYMTAB_COMPUNIT(symtab)
struct command_line * breakpoint_commands(struct breakpoint *b)
static void init_raw_breakpoint_without_location(struct breakpoint *b, struct gdbarch *gdbarch, enum bptype bptype, const struct breakpoint_ops *ops)
void(* print_recreate)(struct breakpoint *, struct ui_file *fp)
static int command_line_is_silent(struct command_line *cmd)
static void show_can_use_hw_watchpoints(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct breakpoint * create_jit_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
struct cleanup * make_show_memory_breakpoints_cleanup(int show)
static void output_thread_groups(struct ui_out *uiout, const char *field_name, VEC(int)*inf_num, int mi_only)
static int base_breakpoint_explains_signal(struct breakpoint *b, enum gdb_signal sig)
int number_of_program_spaces(void)
static struct agent_expr * parse_cond_to_aexpr(CORE_ADDR scope, struct expression *cond)
#define target_can_run_breakpoint_commands()
void observer_notify_breakpoint_created(struct breakpoint *b)
void handle_solib_event(void)
struct thread_info * find_thread_ptid(ptid_t ptid)
void awatch_command_wrapper(char *arg, int from_tty, int internal)
struct thread_info * find_thread_id(int num)
static struct bp_location * allocate_bp_location(struct breakpoint *bpt)
static void clear_command(char *, int)
static void base_breakpoint_re_set(struct breakpoint *b)
void set_ignore_count(int bptnum, int count, int from_tty)
static void enable_count_command(char *, int)
#define target_remove_watchpoint(addr, len, type, cond)
static void insert_breakpoint_locations(void)
struct observer * observer_attach_thread_exit(observer_thread_exit_ftype *f)
struct value * value_addr(struct value *arg1)
void enable_breakpoints_after_startup(void)
void enable_overlay_breakpoints(void)
static void free_bp_location(struct bp_location *loc)
int putchar_unfiltered(int c)
static void tracepoint_decode_linespec(struct breakpoint *b, char **s, struct symtabs_and_lines *sals)
static void print_one_catch_vfork(struct breakpoint *b, struct bp_location **last_loc)
void remove_solib_event_breakpoints(void)
const struct blockvector * blockvector_for_pc_sect(CORE_ADDR pc, struct obj_section *section, const struct block **pblock, struct compunit_symtab *cust)
struct frame_info * get_selected_frame(const char *message)
void init_bp_location(struct bp_location *loc, const struct bp_location_ops *ops, struct breakpoint *owner)
static void bkpt_decode_linespec(struct breakpoint *b, char **s, struct symtabs_and_lines *sals)
void * get_cmd_context(struct cmd_list_element *cmd)
void delete_longjmp_breakpoint_cleanup(void *arg)
static void iterate_over_related_breakpoints(struct breakpoint *b, void(*function)(struct breakpoint *, void *), void *data)
struct observer * observer_attach_free_objfile(observer_free_objfile_ftype *f)
static void print_one_catch_exec(struct breakpoint *b, struct bp_location **last_loc)
CORE_ADDR get_frame_pc(struct frame_info *frame)
static const char * breakpoint_condition_evaluation_mode(void)
#define SYMBOL_PRINT_NAME(symbol)
void value_free_to_mark(struct value *mark)
static void remove_threaded_breakpoints(struct thread_info *tp, int silent)
void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options)
static struct counted_command_line * alloc_counted_command_line(struct command_line *commands)
void ui_out_wrap_hint(struct ui_out *uiout, char *identstring)
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void check_tracepoint_command(char *line, void *closure)
int single_step_breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
static void handle_jit_event(void)
static void show_automatic_hardware_breakpoints(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void ui_out_field_stream(struct ui_out *uiout, const char *fldname, struct ui_file *stream)
int value_equal_contents(struct value *arg1, struct value *arg2)
void ui_out_field_int(struct ui_out *uiout, const char *fldname, int value)
static void stopin_command(char *arg, int from_tty)
static void bpstat_remove_bp_location(bpstat bps, struct breakpoint *bpt)
struct frame_info * get_current_frame(void)
static void internal_bkpt_re_set(struct breakpoint *b)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
static void base_breakpoint_print_mention(struct breakpoint *b)
static struct uploaded_tp * this_utp
void disable_breakpoints_before_startup(void)
enum target_hw_bp_type watchpoint_type
struct address_space * aspace
void insert_breakpoints(void)
static struct breakpoint_ops catch_vfork_breakpoint_ops
int target_remove_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
int is_breakpoint(const struct breakpoint *bpt)
#define BREAK_ARGS_HELP(command)
void ui_out_spaces(struct ui_out *uiout, int numspaces)
int(* works_in_software_mode)(const struct breakpoint *)
static int breakpoint_locations_match(struct bp_location *loc1, struct bp_location *loc2)
static void catch_exec_command_1(char *arg, int from_tty, struct cmd_list_element *command)
void bpstat_clear(bpstat *bsp)
static void print_one_breakpoint_location(struct breakpoint *b, struct bp_location *loc, int loc_number, struct bp_location **last_loc, int allflag)
void bpstat_clear_actions(void)
static void check_fast_tracepoint_sals(struct gdbarch *gdbarch, struct symtabs_and_lines *sals)
static void do_disable_breakpoint(struct breakpoint *b, void *ignore)
void annotate_record(void)
int may_insert_fast_tracepoints
struct breakpoint * create_solib_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
int value_offset(const struct value *value)
static int works_in_software_mode_watchpoint(const struct breakpoint *b)
struct cmd_list_element * enablelist
static void print_recreate_catch_fork(struct breakpoint *b, struct ui_file *fp)
static void print_recreate_masked_watchpoint(struct breakpoint *b, struct ui_file *fp)
#define gnu_ifunc_resolver_stop
static void enable_delete_command(char *, int)
struct breakpoint * breakpoint
enum print_stop_action bpstat_print(bpstat bs, int kind)
static int remove_masked_watchpoint(struct bp_location *bl)
int section_is_overlay(struct obj_section *section)
LONGEST value_as_long(struct value *val)
static void momentary_bkpt_check_status(bpstat bs)
CORE_ADDR frame_unwind_caller_pc(struct frame_info *this_frame)
int number_is_in_list(const char *list, int number)
static void break_command_1(char *, int, int)
int events_till_retirement
static void base_breakpoint_print_recreate(struct breakpoint *b, struct ui_file *fp)
static void thbreak_command(char *, int)
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static int breakpoint_address_is_meaningful(struct breakpoint *bpt)
struct gdbarch * frame_unwind_caller_arch(struct frame_info *next_frame)
int hardware_breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
void warning(const char *fmt,...)
struct cmd_list_element * deprecate_cmd(struct cmd_list_element *cmd, const char *replacement)
struct counted_command_line * commands
#define target_enable_tracepoint(loc)
struct breakpoint * set_momentary_breakpoint_at_pc(struct gdbarch *gdbarch, CORE_ADDR pc, enum bptype type)
static void do_enable_breakpoint_disp(struct breakpoint *bpt, void *arg)
int query(const char *ctlstr,...)
static void print_mention_catch_fork(struct breakpoint *b)
static void set_breakpoint_cmd(char *args, int from_tty)
void jit_breakpoint_re_set(void)
struct program_space * pspace
static void map_breakpoint_numbers(char *, void(*)(struct breakpoint *, void *), void *)
struct command_line * read_command_lines_1(char *(*read_next_line_func)(void), int parse_commands, void(*validator)(char *, void *), void *closure)
static void print_mention_watchpoint(struct breakpoint *b)
enum print_stop_action(* print_it)(struct bpstats *bs)
static void disable_command(char *, int)
struct bound_minimal_symbol overlay_msym
#define target_supports_enable_disable_tracepoint()
int value_bitpos(const struct value *value)
void breakpoint_auto_delete(bpstat bs)
static void rwatch_command(char *arg, int from_tty)
static void show_always_inserted_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int bp_location_has_shadow(struct bp_location *bl)
struct symbol * find_pc_sect_function(CORE_ADDR pc, struct obj_section *section)
enum language set_language(enum language lang)
struct cleanup * make_cleanup_ui_out_table_begin_end(struct ui_out *ui_out, int nr_cols, int nr_rows, const char *tblid)
void destroy_linespec_result(struct linespec_result *ls)
struct counted_command_line * commands
static struct breakpoint_ops ranged_breakpoint_ops
static enum auto_boolean pending_break_support
char * plongest(LONGEST l)
static struct cmd_list_element * catch_cmdlist
struct cmd_list_element * maintenanceinfolist
static void base_breakpoint_create_sals_from_address(char **arg, struct linespec_result *canonical, enum bptype type_wanted, char *addr_start, char **copy_arg)
const char * skip_to_space_const(const char *chp)
static void show_breakpoint_cmd(char *args, int from_tty)
struct symtab_and_line get_current_source_symtab_and_line(void)
void annotate_field(int num)
static enum print_stop_action momentary_bkpt_print_it(bpstat bs)
struct ui_file * gdb_stdout
int(* resources_needed)(const struct bp_location *)
static void enable_trace_command(char *, int)
static void print_mention_ranged_breakpoint(struct breakpoint *b)
#define internal_error_pure_virtual_called()
static void print_recreate_catch_solib(struct breakpoint *b, struct ui_file *fp)
static const char * condition_evaluation_mode
void(* dtor)(struct bp_location *self)
static int need_moribund_for_location_type(struct bp_location *loc)
struct obj_section * section
static int bp_location_inserted_here_p(struct bp_location *bl, struct address_space *aspace, CORE_ADDR pc)
void select_frame(struct frame_info *fi)
#define target_supports_stopped_by_sw_breakpoint()
struct ui_file * gdb_fopen(const char *name, const char *mode)
struct frame_id get_stack_frame_id(struct frame_info *next_frame)
#define SYMBOL_CLASS(symbol)
static int automatic_hardware_breakpoints
enum breakpoint_here breakpoint_here_p(struct address_space *aspace, CORE_ADDR pc)
void internal_error(const char *file, int line, const char *fmt,...)
const struct frame_id null_frame_id
struct thread_info * inferior_thread(void)
static void update_global_location_list_nothrow(enum ugll_insert_mode)
static void set_condition_evaluation_mode(char *args, int from_tty, struct cmd_list_element *c)
void init_sal(struct symtab_and_line *sal)
static int breakpoint_hit_ranged_breakpoint(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
static void bp_location_target_extensions_update(void)
void unpack_value_bitfield(struct value *dest_val, int bitpos, int bitsize, const gdb_byte *valaddr, int embedded_offset, const struct value *val)
int ui_out_is_mi_like_p(struct ui_out *uiout)
static void print_one_catch_fork(struct breakpoint *b, struct bp_location **last_loc)
struct cmd_list_element * deletelist
#define VEC_unordered_remove(T, V, I)
static void dprintf_re_set(struct breakpoint *b)
struct symtabs_and_lines parse_probes(char **argptr, struct linespec_result *canonical)
void(* print_mention)(struct breakpoint *)
const struct gdb_exception exception_none
static void bpstat_check_breakpoint_conditions(bpstat bs, ptid_t ptid)
static void dtor_watchpoint(struct breakpoint *self)
char * get_regcomp_error(int, regex_t *)
int(* breakpoint_hit)(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
void(* set_semaphore)(struct probe *probe, struct objfile *objfile, struct gdbarch *gdbarch)
static void update_dprintf_commands(char *args, int from_tty, struct cmd_list_element *c)
void value_free(struct value *val)
struct symbol * block_linkage_function(const struct block *bl)
static void do_delete_breakpoint(struct breakpoint *b, void *ignore)
int breakpoints_not_allowed
static int bkpt_insert_location(struct bp_location *bl)
#define target_insert_watchpoint(addr, len, type, cond)
int catch_errors(catch_errors_ftype *func, void *func_args, char *errstring, return_mask mask)
#define target_insert_fork_catchpoint(pid)
struct value * value_copy(struct value *arg)
struct breakpoint_ops dprintf_breakpoint_ops
static int overlay_events_enabled
const struct block * innermost_block
static void print_mention_catch_solib(struct breakpoint *b)
static int ambiguous_names_p(struct bp_location *loc)
static int breakpoint_hit_watchpoint(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
enum command_control_type commands_from_control_command(char *arg, struct command_line *cmd)
static struct bp_location * base_breakpoint_allocate_location(struct breakpoint *self)
char * memory_error_message(enum target_xfer_status err, struct gdbarch *gdbarch, CORE_ADDR memaddr)
enum language la_language
void validate_actionline(const char *line, struct breakpoint *b)
static void trace_command(char *arg, int from_tty)
struct bp_location *(* allocate_location)(struct breakpoint *)
const struct block * cond_exp_valid_block
static int is_masked_watchpoint(const struct breakpoint *b)
int can_evaluate_probe_arguments(struct probe *probe)
struct breakpoint * create_thread_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
static enum print_stop_action print_bp_stop_message(bpstat bs)
#define VEC_safe_push(T, V, O)
void set_cmd_sfunc(struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
static void bkpt_probe_create_sals_from_address(char **arg, struct linespec_result *canonical, enum bptype type_wanted, char *addr_start, char **copy_arg)
static int breakpoint_hit_catch_exec(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
struct obj_section * section
struct cmd_list_element * cmdlist
void set_next_address(struct gdbarch *, CORE_ADDR)
int reattach_breakpoints(int pid)
void save_trace_state_variables(struct ui_file *fp)
struct gdbpy_breakpoint_object * py_bp_object
struct tracepoint * get_tracepoint(int num)
struct breakpoint * set_raw_breakpoint(struct gdbarch *gdbarch, struct symtab_and_line, enum bptype, const struct breakpoint_ops *)
static void set_breakpoint_number(int internal, struct breakpoint *b)
struct internalvar * lookup_internalvar(const char *name)
static void bpstat_free(bpstat bs)
void rwatch_command_wrapper(char *arg, int from_tty, int internal)
char * skip_spaces(char *chp)
static void print_breakpoint_location(struct breakpoint *b, struct bp_location *loc)
const gdb_byte * value_contents_for_printing(struct value *value)
void set_longjmp_breakpoint(struct thread_info *tp, struct frame_id frame)
static void find_condition_and_thread(const char *tok, CORE_ADDR pc, char **cond_string, int *thread, int *task, char **rest)
static int breakpoint_proceeded
ULONGEST traceframe_usage
static char * read_uploaded_action(void)
int bpstat_causes_stop(bpstat bs)
int number_of_inferiors(void)
static int hw_breakpoint_used_count(void)
static void decref_bp_location(struct bp_location **loc)
static int breakpoint_enabled(struct breakpoint *b)
static void create_sals_from_address_default(char **, struct linespec_result *, enum bptype, char *, char **)
static struct bp_location * add_location_to_breakpoint(struct breakpoint *, const struct symtab_and_line *)
static void create_exception_master_breakpoint(void)
void add_catch_command(char *name, char *docstring, cmd_sfunc_ftype *sfunc, completer_ftype *completer, void *user_data_catch, void *user_data_tcatch)
static void breakpoint_re_set_default(struct breakpoint *)
int program_breakpoint_here_p(struct gdbarch *gdbarch, CORE_ADDR address)
void init_ada_exception_breakpoint(struct breakpoint *b, struct gdbarch *gdbarch, struct symtab_and_line sal, char *addr_string, const struct breakpoint_ops *ops, int tempflag, int enabled, int from_tty)
static void build_target_command_list(struct bp_location *bl)
static void create_breakpoint_sal(struct gdbarch *gdbarch, struct symtabs_and_lines sals, char *addr_string, char *filter, char *cond_string, char *extra_string, enum bptype type, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags, int display_canonical)
#define ALL_BREAKPOINTS_SAFE(B, TMP)
#define target_stopped_by_watchpoint()
struct symtabs_and_lines sals
int get_number(char **pp)
struct breakpoint_ops tracepoint_breakpoint_ops
void breakpoint_program_space_exit(struct program_space *pspace)
static struct breakpoint * momentary_breakpoint_from_master(struct breakpoint *orig, enum bptype type, const struct breakpoint_ops *ops, int loc_enabled)
int stepping_past_instruction_at(struct address_space *aspace, CORE_ADDR address)
static struct breakpoint_ops longjmp_breakpoint_ops
static void trace_pass_command(char *, int)
void ui_out_field_fmt(struct ui_out *uiout, const char *fldname, const char *format,...)
void enable_breakpoint(struct breakpoint *bpt)
static void stop_command(char *arg, int from_tty)
struct value * allocate_value(struct type *type)
static int insert_catch_exec(struct bp_location *bl)
void delete_longjmp_breakpoint(int thread)
static void ignore_command(char *, int)
struct bound_minimal_symbol lookup_minimal_symbol_text(const char *name, struct objfile *objf)
static int remove_breakpoint_1(struct bp_location *, insertion_state_t)
void get_last_displayed_sal(struct symtab_and_line *sal)
static CORE_ADDR bp_location_shadow_len_after_address_max
#define target_stopped_data_address(target, addr_p)
static int works_in_software_mode_masked_watchpoint(const struct breakpoint *b)
void ui_out_text(struct ui_out *uiout, const char *string)
const struct block * block_for_pc(CORE_ADDR pc)
int is_addr_in_objfile(CORE_ADDR addr, const struct objfile *objfile)
void _initialize_breakpoint(void)
int may_insert_tracepoints
void printf_filtered(const char *format,...)
int longest_to_int(LONGEST)
void dummy_frame_discard(struct frame_id dummy_id, ptid_t ptid)
int breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
static struct type * new_type(char *)
void breakpoint_set_task(struct breakpoint *b, int task)
static struct breakpoint_ops bkpt_base_breakpoint_ops
#define SYMBOL_OBJ_SECTION(objfile, symbol)
static void catch_load_command_1(char *arg, int from_tty, struct cmd_list_element *command)
static struct symtabs_and_lines addr_string_to_sals(struct breakpoint *b, char *addr_string, int *found)
struct obj_section * find_pc_overlay(CORE_ADDR pc)
struct program_space * pspace
void set_current_program_space(struct program_space *pspace)
const char * symtab_to_fullname(struct symtab *s)
static struct agent_expr * parse_cmd_to_aexpr(CORE_ADDR scope, char *cmd)
int bpstat_should_step(void)
static void create_breakpoints_sal(struct gdbarch *gdbarch, struct linespec_result *canonical, char *cond_string, char *extra_string, enum bptype type, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
#define target_insert_vfork_catchpoint(pid)
void breakpoint_free_objfile(struct objfile *objfile)
static void base_breakpoint_print_one_detail(const struct breakpoint *self, struct ui_out *uiout)
struct trace_status * current_trace_status(void)
static int breakpoint_address_match_range(struct address_space *aspace1, CORE_ADDR addr1, int len1, struct address_space *aspace2, CORE_ADDR addr2)
struct counted_command_line * cmd
static CORE_ADDR adjust_breakpoint_address(struct gdbarch *gdbarch, CORE_ADDR bpaddr, enum bptype bptype)
#define MSYMBOL_OBJ_SECTION(objfile, symbol)
struct obstack objfile_obstack
static enum print_stop_action bkpt_print_it(bpstat bs)
static int breakpoint_location_address_match(struct bp_location *bl, struct address_space *aspace, CORE_ADDR addr)
mach_port_t kern_return_t mach_port_t msgports 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
struct cleanup * make_cleanup_delete_breakpoint(struct breakpoint *b)
void null_cleanup(void *arg)
struct value * evaluate_expression(struct expression *exp)
int valid_thread_id(int thread)
int in_thread_list(ptid_t ptid)
static void dtor_catch_exec(struct breakpoint *b)
static int breakpoint_address_bits(struct breakpoint *b)
struct thread_info * iterate_over_threads(thread_callback_func, void *)
void until_break_command(char *arg, int from_tty, int anywhere)
int frame_id_eq(struct frame_id l, struct frame_id r)
static int bpstat_do_actions_1(bpstat *bsp)
int(* insert_location)(struct bp_location *)
int gdbarch_fast_tracepoint_valid_at(struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
static int remove_watchpoint(struct bp_location *bl)
static void add_to_breakpoint_chain(struct breakpoint *b)
void(* clear_semaphore)(struct probe *probe, struct objfile *objfile, struct gdbarch *gdbarch)
static struct breakpoint * set_raw_breakpoint_without_location(struct gdbarch *, enum bptype, const struct breakpoint_ops *)
struct cmd_list_element * setlist
enum stop_stack_kind call_dummy
void 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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
#define ALL_OBJFILES(obj)
static CORE_ADDR find_breakpoint_range_end(struct symtab_and_line sal)
static int remove_catch_fork(struct bp_location *bl)
static void re_set_watchpoint(struct breakpoint *b)
static int compare_breakpoints(const void *a, const void *b)
int check_for_argument(char **str, char *arg, int arg_len)
static enum print_stop_action internal_bkpt_print_it(bpstat bs)
int shared_objfile_contains_address_p(struct program_space *pspace, CORE_ADDR address)
static char * wrap_indent_at_field(struct ui_out *uiout, const char *col_name)
struct expression * cond_exp
#define VEC_iterate(T, V, I, P)
struct cleanup * save_inferior_ptid(void)
void tbreak_command(char *arg, int from_tty)
struct tracepoint * get_tracepoint_by_number_on_target(int num)
void breakpoint_set_commands(struct breakpoint *b, struct command_line *commands)
struct frame_id get_frame_id(struct frame_info *fi)
static void do_cleanup_counted_command_line(void *arg)
static int do_captured_breakpoint_query(struct ui_out *uiout, void *data)
static void default_collect_info(void)
struct bp_location * next
static void set_breakpoint_count(int num)
struct bp_target_info overlay_target_info
void breakpoint_re_set(void)
struct type * check_typedef(struct type *type)
struct gdbarch * get_sal_arch(struct symtab_and_line sal)
static void update_inserted_breakpoint_locations(void)
struct frame_info * block_innermost_frame(const struct block *block)
#define CATCH(EXCEPTION, MASK)
static enum print_stop_action print_it_masked_watchpoint(bpstat bs)
int contained_in(const struct block *a, const struct block *b)
static void print_mention_catch_vfork(struct breakpoint *b)
int solib_contains_address_p(const struct so_list *const solib, CORE_ADDR address)
int hardware_watchpoint_inserted_in_range(struct address_space *aspace, CORE_ADDR addr, ULONGEST len)
static struct cmd_list_element * tcatch_cmdlist
static int unduplicated_should_be_inserted(struct bp_location *bl)
static void tracepoint_re_set(struct breakpoint *b)
#define ALL_BP_LOCATIONS_AT_ADDR(BP_LOCP_TMP, BP_LOCP_START, ADDRESS)
static int breakpoint_hit_catch_vfork(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
void ui_out_field_skip(struct ui_out *uiout, const char *fldname)
static void create_overlay_event_breakpoint(void)
struct tracepoint * create_tracepoint_from_upload(struct uploaded_tp *utp)
static void incref_counted_command_line(struct counted_command_line *cmd)
static void validate_commands_for_breakpoint(struct breakpoint *b, struct command_line *commands)
struct target_ops current_target
int detach_breakpoints(ptid_t ptid)
static void breakpoint_sals_to_pc(struct symtabs_and_lines *sals)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
#define target_watchpoint_addr_within_range(target, addr, start, length)
struct cleanup * make_cleanup_ui_out_list_begin_end(struct ui_out *uiout, const char *id)
static void save_tracepoints_command(char *args, int from_tty)
int value_lazy(struct value *value)
struct bp_location * bp_location_at
struct cleanup * make_cleanup_ui_out_tuple_begin_end(struct ui_out *uiout, const char *id)
static void tracepoint_print_recreate(struct breakpoint *self, struct ui_file *fp)
void remove_thread_event_breakpoints(void)
static void awatch_command(char *arg, int from_tty)
struct program_space * pspace
void init_catchpoint(struct breakpoint *b, struct gdbarch *gdbarch, int tempflag, char *cond_string, const struct breakpoint_ops *ops)
static const char dprintf_style_call[]
struct program_space * pspace
static void check_status_catch_solib(struct bpstats *bs)
static void bkpt_create_sals_from_address(char **arg, struct linespec_result *canonical, enum bptype type_wanted, char *addr_start, char **copy_arg)
static void print_one_ranged_breakpoint(struct breakpoint *b, struct bp_location **last_loc)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
int value_bitsize(const struct value *value)
struct breakpoint * iterate_over_breakpoints(int(*callback)(struct breakpoint *, void *), void *data)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
#define SYMTAB_OBJFILE(symtab)
static void bpstat_check_watchpoint(bpstat bs)
static void longjmp_bkpt_dtor(struct breakpoint *self)
const char * skip_spaces_const(const char *chp)
int static_trace_marker_id_idx
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
static void print_mention_catch_exec(struct breakpoint *b)
struct mem_region * lookup_mem_region(CORE_ADDR addr)
struct thread_info * any_live_thread_of_process(int pid)
int stepping_past_nonsteppable_watchpoint(void)
static int explains_signal_watchpoint(struct breakpoint *b, enum gdb_signal sig)
static void decref_counted_command_line(struct counted_command_line **cmdp)
CORE_ADDR gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
static void momentary_bkpt_print_mention(struct breakpoint *b)
int is_watchpoint(const struct breakpoint *bpt)
void target_terminal_inferior(void)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
static void watchpoint_value_print(struct value *val, struct ui_file *stream)
struct cmd_list_element * showlist
void exception_print(struct ui_file *file, struct gdb_exception e)
void ui_out_message(struct ui_out *uiout, int verbosity, const char *format,...)
struct cmd_list_element * add_com_alias(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
struct expression * parse_exp_1(const char **, CORE_ADDR pc, const struct block *, int)
struct breakpoint * clone_momentary_breakpoint(struct breakpoint *orig)
struct observer * observer_attach_solib_unloaded(observer_solib_unloaded_ftype *f)
int streq(const char *lhs, const char *rhs)
static void set_breakpoint_location_function(struct bp_location *loc, int explicit_loc)
static void print_one_catch_solib(struct breakpoint *b, struct bp_location **locs)
const struct block * exp_valid_block
void insert_single_step_breakpoint(struct gdbarch *gdbarch, struct address_space *aspace, CORE_ADDR next_pc)
static void tracepoint_create_breakpoints_sal(struct gdbarch *gdbarch, struct linespec_result *canonical, char *cond_string, char *extra_string, enum bptype type_wanted, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
struct symtabs_and_lines decode_line_1(char **argptr, int flags, struct symtab *default_symtab, int default_line)
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
gdb_byte shadow_contents[BREAKPOINT_MAX]
static void build_target_condition_list(struct bp_location *bl)
struct symbol * get_frame_function(struct frame_info *frame)
static enum print_stop_action base_breakpoint_print_it(bpstat bs)
static void watchpoint_del_at_next_stop(struct watchpoint *w)
static void mark_breakpoint_location_modified(struct bp_location *loc)
int gdbarch_stack_frame_destroyed_p(struct gdbarch *gdbarch, CORE_ADDR addr)
static void stopat_command(char *arg, int from_tty)
static struct cleanup * make_cleanup_decref_counted_command_line(struct counted_command_line **cmdp)
static int msym_not_found_p(const struct minimal_symbol *msym)
int frame_id_artificial_p(struct frame_id l)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
static const char dprintf_style_agent[]
static int tracepoint_locations_match(struct bp_location *loc1, struct bp_location *loc2)
static void tracepoint_probe_decode_linespec(struct breakpoint *b, char **s, struct symtabs_and_lines *sals)
union target_waitstatus::@161 value
static void invalidate_bp_value_on_memory_change(struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data)
enum bp_print_how print_it
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
void cmd_sfunc_ftype(char *args, int from_tty, struct cmd_list_element *c)
static void tracepoints_info(char *, int)
char * solib_name_from_address(struct program_space *pspace, CORE_ADDR address)
static enum print_stop_action print_it_catch_fork(bpstat bs)
int gdbarch_has_global_breakpoints(struct gdbarch *gdbarch)
struct breakpoint * breakpoint2
void disable_breakpoint(struct breakpoint *bpt)
static void do_enable_breakpoint(struct breakpoint *bpt, void *arg)
static void print_recreate_ranged_breakpoint(struct breakpoint *b, struct ui_file *fp)
static void tracepoint_print_one_detail(const struct breakpoint *self, struct ui_out *uiout)
struct inferior * find_inferior_pid(int pid)
static int gdb_evaluates_breakpoint_condition_p(void)
void init_linespec_result(struct linespec_result *lr)
static void free_breakpoint_probes(struct objfile *obj, void *data)
#define target_supports_evaluation_of_breakpoint_conditions()
int target_remove_mask_watchpoint(CORE_ADDR addr, CORE_ADDR mask, int rw)
void iterate_over_bp_locations(walk_bp_location_callback callback)
char so_name[SO_NAME_MAX_PATH_SIZE]
struct thread_control_state control
struct breakpoint * breakpoint_find_if(int(*func)(struct breakpoint *b, void *d), void *user_data)
static int insert_masked_watchpoint(struct bp_location *bl)
void add_solib_catchpoint(char *arg, int is_load, int is_temp, int enabled)
void decode_line_full(char **argptr, int flags, struct symtab *default_symtab, int default_line, struct linespec_result *canonical, const char *select_mode, const char *filter)
char * extract_arg(char **arg)
#define VEC_index(T, V, I)
static void do_map_enable_once_breakpoint(struct breakpoint *bpt, void *ignore)
#define target_disable_tracepoint(loc)
void(* decode_linespec)(struct breakpoint *, char **, struct symtabs_and_lines *)
void start_rbreak_breakpoints(void)
static void dtor_catch_solib(struct breakpoint *b)
static const char condition_evaluation_both[]
static void print_one_detail_ranged_breakpoint(const struct breakpoint *b, struct ui_out *uiout)
#define ALL_BREAKPOINTS(B)
static struct symtab_and_line update_static_tracepoint(struct breakpoint *b, struct symtab_and_line sal)
static struct symtabs_and_lines decode_static_tracepoint_spec(char **arg_p)
struct gdbarch * get_type_arch(const struct type *type)
void add_setshow_string_cmd(const char *name, enum command_class theclass, char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
#define ALL_TRACEPOINTS(B)
struct cleanup * make_cleanup_destroy_linespec_result(struct linespec_result *ls)
struct cmd_list_element * add_info(const char *name, cmd_cfunc_ftype *fun, const char *doc)
struct gdbarch * get_current_arch(void)
void error_stream(struct ui_file *stream)
struct agent_expr * gen_printf(CORE_ADDR scope, struct gdbarch *gdbarch, CORE_ADDR function, LONGEST channel, const char *format, int fmtlen, struct format_piece *frags, int nargs, struct expression **exprs)
struct breakpoint * get_breakpoint(int num)
struct cleanup * prevent_dont_repeat(void)
void exception_fprintf(struct ui_file *file, struct gdb_exception e, const char *prefix,...)
const struct bp_location_ops * ops
#define target_static_tracepoint_markers_by_strid(marker_id)
#define target_download_tracepoint(t)
static int startswith(const char *string, const char *pattern)
const char * linespec_lexer_lex_keyword(const char *p)
static void do_map_enable_breakpoint(struct breakpoint *b, void *ignore)
static struct breakpoint_ops watchpoint_breakpoint_ops
#define WP_VALUE_NOT_CHANGED
static int bp_loc_is_permanent(struct bp_location *loc)
int nquery(const char *ctlstr,...)
struct cmd_list_element * stoplist
int bpstat_num(bpstat *bsp, int *num)
struct cmd_list_element * add_alias_cmd(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
static struct breakpoint_ops catch_solib_breakpoint_ops
void disable_breakpoints_in_shlibs(void)
static struct breakpoint_ops momentary_breakpoint_ops
static void base_breakpoint_dtor(struct breakpoint *self)
struct value * value_next(struct value *value)
static struct cleanup * prepare_re_set_context(struct breakpoint *b)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
int ada_get_task_number(ptid_t)
#define target_has_execution
struct agent_expr * gen_eval_for_expr(CORE_ADDR scope, struct expression *expr)
static void parse_breakpoint_sals(char **address, struct linespec_result *canonical)
int(* explains_signal)(struct breakpoint *, enum gdb_signal)
enum watchpoint_triggered watchpoint_triggered
char * xstrprintf(const char *format,...)
static enum print_stop_action print_it_catch_exec(bpstat bs)
int deprecated_value_modifiable(struct value *value)
void printf_unfiltered(const char *format,...)
int section_is_mapped(struct obj_section *osect)
void print_command_lines(struct ui_out *uiout, struct command_line *cmd, unsigned int depth)
static const char dprintf_style_gdb[]
int get_last_displayed_line(void)
struct frame_id frame_unwind_caller_id(struct frame_info *next_frame)
int find_pc_partial_function_gnu_ifunc(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr, int *is_gnu_ifunc_p)
static void print_solib_event(int is_catchpoint)
static struct breakpoint * create_internal_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address, enum bptype type, const struct breakpoint_ops *ops)
struct breakpoint * breakpoint_chain
static int bp_location_compare_addrs(const void *ap, const void *bp)
int software_breakpoint_inserted_here_p(struct address_space *aspace, CORE_ADDR pc)
static int bp_location_compare(const void *ap, const void *bp)
static void condition_command(char *, int)
static enum print_stop_action print_it_catch_vfork(bpstat bs)
struct breakpoint_ops bkpt_breakpoint_ops
struct program_space * pspace
static void internal_bkpt_check_status(bpstat bs)
static int bkpt_probe_insert_location(struct bp_location *bl)
CORE_ADDR requested_address
void skip_prologue_sal(struct symtab_and_line *sal)
static int is_hardware_watchpoint(const struct breakpoint *bpt)
static void ftrace_command(char *arg, int from_tty)
struct ui_file * gdb_stdlog
static int breakpoint_hit_catch_solib(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
CORE_ADDR gdbarch_adjust_breakpoint_address(struct gdbarch *gdbarch, CORE_ADDR bpaddr)
static int base_breakpoint_works_in_software_mode(const struct breakpoint *b)
struct ui_file * mem_fileopen(void)
struct command_line * copy_command_lines(struct command_line *cmds)
int breakpoint_ext_lang_cond_says_stop(struct breakpoint *b)
static int bpstat_check_location(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
static void swap_insertion(struct bp_location *left, struct bp_location *right)
static void check_no_tracepoint_commands(struct command_line *commands)
unsigned char display_canonical
static void enable_once_command(char *, int)
void(* check_status)(struct bpstats *bs)
static void disable_trace_command(char *, int)
struct breakpoint * set_momentary_breakpoint(struct gdbarch *gdbarch, struct symtab_and_line sal, struct frame_id frame_id, enum bptype type)
int ui_out_query_field(struct ui_out *uiout, int colno, int *width, int *alignment, char **col_name)
static void watch_command_1(const char *arg, int accessflag, int from_tty, int just_location, int internal)
static void strace_marker_create_breakpoints_sal(struct gdbarch *gdbarch, struct linespec_result *canonical, char *cond_string, char *extra_string, enum bptype type_wanted, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
struct cmd_list_element * add_abbrev_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
static int can_use_hw_watchpoints
void observer_notify_breakpoint_deleted(struct breakpoint *b)
static int remove_catch_vfork(struct bp_location *bl)
static int watchpoint_exp_is_const(const struct expression *exp)
static void print_one_breakpoint(struct breakpoint *b, struct bp_location **last_loc, int allflag)
static void bkpt_print_recreate(struct breakpoint *tp, struct ui_file *fp)
struct symtab * get_last_displayed_symtab(void)
static const char * translate_condition_evaluation_mode(const char *mode)
void breakpoint_xfer_memory(gdb_byte *readbuf, gdb_byte *writebuf, const gdb_byte *writebuf_org, ULONGEST memaddr, LONGEST len)
void annotate_breakpoints_headers(void)
static int resources_needed_masked_watchpoint(const struct bp_location *bl)
void disable_watchpoints_before_interactive_call_start(void)
int find_line_pc(struct symtab *symtab, int line, CORE_ADDR *pc)
static void mark_breakpoint_modified(struct breakpoint *b)
int ptid_get_pid(ptid_t ptid)
struct value * parse_to_comma_and_eval(const char **expp)
struct cmd_list_element * disablelist
static void create_longjmp_master_breakpoint(void)
void print_recreate_thread(struct breakpoint *b, struct ui_file *fp)
static void show_pending_break_support(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void create_std_terminate_master_breakpoint(void)
struct breakpoint * breakpoint_at
static int breakpoint_has_pc(struct breakpoint *b, struct program_space *pspace, CORE_ADDR pc, struct obj_section *section)
static int remove_catch_solib(struct bp_location *ignore)
bpstat bpstat_copy(bpstat bs)
static int insert_watchpoint(struct bp_location *bl)
static void base_breakpoint_check_status(bpstat bs)
struct tracepoint * get_tracepoint_by_number(char **arg, struct get_number_or_range_state *state)
void(* create_sals_from_address)(char **, struct linespec_result *, enum bptype, char *, char **)
static int breakpoint_hit_catch_fork(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
CORE_ADDR get_probe_address(struct probe *probe, struct objfile *objfile)
static int insert_catch_solib(struct bp_location *ignore)
static void catch_command(char *, int)
static void breakpoint_adjustment_warning(CORE_ADDR, CORE_ADDR, int, int)
void throw_exception(struct gdb_exception exception)
struct symbol * fixup_symbol_section(struct symbol *sym, struct objfile *objfile)
int catch_exceptions_with_msg(struct ui_out *func_uiout, catch_exceptions_ftype *func, void *func_args, char **gdberrmsg, return_mask mask)
struct command_line * next
static unsigned bp_location_count
const char const char int
void fetch_subexp_value(struct expression *exp, int *pc, struct value **valp, struct value **resultp, struct value **val_chain, int preserve_errors)
enum command_control_type control_type
int find_line_pc_range(struct symtab_and_line sal, CORE_ADDR *startptr, CORE_ADDR *endptr)
static int bpstat_remove_breakpoint_callback(struct thread_info *th, void *data)
static int locations_are_equal(struct bp_location *a, struct bp_location *b)
static void enable_command(char *, int)
int print_address_symbolic(struct gdbarch *, CORE_ADDR, struct ui_file *, int, char *)
static void set_tracepoint_count(int num)
#define MSYMBOL_TYPE(msymbol)
const struct extension_language_defn * get_breakpoint_cond_ext_lang(struct breakpoint *b, enum extension_language skip_lang)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
char * hex_string_custom(LONGEST num, int width)
static void strace_marker_decode_linespec(struct breakpoint *b, char **s, struct symtabs_and_lines *sals)
void discard_cleanups(struct cleanup *old_chain)
int target_insert_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
const struct language_defn * current_language
int create_breakpoint(struct gdbarch *gdbarch, char *arg, char *cond_string, int thread, char *extra_string, int parse_arg, 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)
int last_displayed_sal_is_valid(void)
#define TYPE_TARGET_TYPE(thistype)
char * static_trace_marker_id
enum bp_loc_type loc_type
CORE_ADDR overlay_unmapped_address(CORE_ADDR pc, struct obj_section *section)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
static void incref_bp_location(struct bp_location *loc)
static void update_dprintf_command_list(struct breakpoint *b)
static void tcatch_command(char *arg, int from_tty)
void break_command(char *arg, int from_tty)
bpstat bpstat_find_breakpoint(bpstat bsp, struct breakpoint *breakpoint)
static void print_recreate_catch_vfork(struct breakpoint *b, struct ui_file *fp)
#define ALL_PSPACES(pspace)
const char * ext_lang_capitalized_name(const struct extension_language_defn *extlang)
void install_breakpoint(int internal, struct breakpoint *b, int update_gll)
void operator_length(const struct expression *expr, int endpos, int *oplenp, int *argsp)
static int insert_catch_vfork(struct bp_location *bl)
static void commands_command_1(char *arg, int from_tty, struct command_line *control)
#define target_can_download_tracepoint()
static int base_breakpoint_resources_needed(const struct bp_location *bl)
static void update_global_location_list(enum ugll_insert_mode)
struct cleanup * make_bpstat_clear_actions_cleanup(void)
void proceed(CORE_ADDR addr, enum gdb_signal siggnal)
struct cleanup * make_cleanup_ui_file_delete(struct ui_file *arg)
void remove_solib_event_breakpoints_at_next_stop(void)
const char * async_reason_lookup(enum async_reply_reason reason)
struct address_space * aspace
static CORE_ADDR bp_location_placed_address_before_address_max
ULONGEST traceframe_usage
static int watchpoint_check(void *)
static void say_where(struct breakpoint *b)
int xsnprintf(char *str, size_t size, const char *format,...)
#define SYMBOL_BLOCK_VALUE(symbol)
struct breakpoint * set_longjmp_breakpoint_for_call_dummy(void)
#define TYPE_CODE(thistype)
void clear_proceed_status(int step)
static int bkpt_breakpoint_hit(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
enum target_waitkind kind
#define target_insert_exec_catchpoint(pid)
static void describe_other_breakpoints(struct gdbarch *, struct program_space *, CORE_ADDR, struct obj_section *, int)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
static void do_delete_breakpoint_cleanup(void *b)
static void show_condition_evaluation_mode(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
const gdb_byte * gdbarch_breakpoint_from_pc(struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
static int base_breakpoint_remove_location(struct bp_location *bl)
CORE_ADDR related_address
struct ui_file * gdb_stderr
void breakpoint_init_inferior(enum inf_context context)
#define target_region_ok_for_hw_watchpoint(addr, len)
static int breakpoint_re_set_one(void *)
struct minimal_symbol * minsym
static void watch_command(char *arg, int from_tty)
char * safe_strerror(int)
void set_internalvar_integer(struct internalvar *var, LONGEST l)
static void trace_pass_set_count(struct tracepoint *tp, int count, int from_tty)
void watch_command_wrapper(char *arg, int from_tty, int internal)
void update_breakpoint_locations(struct breakpoint *b, struct symtabs_and_lines sals, struct symtabs_and_lines sals_end)
static void disable_breakpoints_in_freed_objfile(struct objfile *objfile)
void delete_command(char *arg, int from_tty)
int remove_breakpoints(void)
static void tracepoint_create_sals_from_address(char **arg, struct linespec_result *canonical, enum bptype type_wanted, char *addr_start, char **copy_arg)
struct program_space * pspace
#define gnu_ifunc_resolve_name
static void ATTRIBUTE_NORETURN invalid_thread_id_error(int id)
void get_user_print_options(struct value_print_options *opts)
void clear_breakpoint_hit_counts(void)
static int hw_watchpoint_use_count(struct breakpoint *)
static void catch_load_or_unload(char *arg, int from_tty, int is_load, struct cmd_list_element *command)
int(* remove_location)(struct bp_location *)
static void do_map_enable_delete_breakpoint(struct breakpoint *bpt, void *ignore)
static int can_use_hardware_watchpoint(struct value *)
static struct breakpoint * create_solib_event_breakpoint_1(struct gdbarch *gdbarch, CORE_ADDR address, enum ugll_insert_mode insert_mode)
static int resources_needed_watchpoint(const struct bp_location *bl)
static const char * bptype_string(enum bptype type)
int bpstat_explains_signal(bpstat bsp, enum gdb_signal sig)
#define target_insert_hw_breakpoint(gdbarch, bp_tgt)
int user_breakpoint_p(struct breakpoint *b)
static void disable_breakpoints_in_unloaded_shlib(struct so_list *solib)
struct frame_id initiating_frame
void set_std_terminate_breakpoint(void)
void ui_out_table_header(struct ui_out *uiout, int width, enum ui_align alignment, const char *col_name, const char *colhdr)
static void decode_linespec_default(struct breakpoint *, char **, struct symtabs_and_lines *)
static struct breakpoint_objfile_data * get_breakpoint_objfile_data(struct objfile *objfile)
static void watchpoints_info(char *, int)
static void base_breakpoint_decode_linespec(struct breakpoint *b, char **s, struct symtabs_and_lines *sals)
int gdbarch_adjust_breakpoint_address_p(struct gdbarch *gdbarch)
#define VEC_address(T, V)
static void internal_bkpt_print_mention(struct breakpoint *b)
static const char condition_evaluation_auto[]
void(* print_one_detail)(const struct breakpoint *, struct ui_out *)
struct breakpoint_ops base_breakpoint_ops
static void print_recreate_catch_exec(struct breakpoint *b, struct ui_file *fp)
struct breakpoint * single_step_breakpoints
static void base_breakpoint_after_condition_true(struct bpstats *bs)
static void force_breakpoint_reinsertion(struct bp_location *bl)
#define target_can_accel_watchpoint_condition(addr, len, type, cond)
void disable_overlay_breakpoints(void)
static enum print_stop_action print_it_watchpoint(bpstat bs)
static void print_one_detail_masked_watchpoint(const struct breakpoint *b, struct ui_out *uiout)
void breakpoint_set_silent(struct breakpoint *b, int silent)
static int insert_catch_fork(struct bp_location *bl)
struct command_line * commands
static int rbreak_start_breakpoint_count
static void strace_marker_create_sals_from_address(char **arg, struct linespec_result *canonical, enum bptype type_wanted, char *addr_start, char **copy_arg)
struct breakpoint * related_breakpoint
struct cmd_list_element * save_cmdlist
struct agent_expr * cmd_bytecode
int target_ranged_break_num_registers(void)
enum gdb_rc gdb_breakpoint_query(struct ui_out *uiout, int bnum, char **error_message)
char * ep_parse_optional_if_clause(char **arg)
static void breakpoint_about_to_proceed(void)
struct inferior * current_inferior(void)
struct cmd_list_element * add_info_alias(const char *name, const char *oldname, int abbrev_flag)
const char * print_core_address(struct gdbarch *gdbarch, CORE_ADDR address)
int is_exited(ptid_t ptid)
int memory_validate_breakpoint(struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
int breakpoints_should_be_inserted_now(void)
void(* after_condition_true)(struct bpstats *bs)
enum overlay_debugging_state overlay_debugging
const struct probe_ops * pops
static void catch_fork_command_1(char *arg, int from_tty, struct cmd_list_element *command)
static void bkpt_re_set(struct breakpoint *b)
struct program_space * current_program_space
static const char * bp_condition_evaluator(struct breakpoint *b)
struct symtabs_and_lines decode_line_with_current_source(char *string, int flags)
int ui_out_redirect(struct ui_out *uiout, struct ui_file *outstream)
void ui_out_field_core_addr(struct ui_out *uiout, const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
void breakpoint_set_thread(struct breakpoint *b, int thread)
static struct value * extract_bitfield_from_watchpoint_value(struct watchpoint *w, struct value *val)
static void tracepoint_probe_create_sals_from_address(char **arg, struct linespec_result *canonical, enum bptype type_wanted, char *addr_start, char **copy_arg)
struct value * parse_and_eval(const char *exp)
static int executing_breakpoint_commands
static void do_map_commands_command(struct breakpoint *b, void *data)
unsigned long long ULONGEST
void end_rbreak_breakpoints(void)
#define target_can_use_hardware_watchpoint(TYPE, CNT, OTHERTYPE)
static void commands_command(char *, int)
static enum print_stop_action print_it_catch_solib(bpstat bs)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static int tracepoint_breakpoint_hit(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
struct cleanup * save_current_program_space(void)
static const char * condition_evaluation_mode_1
void release_value(struct value *val)
void initialize_breakpoint_ops(void)
char * savestring(const char *ptr, size_t len)
static void maintenance_info_breakpoints(char *, int)
#define target_remove_vfork_catchpoint(pid)
int pid_to_thread_id(ptid_t ptid)
static void bkpt_print_mention(struct breakpoint *b)
static struct breakpoint_ops strace_marker_breakpoint_ops
void annotate_breakpoints_table_end(void)
#define target_remove_exec_catchpoint(pid)
void(* dtor)(struct breakpoint *self)
struct cleanup * save_current_space_and_thread(void)
void update_breakpoints_after_exec(void)
static void breakpoints_info(char *, int)
struct type * value_type(const struct value *value)
int watchpoints_triggered(struct target_waitstatus *ws)
static enum print_stop_action print_it_ranged_breakpoint(bpstat bs)
void annotate_breakpoint(int num)
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 void delete_trace_command(char *, int)
int target_insert_mask_watchpoint(CORE_ADDR addr, CORE_ADDR mask, int rw)
static void enable_breakpoint_disp(struct breakpoint *, enum bpdisp, int count)
unsigned int debug_infrun
static void init_breakpoint_sal(struct breakpoint *b, struct gdbarch *gdbarch, struct symtabs_and_lines sals, char *addr_string, char *filter, char *cond_string, char *extra_string, enum bptype type, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags, int display_canonical)
void bpstat_do_actions(void)
const char * core_addr_to_string(const CORE_ADDR addr)
struct bp_target_info target_info
static const char condition_evaluation_host[]
CORE_ADDR value_as_address(struct value *val)
#define NUM_LONGJMP_NAMES
static struct bp_location ** get_first_locp_gte_addr(CORE_ADDR address)
void ui_out_field_string(struct ui_out *uiout, const char *fldname, const char *string)
void target_terminal_ours_for_output(void)
static bpstat bpstat_alloc(struct bp_location *bl, bpstat **bs_link_pointer)
static int bkpt_remove_location(struct bp_location *bl)
int pc_at_non_inline_function(struct address_space *aspace, CORE_ADDR pc, const struct target_waitstatus *ws)
struct symtab_and_line * sals
#define gnu_ifunc_resolver_return_stop
static struct minimal_symbol msym_not_found
char * addr_string_range_end
static void mention(struct breakpoint *)
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)
void annotate_catchpoint(int num)
void delete_std_terminate_breakpoint(void)
void breakpoint_retire_moribund(void)
#define TYPE_LENGTH(thistype)
static int is_tracepoint_type(enum bptype type)
ptid_t forked_inferior_pid
static void break_range_command(char *arg, int from_tty)
void ui_out_table_body(struct ui_out *uiout)
void switch_to_program_space_and_thread(struct program_space *pspace)
static struct breakpoint * new_single_step_breakpoint(int thread, struct gdbarch *gdbarch)
#define target_remove_hw_breakpoint(gdbarch, bp_tgt)
static int base_breakpoint_breakpoint_hit(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
static void dprintf_after_condition_true(struct bpstats *bs)
int remove_breakpoints_pid(int pid)
void remove_jit_event_breakpoints(void)
static struct breakpoint_ops masked_watchpoint_breakpoint_ops
static void tracepoint_print_mention(struct breakpoint *b)
static void save_command(char *arg, int from_tty)
struct ui_out * current_uiout
struct address_space * placed_address_space
int value_true(struct value *val)
void resolve_sal_pc(struct symtab_and_line *sal)
static int hw_watchpoint_used_count_others(struct breakpoint *except, enum bptype type, int *other_type_used)
int is_running(ptid_t ptid)
static void bkpt_create_breakpoints_sal(struct gdbarch *gdbarch, struct linespec_result *canonical, char *cond_string, char *extra_string, enum bptype type_wanted, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
static struct breakpoint_ops catch_fork_breakpoint_ops
static char * wrap_indent
enum enable_state enable_state
static int is_non_inline_function(struct breakpoint *b)
static void do_map_enable_count_breakpoint(struct breakpoint *bpt, void *countptr)
completer_ftype * completer
static void do_map_delete_breakpoint(struct breakpoint *b, void *ignore)
bpstat bpstat_stop_status(struct address_space *aspace, CORE_ADDR bp_addr, ptid_t ptid, const struct target_waitstatus *ws)
char * type_to_string(struct type *type)
static int breakpoint_cond_eval(void *)
int get_number_or_range(struct get_number_or_range_state *state)
struct observer * observer_attach_memory_changed(observer_memory_changed_ftype *f)
CORE_ADDR value_address(const struct value *value)
int is_catchpoint(struct breakpoint *ep)
struct bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES]
static void bkpt_probe_decode_linespec(struct breakpoint *b, char **s, struct symtabs_and_lines *sals)
void enable_watchpoints_after_interactive_call_stop(void)
static void momentary_bkpt_re_set(struct breakpoint *b)
static void hbreak_command(char *, int)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
PTR xcalloc(size_t number, size_t size)
static void catch_unload_command_1(char *arg, int from_tty, struct cmd_list_element *command)
static int resources_needed_ranged_breakpoint(const struct bp_location *bl)
struct command_line ** body_list
struct command_line * control
#define ALL_BP_LOCATIONS(B, BP_TMP)
struct breakpoint * owner
void delete_longjmp_breakpoint_at_next_stop(int thread)
int is_scalar_type_recursive(struct type *t)
void delete_breakpoint(struct breakpoint *bpt)
struct program_space * get_frame_program_space(struct frame_info *frame)
static int base_breakpoint_insert_location(struct bp_location *bl)
static struct bp_location ** bp_location
void(* print_one)(struct breakpoint *, struct bp_location **)
static const char condition_evaluation_target[]
void breakpoint_re_set_thread(struct breakpoint *b)
static void save_breakpoints_command(char *args, int from_tty)
static void print_mention_masked_watchpoint(struct breakpoint *b)
static void until_break_command_continuation(void *arg, int err)
static int should_be_inserted(struct bp_location *bl)
static void cleanup_executing_breakpoints(void *)
int is_tracepoint(const struct breakpoint *b)
void(* create_breakpoints_sal)(struct gdbarch *, struct linespec_result *, char *, char *, enum bptype, enum bpdisp, int, int, int, const struct breakpoint_ops *, int, int, int, unsigned)
static void base_breakpoint_create_breakpoints_sal(struct gdbarch *gdbarch, struct linespec_result *c, char *cond_string, char *extra_string, enum bptype type_wanted, enum bpdisp disposition, int thread, int task, int ignore_count, const struct breakpoint_ops *o, int from_tty, int enabled, int internal, unsigned flags)
#define target_supports_stopped_by_hw_breakpoint()
const char multiple_symbols_all[]
static int strace_marker_p(struct breakpoint *b)
struct frame_id watchpoint_frame
void error(const char *fmt,...)
void jit_event_handler(struct gdbarch *gdbarch)
static void agent_printf_command(char *arg, int from_tty)
static void dprintf_print_recreate(struct breakpoint *tp, struct ui_file *fp)
static struct breakpoint_ops internal_breakpoint_ops
static int remove_breakpoint(struct bp_location *, insertion_state_t)
void(* re_set)(struct breakpoint *self)
char * exp_string_reparse
#define target_static_tracepoint_marker_at(addr, marker)
struct breakpoint * create_and_insert_solib_event_breakpoint(struct gdbarch *gdbarch, CORE_ADDR address)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc)
int breakpoint_address_match(struct address_space *aspace1, CORE_ADDR addr1, struct address_space *aspace2, CORE_ADDR addr2)
static void save_breakpoints(char *filename, int from_tty, int(*filter)(const struct breakpoint *))
void set_breakpoint_condition(struct breakpoint *b, const char *exp, int from_tty)
int breakpoint_has_location_inserted_here(struct breakpoint *bp, struct address_space *aspace, CORE_ADDR pc)
#define skip_to_space(INP)
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t int int rusage_t pid_t pid
static void bp_location_dtor(struct bp_location *self)
static void create_breakpoints_sal_default(struct gdbarch *, struct linespec_result *, char *, char *, enum bptype, enum bpdisp, int, int, int, const struct breakpoint_ops *, int, int, int, unsigned)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
static int bkpt_resources_needed(const struct bp_location *bl)
static void create_fork_vfork_event_catchpoint(struct gdbarch *gdbarch, int tempflag, char *cond_string, const struct breakpoint_ops *ops)
void free_command_lines(struct command_line **lptr)
int target_masked_watch_num_registers(CORE_ADDR addr, CORE_ADDR mask)
static void target_info(char *, int)
enum command_control_type execute_control_command(struct command_line *cmd)
static void do_map_disable_breakpoint(struct breakpoint *b, void *ignore)
void init_number_or_range(struct get_number_or_range_state *state, const char *string)
void do_cleanups(struct cleanup *old_chain)
static int watchpoint_in_thread_scope(struct watchpoint *b)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
int is_executing(ptid_t ptid)
static void update_watchpoint(struct watchpoint *b, int reparse)
static void print_recreate_watchpoint(struct breakpoint *b, struct ui_file *fp)
static void init_raw_breakpoint(struct breakpoint *b, struct gdbarch *gdbarch, struct symtab_and_line sal, enum bptype bptype, const struct breakpoint_ops *ops)
struct command_line * read_command_lines(char *prompt_arg, int from_tty, int parse_commands, void(*validator)(char *, void *), void *closure)
enum return_reason reason
const char * bpdisp_text(enum bpdisp disp)
static void check_status_watchpoint(bpstat bs)
static void download_tracepoint_locations(void)
static int dprintf_breakpoint_hit(const struct bp_location *bl, struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws)
static int bkpt_probe_remove_location(struct bp_location *bl)
void observer_notify_breakpoint_modified(struct breakpoint *b)
struct observer * observer_attach_about_to_proceed(observer_about_to_proceed_ftype *f)
void add_continuation(struct thread_info *thread, continuation_ftype *hook, void *args, continuation_free_arg_ftype *free_arg)
void check_longjmp_breakpoint_for_call_dummy(struct thread_info *tp)
const struct probe_ops * probe_linespec_to_ops(const char **linespecp)
enum mem_access_mode mode
void mark_breakpoints_out(void)
const struct breakpoint_ops * ops
#define VEC_ordered_remove(T, V, I)
const ULONGEST const LONGEST len
int gdbarch_get_longjmp_target_p(struct gdbarch *gdbarch)
static void dprintf_command(char *arg, int from_tty)
enum bpstat_what_main_action main_action
LONGEST parse_and_eval_long(const char *exp)