+2011-07-25 Tom Tromey <tromey@redhat.com>
+
+ * ada-lang.c (ada_exception_breakpoint_ops): Make return type
+ const.
+ (ada_exception_sal): Make 'ops' const.
+ (ada_decode_exception_location): Likewise.
+ (ada_decode_assert_location): Likewise.
+ (catch_assert_command): Update.
+ (catch_ada_exception_command): Update.
+ (create_ada_exception_catchpoint): Make 'ops' const.
+ * breakpoint.c (set_raw_breakpoint_without_location)
+ (set_raw_breakpoint, momentary_breakpoint_from_master): Make 'ops'
+ const.
+ (create_internal_breakpoint): Update.
+ (init_raw_breakpoint_without_location): Make 'ops' const.
+ (init_raw_breakpoint, init_catchpoint)
+ (create_fork_vfork_event_catchpoint)
+ (create_syscall_event_catchpoint, init_breakpoint_sal)
+ (create_breakpoint_sal, create_breakpoints_sal)
+ (create_breakpoint, init_ada_exception_breakpoint): Likewise.
+ * breakpoint.h (struct breakpoint) <ops>: Now const.
+ (init_ada_exception_breakpoint, create_breakpoint): Make 'ops'
+ const.
+
2011-07-25 Paul Pluzhnikov <ppluzhnikov@google.com>
* linux-thread-db.c (thread_from_lwp): Initialize th.th_unique.
static struct symtab_and_line ada_exception_sal (enum exception_catchpoint_kind,
char *, char **,
- struct breakpoint_ops **);
+ const struct breakpoint_ops **);
static char *ada_exception_catchpoint_cond_string (const char *excep_string);
/* Ada catchpoints.
/* Return the breakpoint ops "virtual table" used for catchpoints
of the EX kind. */
-static struct breakpoint_ops *
+static const struct breakpoint_ops *
ada_exception_breakpoint_ops (enum exception_catchpoint_kind ex)
{
switch (ex)
static struct symtab_and_line
ada_exception_sal (enum exception_catchpoint_kind ex, char *excep_string,
- char **addr_string, struct breakpoint_ops **ops)
+ char **addr_string, const struct breakpoint_ops **ops)
{
const char *sym_name;
struct symbol *sym;
static struct symtab_and_line
ada_decode_exception_location (char *args, char **addr_string,
char **excep_string,
- struct breakpoint_ops **ops)
+ const struct breakpoint_ops **ops)
{
enum exception_catchpoint_kind ex;
struct symtab_and_line sal,
char *addr_string,
char *excep_string,
- struct breakpoint_ops *ops,
+ const struct breakpoint_ops *ops,
int tempflag,
int from_tty)
{
struct symtab_and_line sal;
char *addr_string = NULL;
char *excep_string = NULL;
- struct breakpoint_ops *ops = NULL;
+ const struct breakpoint_ops *ops = NULL;
tempflag = get_cmd_context (command) == CATCH_TEMPORARY;
static struct symtab_and_line
ada_decode_assert_location (char *args, char **addr_string,
- struct breakpoint_ops **ops)
+ const struct breakpoint_ops **ops)
{
/* Check that no argument where provided at the end of the command. */
int tempflag;
struct symtab_and_line sal;
char *addr_string = NULL;
- struct breakpoint_ops *ops = NULL;
+ const struct breakpoint_ops *ops = NULL;
tempflag = get_cmd_context (command) == CATCH_TEMPORARY;
static struct breakpoint *set_raw_breakpoint_without_location (struct gdbarch *,
enum bptype,
- struct breakpoint_ops *);
+ const struct breakpoint_ops *);
/* This function is used in gdbtk sources and thus can not be made
static. */
struct breakpoint *set_raw_breakpoint (struct gdbarch *gdbarch,
struct symtab_and_line,
- enum bptype, struct breakpoint_ops *);
+ enum bptype,
+ const struct breakpoint_ops *);
static struct breakpoint *
momentary_breakpoint_from_master (struct breakpoint *orig,
enum bptype type,
- struct breakpoint_ops *ops);
+ const struct breakpoint_ops *ops);
static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
static struct breakpoint *
create_internal_breakpoint (struct gdbarch *gdbarch,
CORE_ADDR address, enum bptype type,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct symtab_and_line sal;
struct breakpoint *b;
init_raw_breakpoint_without_location (struct breakpoint *b,
struct gdbarch *gdbarch,
enum bptype bptype,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
memset (b, 0, sizeof (*b));
static struct breakpoint *
set_raw_breakpoint_without_location (struct gdbarch *gdbarch,
enum bptype bptype,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct breakpoint *b = XNEW (struct breakpoint);
static void
init_raw_breakpoint (struct breakpoint *b, struct gdbarch *gdbarch,
struct symtab_and_line sal, enum bptype bptype,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
CORE_ADDR adjusted_address;
struct gdbarch *loc_gdbarch;
struct breakpoint *
set_raw_breakpoint (struct gdbarch *gdbarch,
struct symtab_and_line sal, enum bptype bptype,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct breakpoint *b = XNEW (struct breakpoint);
init_catchpoint (struct breakpoint *b,
struct gdbarch *gdbarch, int tempflag,
char *cond_string,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct symtab_and_line sal;
static void
create_fork_vfork_event_catchpoint (struct gdbarch *gdbarch,
int tempflag, char *cond_string,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct fork_catchpoint *c = XNEW (struct fork_catchpoint);
static void
create_syscall_event_catchpoint (int tempflag, VEC(int) *filter,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct syscall_catchpoint *c;
struct gdbarch *gdbarch = get_current_arch ();
static struct breakpoint *
momentary_breakpoint_from_master (struct breakpoint *orig,
enum bptype type,
- struct breakpoint_ops *ops)
+ const struct breakpoint_ops *ops)
{
struct breakpoint *copy;
char *cond_string,
enum bptype type, enum bpdisp disposition,
int thread, int task, int ignore_count,
- struct breakpoint_ops *ops, int from_tty,
+ const struct breakpoint_ops *ops, int from_tty,
int enabled, int internal, int display_canonical)
{
int i;
char *cond_string,
enum bptype type, enum bpdisp disposition,
int thread, int task, int ignore_count,
- struct breakpoint_ops *ops, int from_tty,
+ const struct breakpoint_ops *ops, int from_tty,
int enabled, int internal, int display_canonical)
{
struct breakpoint *b;
char *cond_string,
enum bptype type, enum bpdisp disposition,
int thread, int task, int ignore_count,
- struct breakpoint_ops *ops, int from_tty,
+ const struct breakpoint_ops *ops, int from_tty,
int enabled, int internal)
{
int i;
int tempflag, enum bptype type_wanted,
int ignore_count,
enum auto_boolean pending_break_support,
- struct breakpoint_ops *ops,
+ const struct breakpoint_ops *ops,
int from_tty, int enabled, int internal)
{
volatile struct gdb_exception e;
struct gdbarch *gdbarch,
struct symtab_and_line sal,
char *addr_string,
- struct breakpoint_ops *ops,
+ const struct breakpoint_ops *ops,
int tempflag,
int from_tty)
{