From 23d6ee640578968b0ddef8e08d7dbb5b558a9ce9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 2 Oct 2021 16:58:49 -0600 Subject: Use unique_xmalloc_ptr in bp_location This changes struct bp_location to use a unique_xmalloc_ptr, removing a bit of manual memory management. --- gdb/breakpoint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/breakpoint.h') diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index ad64f83..304e2c1 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -328,7 +328,7 @@ public: /* Construct a bp_location with type TYPE. */ bp_location (breakpoint *owner, bp_loc_type type); - virtual ~bp_location (); + virtual ~bp_location () = default; /* Chain pointer to the next breakpoint location for the same parent breakpoint. */ @@ -467,7 +467,7 @@ public: with it. */ bound_probe probe {}; - char *function_name = NULL; + gdb::unique_xmalloc_ptr function_name; /* Details of the placed breakpoint, when inserted. */ bp_target_info target_info {}; -- cgit v1.1