This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] handle_inferior_event: remove unnecessary reinit_frame_cache calls.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 06 Jun 2012 20:28:00 +0100
- Subject: [PATCH] handle_inferior_event: remove unnecessary reinit_frame_cache calls.
Switching threads always reinits the frame cache, so this is
redundant. Indeed, most places in handle_inferior_event that
context_switch don't do this.
Tested on x86_64 Fedora 16, and applied.
2012-06-06 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event): Remove calls to
reinit_frame_cache that follow a context_switch call.
---
gdb/infrun.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0017211..210cdd7 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3511,10 +3511,7 @@ handle_inferior_event (struct execution_control_state *ecs)
}
if (!ptid_equal (ecs->ptid, inferior_ptid))
- {
- context_switch (ecs->ptid);
- reinit_frame_cache ();
- }
+ context_switch (ecs->ptid);
/* Immediately detach breakpoints from the child before there's
any chance of letting the user delete breakpoints from the
@@ -3631,10 +3628,7 @@ handle_inferior_event (struct execution_control_state *ecs)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXECD\n");
if (!ptid_equal (ecs->ptid, inferior_ptid))
- {
- context_switch (ecs->ptid);
- reinit_frame_cache ();
- }
+ context_switch (ecs->ptid);
singlestep_breakpoints_inserted_p = 0;
cancel_single_step_breakpoints ();