diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index d00c5f6..c58ceb6 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1445,8 +1445,6 @@ step_over_info_valid_p (void) same effect the instruction would have had if we had executed it at its original address. We use this in step n3. - - gdbarch_displaced_step_free_closure provides cleanup. - The gdbarch_displaced_step_copy_insn and gdbarch_displaced_step_fixup functions must be written so that copying an instruction with gdbarch_displaced_step_copy_insn, @@ -1484,6 +1482,10 @@ step_over_info_valid_p (void) displaced step operation on it. See displaced_step_prepare and displaced_step_fixup for details. */ +/* Default destructor for displaced_step_closure. */ + +displaced_step_closure::~displaced_step_closure () = default; + /* Per-inferior displaced stepping state. */ struct displaced_step_inferior_state { @@ -1709,7 +1711,7 @@ displaced_step_clear (struct displaced_step_inferior_state *displaced) /* Indicate that there is no cleanup pending. */ displaced->step_ptid = null_ptid; - xfree (displaced->step_closure); + delete displaced->step_closure; displaced->step_closure = NULL; } |