diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2019-01-02 17:31:08 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2019-01-02 17:31:08 -0500 |
commit | d20172fc53017cef12d64b21aa2fdac72072558c (patch) | |
tree | 405b1ffd879db4b7a5681b885a9f14e1683a405f /gdb/python | |
parent | e3319240732bc9543af8ced9d80ec89d0b629b2e (diff) | |
download | gdb-d20172fc53017cef12d64b21aa2fdac72072558c.zip gdb-d20172fc53017cef12d64b21aa2fdac72072558c.tar.gz gdb-d20172fc53017cef12d64b21aa2fdac72072558c.tar.bz2 |
Place displaced step data directly in inferior structure
This patch moves the per-inferior data related to displaced stepping to
be directly in the inferior structure, rather than in a container on the
side.
On notable difference is that previously, we deleted the state on
inferior exit, which guaranteed a clean state if re-using the inferior
for a new run or attach. We now need to reset the state manually.
At the same time, I changed step_saved_copy to be a gdb::byte_vector, so
it is automatically freed on destruction (which should plug the leak
reported here [1]).
[1] https://sourceware.org/ml/gdb-patches/2018-11/msg00202.html
gdb/ChangeLog:
* inferior.h (class inferior) <displaced_step_state>: New field.
* infrun.h (struct displaced_step_state): Move here from
infrun.c. Initialize fields, add constructor.
<inf>: Remove field.
<reset>: New method.
* infrun.c (struct displaced_step_inferior_state): Move to
infrun.h.
(displaced_step_inferior_states): Remove.
(get_displaced_stepping_state): Adust.
(displaced_step_in_progress_any_inferior): Adjust.
(displaced_step_in_progress_thread): Adjust.
(displaced_step_in_progress): Adjust.
(add_displaced_stepping_state): Remove.
(get_displaced_step_closure_by_addr): Adjust.
(remove_displaced_stepping_state): Remove.
(infrun_inferior_exit): Call displaced_step_state.reset.
(use_displaced_stepping): Don't check for NULL.
(displaced_step_prepare_throw): Call
get_displaced_stepping_state.
(displaced_step_fixup): Don't check for NULL.
(prepare_for_detach): Don't check for NULL.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions