From 6f781ee30062c822cf6475cfa070c6e7cf770de4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 2 Oct 2021 17:17:27 -0600 Subject: 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. --- gdb/breakpoint.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/breakpoint.h') 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; 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 cond_string; /* String form of extra parameters, or NULL if there are none. Malloc'd. */ - char *extra_string = NULL; + gdb::unique_xmalloc_ptr extra_string; /* Holds the address of the related watchpoint_scope breakpoint when using watchpoints on local variables (might the concept of a -- cgit v1.1