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]

[commit/gdbserver] Don't lose decr_pc_after_break adjustment


This can't be triggered currently.  I found this out while implementing trap tracepoint support.  We were reaching here with the decr_pc_after_break adjustment already done on the register cache, but, since we're refetching
the register set, we were losing that adjustment.  The thread would then
crash when resumed, due to resuming at the unadjusted address.  There's
no reason to refetch registers here, since get_thread_regcache fetches
all registers if they haven't been fetched yet.

-- 
Pedro Alves

2010-01-21  Pedro Alves  <pedro@codesourcery.com>

	gdb/gdbserver/
	* proc-service.c (ps_lgetregs): Don't refetch registers from the
	target.

---
 gdb/gdbserver/proc-service.c |    1 -
 1 file changed, 1 deletion(-)

Index: src/gdb/gdbserver/proc-service.c
===================================================================
--- src.orig/gdb/gdbserver/proc-service.c	2010-01-21 14:44:14.000000000 +0000
+++ src/gdb/gdbserver/proc-service.c	2010-01-21 14:45:30.000000000 +0000
@@ -111,7 +111,6 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwp
   save_inferior = current_inferior;
   current_inferior = reg_inferior;
   regcache = get_thread_regcache (current_inferior, 1);
-  the_target->fetch_registers (regcache, -1);
   gregset_info ()->fill_function (regcache, gregset);
 
   current_inferior = save_inferior;


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