diff options
author | Tom Tromey <tom@tromey.com> | 2021-10-02 16:49:54 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-10-20 11:00:31 -0600 |
commit | a4c50be3d68b4f857fee29a45f799755a6862c22 (patch) | |
tree | ac80ecdb956bab3ac99030587aec154545f96ad1 /gdb/breakpoint.h | |
parent | 5c1146d2dec3d6f2ca56456f215084b910938b92 (diff) | |
download | fsf-binutils-gdb-a4c50be3d68b4f857fee29a45f799755a6862c22.zip fsf-binutils-gdb-a4c50be3d68b4f857fee29a45f799755a6862c22.tar.gz fsf-binutils-gdb-a4c50be3d68b4f857fee29a45f799755a6862c22.tar.bz2 |
Use unique_xmalloc_ptr in watchpoint
This changes struct watchpoint to use unique_xmalloc_ptr in a couple
of places, removing a bit of manual memory management.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 2b15622..ad64f83 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -831,13 +831,11 @@ struct breakpoint struct watchpoint : public breakpoint { - ~watchpoint () override; - /* String form of exp to use for displaying to the user (malloc'd), or NULL if none. */ - char *exp_string; + gdb::unique_xmalloc_ptr<char> exp_string; /* String form to use for reparsing of EXP (malloc'd) or NULL. */ - char *exp_string_reparse; + gdb::unique_xmalloc_ptr<char> exp_string_reparse; /* The expression we are watching, or NULL if not a watchpoint. */ expression_up exp; |