@@ -12415,6 +12415,8 @@ ada_catchpoint_location_dtor (struct bp_location *bl)
struct ada_catchpoint_location *al = (struct ada_catchpoint_location *) bl;
al->excep_cond_expr.reset ();
+
+ base_bp_location_ops.dtor (bl);
}
/* The vtable to be used in Ada catchpoint locations. */
@@ -13246,13 +13248,16 @@ create_ada_exception_catchpoint (struct gdbarch *gdbarch,
int disabled,
int from_tty)
{
- const char *addr_string = NULL;
+ char *addr_string = NULL;
const struct breakpoint_ops *ops = NULL;
- struct symtab_and_line sal = ada_exception_sal (ex_kind, &addr_string, &ops);
+ struct symtab_and_line sal = ada_exception_sal (ex_kind,
+ (const char **) &addr_string,
+ &ops);
std::unique_ptr<ada_catchpoint> c (new ada_catchpoint ());
init_ada_exception_breakpoint (c.get (), gdbarch, sal, addr_string,
ops, tempflag, disabled, from_tty);
+ xfree (addr_string);
c->excep_string = excep_string;
create_excep_cond_exprs (c.get (), ex_kind);
if (!cond_string.empty ())
@@ -12168,14 +12168,14 @@ say_where (struct breakpoint *b)
/* Default bp_location_ops methods. */
static void
-bp_location_dtor (struct bp_location *self)
+base_bp_location_dtor (struct bp_location *self)
{
xfree (self->function_name);
}
-static const struct bp_location_ops bp_location_ops =
+const struct bp_location_ops base_bp_location_ops =
{
- bp_location_dtor
+ base_bp_location_dtor
};
/* Destructor for the breakpoint base class. */
@@ -12190,7 +12190,7 @@ breakpoint::~breakpoint ()
static struct bp_location *
base_breakpoint_allocate_location (struct breakpoint *self)
{
- return new bp_location (&bp_location_ops, self);
+ return new bp_location (&base_bp_location_ops, self);
}
static void
@@ -312,6 +312,10 @@ struct bp_location_ops
void (*dtor) (struct bp_location *self);
};
+/* Default bp_location_ops methods. */
+
+extern const struct bp_location_ops base_bp_location_ops;
+
class bp_location
{
public: