aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-10-02 17:17:27 -0600
committerTom Tromey <tom@tromey.com>2021-10-20 11:00:32 -0600
commit6f781ee30062c822cf6475cfa070c6e7cf770de4 (patch)
tree28f1176383c7f7ce9cf05ab7f7f34b93170e548f /gdb/breakpoint.h
parent23d6ee640578968b0ddef8e08d7dbb5b558a9ce9 (diff)
downloadgdb-6f781ee30062c822cf6475cfa070c6e7cf770de4.zip
gdb-6f781ee30062c822cf6475cfa070c6e7cf770de4.tar.gz
gdb-6f781ee30062c822cf6475cfa070c6e7cf770de4.tar.bz2
Use unique_xmalloc_ptr in breakpoint
This changes struct breakpoint to use unique_xmalloc_ptr in a couple of spots, removing a bit of manual memory management.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 304e2c1..f19f11e 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -720,7 +720,7 @@ using bp_location_range = next_range<bp_location>;
struct breakpoint
{
- virtual ~breakpoint ();
+ virtual ~breakpoint () = default;
/* Return a range of this breakpoint's locations. */
bp_location_range locations ();
@@ -785,11 +785,11 @@ struct breakpoint
int input_radix = 0;
/* String form of the breakpoint condition (malloc'd), or NULL if
there is no condition. */
- char *cond_string = NULL;
+ gdb::unique_xmalloc_ptr<char> cond_string;
/* String form of extra parameters, or NULL if there are none.
Malloc'd. */
- char *extra_string = NULL;
+ gdb::unique_xmalloc_ptr<char> extra_string;
/* Holds the address of the related watchpoint_scope breakpoint when
using watchpoints on local variables (might the concept of a