#include "probe.h"
#include "location.h"
#include <vector>
+#include "common/array-view.h"
+#include "cli/cli-script.h"
struct value;
struct block;
This function is called inside `create_breakpoint'. */
void (*create_breakpoints_sal) (struct gdbarch *,
struct linespec_result *,
- char *, char *,
+ gdb::unique_xmalloc_ptr<char>,
+ gdb::unique_xmalloc_ptr<char>,
enum bptype, enum bpdisp, int, int,
int, const struct breakpoint_ops *,
int, int, int, unsigned);
/* Given the location (second parameter), this method decodes it and
- provides the SAL locations related to it. For ordinary
+ returns the SAL locations related to it. For ordinary
breakpoints, it calls `decode_line_full'. If SEARCH_PSPACE is
not NULL, symbol search is restricted to just that program space.
This function is called inside `location_to_sals'. */
- void (*decode_location) (struct breakpoint *b,
- const struct event_location *location,
- struct program_space *search_pspace,
- struct symtabs_and_lines *sals);
+ std::vector<symtab_and_line> (*decode_location)
+ (struct breakpoint *b,
+ const struct event_location *location,
+ struct program_space *search_pspace);
/* Return true if this breakpoint explains a signal. See
bpstat_explains_signal. */
/* Initialize a struct bp_location. */
-extern void update_breakpoint_locations (struct breakpoint *b,
- struct program_space *filter_pspace,
- struct symtabs_and_lines sals,
- struct symtabs_and_lines sals_end);
+extern void update_breakpoint_locations
+ (struct breakpoint *b,
+ struct program_space *filter_pspace,
+ gdb::array_view<const symtab_and_line> sals,
+ gdb::array_view<const symtab_and_line> sals_end);
extern void breakpoint_re_set (void);
the internal breakpoint count. If UPDATE_GLL is non-zero,
update_global_location_list will be called. */
-extern void install_breakpoint (int internal, struct breakpoint *b,
+extern void install_breakpoint (int internal, std::unique_ptr<breakpoint> &&b,
int update_gll);
/* Flags that can be passed down to create_breakpoint, etc., to affect
extern int create_breakpoint (struct gdbarch *gdbarch,
const struct event_location *location,
- char *cond_string, int thread,
- char *extra_string,
+ const char *cond_string, int thread,
+ const char *extra_string,
int parse_extra,
int tempflag, enum bptype wanted_type,
int ignore_count,