aboutsummaryrefslogtreecommitdiff
path: root/gdb/inline-frame.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-12-11 09:21:53 -0700
committerTom Tromey <tom@tromey.com>2020-12-11 09:21:55 -0700
commitb6433ede0708af00be520abdf9209cd776aab2e2 (patch)
treeccb678ca9bc5bdff0664d7c714c3f6ad7a6d00bd /gdb/inline-frame.c
parentbfcb9db853c41ffff74c77d338b8b1378781aa0e (diff)
downloadgdb-b6433ede0708af00be520abdf9209cd776aab2e2.zip
gdb-b6433ede0708af00be520abdf9209cd776aab2e2.tar.gz
gdb-b6433ede0708af00be520abdf9209cd776aab2e2.tar.bz2
Make bp_location derive from refcounted_object
This changes bp_location to derive from refcounted_object, introduces a ref_ptr specialization for this type, and then changes bpstats::bp_location_at to use that specialization. This removes some manual reference counting and simplifies the code. gdb/ChangeLog 2020-12-11 Tom Tromey <tom@tromey.com> * inline-frame.c (stopped_by_user_bp_inline_frame): Update. * ada-lang.c (check_status_exception): Update. * breakpoint.c (free_bp_location): Remove. (decref_bp_location): Use bp_location_ref_policy. (bpstats::bpstats): Don't call incref_bp_location. (bpstats::~bpstats): Remove. (bpstats::bpstats): Update. (bpstat_check_watchpoint, bpstat_check_breakpoint_conditions) (bp_location::bp_location): Update. (incref_bp_location): Remove. (bkpt_print_it): Update. * breakpoint.h (class bp_location): Derive from refcounted_object. (struct bpstats): Remove destructor. <bp_location_at>: Now a bp_location_ref_ptr. <refc>: Remove. (bp_location_ref_ptr): New typedef. (struct bp_location_ref_policy): New.
Diffstat (limited to 'gdb/inline-frame.c')
-rw-r--r--gdb/inline-frame.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c
index 92a7d56..439f363 100644
--- a/gdb/inline-frame.c
+++ b/gdb/inline-frame.c
@@ -313,7 +313,7 @@ stopped_by_user_bp_inline_frame (const block *frame_block, bpstat stop_chain)
if (bpt != NULL
&& (user_breakpoint_p (bpt) || bpt->type == bp_until))
{
- bp_location *loc = s->bp_location_at;
+ bp_location *loc = s->bp_location_at.get ();
enum bp_loc_type t = loc->loc_type;
if (t == bp_loc_software_breakpoint