diff options
author | Tom Tromey <tom@tromey.com> | 2018-06-14 15:59:55 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-09-17 00:42:18 -0600 |
commit | ee841dd8fee73c355587533027aecc8983bd5478 (patch) | |
tree | fda1bcc80220de90f052a0ea8461fa154cacff2b /gdb/inferior.h | |
parent | 117f580a97f721465d62d0630594dafdcd89e4e8 (diff) | |
download | binutils-gdb-ee841dd8fee73c355587533027aecc8983bd5478.tar.gz |
Use new and delete for struct infcall_control_state
This changes infrun.c to use new and delete for infcall_control_state.
gdb/ChangeLog
2018-09-17 Tom Tromey <tom@tromey.com>
* gdbthread.h (struct thread_control_state): Add initializer.
(class thread_info) <control>: Remove initializer.
* inferior.h (struct inferior_control_state): Add initializer.
(class inferior) <control>: Remove initializer.
(exit_inferior_1): Update.
* infrun.c (struct infcall_control_state): Add constructors.
(save_infcall_control_state): Use new.
(restore_infcall_control_state, discard_infcall_control_state):
Use delete.
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r-- | gdb/inferior.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h index 8d384298387..9f431de7bf4 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -283,6 +283,16 @@ struct private_inferior struct inferior_control_state { + inferior_control_state () + : stop_soon (NO_STOP_QUIETLY) + { + } + + explicit inferior_control_state (enum stop_kind when) + : stop_soon (when) + { + } + /* See the definition of stop_kind above. */ enum stop_kind stop_soon; }; @@ -341,7 +351,7 @@ public: /* State of GDB control of inferior process execution. See `struct inferior_control_state'. */ - inferior_control_state control {NO_STOP_QUIETLY}; + inferior_control_state control; /* True if this was an auto-created inferior, e.g. created from following a fork; false, if this inferior was manually added by |