diff options
author | Tom Tromey <tom@tromey.com> | 2018-06-14 15:32:46 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-09-17 00:42:17 -0600 |
commit | dd848631cb96f7d25270faeee4c9736577230a29 (patch) | |
tree | 74e58b6378972ec36458a95164517f54122d7229 /gdb/gdbthread.h | |
parent | 1a3389079dd5c93419846f44d42027a526ce19cf (diff) | |
download | binutils-dd848631cb96f7d25270faeee4c9736577230a29.zip binutils-dd848631cb96f7d25270faeee4c9736577230a29.tar.gz binutils-dd848631cb96f7d25270faeee4c9736577230a29.tar.bz2 |
Use new and delete for struct infcall_suspend_state
This changes infrun.c to use new and delete for infcall_suspend_state.
This enables the coming cleanups.
gdb/ChangeLog
2018-09-17 Tom Tromey <tom@tromey.com>
* gdbthread.h (struct thread_suspend_state): Add initializers.
(class thread_info) <suspend>: Remove initializer.
* infrun.c (struct infcall_suspend_state): Add initializers.
(save_infcall_suspend_state): Use new.
(discard_infcall_suspend_state): Use delete.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r-- | gdb/gdbthread.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 2c40254..99de5ff 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -155,16 +155,16 @@ struct thread_suspend_state "signal" command, which overrides "handle nopass". If the signal should be suppressed, the core will take care of clearing this before the target is resumed. */ - enum gdb_signal stop_signal; + enum gdb_signal stop_signal = GDB_SIGNAL_0; /* The reason the thread last stopped, if we need to track it (breakpoint, watchpoint, etc.) */ - enum target_stop_reason stop_reason; + enum target_stop_reason stop_reason = TARGET_STOPPED_BY_NO_REASON; /* The waitstatus for this thread's last event. */ - struct target_waitstatus waitstatus; + struct target_waitstatus waitstatus {}; /* If true WAITSTATUS hasn't been handled yet. */ - int waitstatus_pending_p; + int waitstatus_pending_p = 0; /* Record the pc of the thread the last time it stopped. (This is not the current thread's PC as that may have changed since the @@ -181,7 +181,7 @@ struct thread_suspend_state - If the thread is running, this is set to -1, to avoid leaving it with a stale value, to make it easier to catch bugs. */ - CORE_ADDR stop_pc; + CORE_ADDR stop_pc = 0; }; /* Base class for target-specific thread data. */ @@ -300,7 +300,7 @@ public: /* State of inferior thread to restore after GDB is done with an inferior call. See `struct thread_suspend_state'. */ - thread_suspend_state suspend {}; + thread_suspend_state suspend; int current_line = 0; struct symtab *current_symtab = NULL; |