struct value;
struct block;
struct breakpoint_object;
+struct get_number_or_range_state;
/* This is the maximum number of bytes a breakpoint instruction can
take. Feel free to increase it. It's just used in a few places to
/* Event for JIT compiled code generation or deletion. */
bp_jit_event,
+
+ /* Breakpoint is placed at the STT_GNU_IFUNC resolver. When hit GDB
+ inserts new bp_gnu_ifunc_resolver_return at the caller.
+ bp_gnu_ifunc_resolver is still being kept here as a different thread
+ may still hit it before bp_gnu_ifunc_resolver_return is hit by the
+ original thread. */
+ bp_gnu_ifunc_resolver,
+
+ /* On its hit GDB now know the resolved address of the target
+ STT_GNU_IFUNC function. Associated bp_gnu_ifunc_resolver can be
+ deleted now and the breakpoint moved to the target function entry
+ point. */
+ bp_gnu_ifunc_resolver_return,
};
/* States of enablement of breakpoint. */
is used to determine the type of breakpoint to insert. */
CORE_ADDR placed_address;
+ /* If this is a ranged breakpoint, then this field contains the
+ length of the range that will be watched for execution. */
+ int length;
+
/* If the breakpoint lives in memory and reading that memory would
give back the breakpoint, instead of the original contents, then
the original contents are cached here. Only SHADOW_LEN bytes of
bp_loc_other. */
CORE_ADDR address;
- /* For hardware watchpoints, the size of data ad ADDRESS being
- watches. */
+ /* For hardware watchpoints, the size of the memory region being
+ watched. For hardware ranged breakpoints, the size of the
+ breakpoint range. */
int length;
/* Type of hardware watchpoint. */
/* Return non-zero if the debugger should tell the user that this
breakpoint was hit. */
- int (*breakpoint_hit) (struct breakpoint *);
+ int (*breakpoint_hit) (const struct bp_location *, struct address_space *,
+ CORE_ADDR);
/* Tell how many hardware resources (debug registers) are needed
for this breakpoint. If this function is not provided, then
the breakpoint or watchpoint needs one debug register. */
int (*resources_needed) (const struct bp_location *);
+ /* Tell whether we can downgrade from a hardware watchpoint to a software
+ one. If not, the user will not be able to enable the watchpoint when
+ there are not enough hardware resources available. */
+ int (*works_in_software_mode) (const struct breakpoint *);
+
/* The normal print routine for this breakpoint, called when we
hit it. */
enum print_stop_action (*print_it) (struct breakpoint *);
breakpoints". */
void (*print_one) (struct breakpoint *, struct bp_location **);
+ /* Display extra information about this breakpoint, below the normal
+ breakpoint description in "info breakpoints".
+
+ In the example below, the "address range" line was printed
+ by print_one_detail_ranged_breakpoint.
+
+ (gdb) info breakpoints
+ Num Type Disp Enb Address What
+ 2 hw breakpoint keep y in main at test-watch.c:70
+ address range: [0x10000458, 0x100004c7]
+
+ */
+ void (*print_one_detail) (const struct breakpoint *, struct ui_out *);
+
/* Display information about this breakpoint after setting it
(roughly speaking; this is called from "mention"). */
void (*print_mention) (struct breakpoint *);
/* Non-zero means a silent breakpoint (don't print frame info
if we stop here). */
unsigned char silent;
+ /* Non-zero means display ADDR_STRING to the user verbatim. */
+ unsigned char display_canonical;
/* Number of stops at this breakpoint that should
be continued automatically before really stopping. */
int ignore_count;
/* String we used to set the breakpoint (malloc'd). */
char *addr_string;
+
+ /* For a ranged breakpoint, the string we used to find
+ the end of the range (malloc'd). */
+ char *addr_string_range_end;
+
/* Architecture we used to set the breakpoint. */
struct gdbarch *gdbarch;
/* Language we used to set the breakpoint. */
/* Whether this watchpoint is exact (see target_exact_watchpoints). */
int exact;
+
+ /* The mask address for a masked hardware watchpoint. */
+ CORE_ADDR hw_wp_mask;
};
typedef struct breakpoint *breakpoint_p;
extern void until_break_command (char *, int, int);
+extern void update_breakpoint_locations (struct breakpoint *b,
+ struct symtabs_and_lines sals,
+ struct symtabs_and_lines sals_end);
+
extern void breakpoint_re_set (void);
extern void breakpoint_re_set_thread (struct breakpoint *);
is hit. */
extern struct command_line *breakpoint_commands (struct breakpoint *b);
+/* Return a string image of DISP. The string is static, and thus should
+ NOT be deallocated after use. */
+const char *bpdisp_text (enum bpdisp disp);
+
extern void break_command (char *, int);
extern void hbreak_command_wrapper (char *, int);
extern void clear_breakpoint_hit_counts (void);
-extern int get_number (char **);
-
-extern int get_number_or_range (char **);
-
extern struct breakpoint *get_breakpoint (int num);
/* The following are for displays, which aren't really breakpoints,
extern void breakpoint_set_commands (struct breakpoint *b,
struct command_line *commands);
+extern void breakpoint_set_silent (struct breakpoint *b, int silent);
+
+extern void breakpoint_set_thread (struct breakpoint *b, int thread);
+
+extern void breakpoint_set_task (struct breakpoint *b, int task);
+
/* Clear the "inserted" flag in all breakpoints. */
extern void mark_breakpoints_out (void);
extern struct breakpoint *create_thread_event_breakpoint (struct gdbarch *,
CORE_ADDR);
+extern void remove_jit_event_breakpoints (void);
+
extern void remove_solib_event_breakpoints (void);
extern void remove_thread_event_breakpoints (void);
Returns 0 if not, greater than 0 if we are. */
extern int catching_syscall_number (int syscall_number);
-/* Tell a breakpoint to be quiet. */
-extern void make_breakpoint_silent (struct breakpoint *);
-
/* Return a tracepoint with the given number if found. */
extern struct breakpoint *get_tracepoint (int num);
extern struct breakpoint *get_tracepoint_by_number_on_target (int num);
/* Find a tracepoint by parsing a number in the supplied string. */
-extern struct breakpoint *get_tracepoint_by_number (char **arg,
- int multi_p,
- int optional_p);
+extern struct breakpoint *
+ get_tracepoint_by_number (char **arg,
+ struct get_number_or_range_state *state,
+ int optional_p);
/* Return a vector of all tracepoints currently defined. The vector
is newly allocated; the caller should free when done with it. */