Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PR cli/13110
@ 2011-09-05 16:50 Pedro Alves
  2011-09-07  1:29 ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2011-09-05 16:50 UTC (permalink / raw)
  To: gdb-patches

<http://sourceware.org/ml/gdb/2011-09/msg00019.html>

Tested on x86_64-linux and applied.

Repeating what I said on gdb@, I'm now wondering if we actually ever
need the registers_changed call here or in wait_for_inferior
nowadays --- we flush threads' register caches when we resume
them (target_resume).

-- 
Pedro Alves

2011-09-05  Pedro Alves  <pedro@codesourcery.com>

	PR cli/13110

	gdb/
	* infrun.c (fetch_inferior_event): Check if there's a selected
	thread before checking if the selected thread is executing.

---
 gdb/infrun.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: src/gdb/infrun.c
===================================================================
--- src.orig/gdb/infrun.c	2011-09-05 15:50:49.000000000 +0100
+++ src/gdb/infrun.c	2011-09-05 15:57:10.693964411 +0100
@@ -2749,7 +2749,9 @@ fetch_inferior_event (void *client_data)
      switches threads anyway).  If we didn't do this, a spurious
      delayed event in all-stop mode would make the user lose the
      selected frame.  */
-  if (non_stop || is_executing (inferior_ptid))
+  if (non_stop
+      || (!ptid_equal (inferior_ptid, null_ptid)
+	  && is_executing (inferior_ptid)))
     registers_changed ();
 
   make_cleanup_restore_integer (&execution_direction);


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-14 12:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 16:50 PR cli/13110 Pedro Alves
2011-09-07  1:29 ` Doug Evans
2011-09-07 14:28   ` Pedro Alves
2011-09-07 17:42     ` Doug Evans
2011-09-14 13:40       ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox