PATCH: per-inferior register cache for gdbserver

Daniel Jacobowitz drow@mvista.com
Thu Jun 13 12:29:00 GMT 2002


On Sat, Apr 20, 2002 at 09:23:07PM -0400, Andrew Cagney wrote:
> >Um, would there be more benefit in getting this sort of thing 
> >>implemented in the core of GDB?  I just don't see a per-lwp cache in the 
> >>remote target making much difference to GDB's thread debugging 
> >>performance.
> 
> 
> >I can get numbers later on how many register fetches it
> >actually saves; I suspect it's fairly small.
> 
> Can you please add a comment to the code explaining this - it more of a 
> design benefit than a performance benefit (the performance gains are 
> unknown).

Good idea, done.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2002-06-13  Daniel Jacobowitz  <drow@mvista.com>

	* gdbserver/regcache.c: Add comment.

Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/regcache.c,v
retrieving revision 1.5
diff -u -p -r1.5 regcache.c
--- regcache.c	11 Jun 2002 17:32:39 -0000	1.5
+++ regcache.c	13 Jun 2002 19:28:07 -0000
@@ -25,6 +25,10 @@
 #include <stdlib.h>
 #include <string.h>
 
+/* The private data for the register cache.  Note that we have one
+   per inferior; this is primarily for simplicity, as the performance
+   benefit is minimal.  */
+
 struct inferior_regcache_data
 {
   int registers_valid;



More information about the Gdb-patches mailing list