diff options
author | Tom Tromey <tom@tromey.com> | 2021-10-02 16:58:49 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-10-20 11:00:32 -0600 |
commit | 23d6ee640578968b0ddef8e08d7dbb5b558a9ce9 (patch) | |
tree | 311ff756d63d5ec56408f96a4f707f2f538857cf /gdb/breakpoint.h | |
parent | a4c50be3d68b4f857fee29a45f799755a6862c22 (diff) | |
download | gdb-23d6ee640578968b0ddef8e08d7dbb5b558a9ce9.zip gdb-23d6ee640578968b0ddef8e08d7dbb5b558a9ce9.tar.gz gdb-23d6ee640578968b0ddef8e08d7dbb5b558a9ce9.tar.bz2 |
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.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<char> function_name; /* Details of the placed breakpoint, when inserted. */ bp_target_info target_info {}; |