From: Jan Kratochvil Date: Sun, 7 Nov 2010 22:25:16 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=803b5f9525d4082320ebae560ef4168a0f342cc4;p=binutils-gdb.git gdb/ * infrun.c (restore_inferior_thread_state): Use discard_inferior_thread_state to free the data. (discard_inferior_thread_state): xfree also siginfo_data. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e3ab178702c..affffde8fea 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-11-07 Jan Kratochvil + + * infrun.c (restore_inferior_thread_state): Use + discard_inferior_thread_state to free the data. + (discard_inferior_thread_state): xfree also siginfo_data. + 2010-11-05 Doug Evans Make gdb.parameter("directories") work. diff --git a/gdb/infrun.c b/gdb/infrun.c index 240cd958fc4..f6b00da9432 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -6128,9 +6128,8 @@ restore_inferior_thread_state (struct inferior_thread_state *inf_state) if (target_has_execution) /* NB: The register write goes through to the target. */ regcache_cpy (regcache, inf_state->registers); - regcache_xfree (inf_state->registers); - xfree (inf_state->siginfo_data); - xfree (inf_state); + + discard_inferior_thread_state (inf_state); } static void @@ -6149,6 +6148,7 @@ void discard_inferior_thread_state (struct inferior_thread_state *inf_state) { regcache_xfree (inf_state->registers); + xfree (inf_state->siginfo_data); xfree (inf_state); }