This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] handle_inferior_event, deferred_step_ptid handling: use context_switch and remove stale comment.


Real context switching is now long gone: we store and access infrun
context directly in each thread, instead of having a bunch of globals
swapped by context_switch.  context_switch is just a small wrapper
around switch_to_thread.  So this comment is nowadays stale and
misleading.

Applied.

2012-06-06  Pedro Alves  <palves@redhat.com>

	* infrun.c (handle_inferior_event) <deferred_step_ptid>: Use
	context_switch and remove stale comment.
---
 gdb/infrun.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index b008552..0017211 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3813,9 +3813,7 @@ handle_inferior_event (struct execution_control_state *ecs)
 
 	  ecs->event_thread->control.trap_expected = 0;
 
-	  /* Note: We do not call context_switch at this point, as the
-	     context is already set up for stepping the original thread.  */
-	  switch_to_thread (deferred_step_ptid);
+	  context_switch (deferred_step_ptid);
 	  deferred_step_ptid = null_ptid;
 	  /* Suppress spurious "Switching to ..." message.  */
 	  previous_inferior_ptid = inferior_ptid;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]