diff options
author | Tom Tromey <tom@tromey.com> | 2017-08-21 21:08:59 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-09-20 22:05:14 -0600 |
commit | 04afa70c8e1c931dd44db76eb9f0ddd4949ed00c (patch) | |
tree | 94b8b178506c22d8c1a839bc6a2d100a09b8e900 /gdb/breakpoint.h | |
parent | f5b358c8aa564c58b0a3201b82cc782124d80bb9 (diff) | |
download | gdb-04afa70c8e1c931dd44db76eb9f0ddd4949ed00c.zip gdb-04afa70c8e1c931dd44db76eb9f0ddd4949ed00c.tar.gz gdb-04afa70c8e1c931dd44db76eb9f0ddd4949ed00c.tar.bz2 |
Allocate bpstats with new
This changes struct bpstats to be allocated with new and freed with
delete, adding constructors and a destructor in the process. This
allows the removal of one cleanup and clears the way for more to
follow.
gdb/ChangeLog
2017-09-20 Tom Tromey <tom@tromey.com>
* breakpoint.c (~bpstats): Rename from bpstat_free. Update.
(bpstat_clear): Use delete.
(bpstats): New constructors.
(bpstat_copy, bpstat_stop_status): Use new.
(dprintf_after_condition_true): Update.
* breakpoint.h (bpstats::bpstats): Add constructors.
(bpstats::~bpstats): Add destructor.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 8b35eef..cbbe0a9 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -1082,6 +1082,13 @@ enum bp_print_how struct bpstats { + bpstats (); + bpstats (struct bp_location *bl, bpstat **bs_link_pointer); + ~bpstats (); + + bpstats (const bpstats &); + bpstats &operator= (const bpstats &) = delete; + /* Linked list because there can be more than one breakpoint at the same place, and a bpstat reflects the fact that all have been hit. */ |