This is the mail archive of the gdb-patches@sources.redhat.com 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]

[RFA] regcache fix


Currently build_regcache is called 3 times, once at initialization, 
before any architectures are registered, once when the host is 
registered and once when the target is registered.  I don't see 
any reason for the first call, and in some non-multiarched 
targets it can cause core dumps.  
-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

2002-03-19  Martin M. Hunt  <hunt@redhat.com>

	* regcache.c (_initialize_regcache): No need to call
	build_regcache() at this time; it gets called whenever
	the gdbarch changes.

Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.32
diff -u -u -r1.32 regcache.c
--- regcache.c	2002/02/06 03:16:38	1.32
+++ regcache.c	2002/03/20 02:24:33
@@ -802,8 +802,6 @@
 void
 _initialize_regcache (void)
 {
-  build_regcache ();
-
   register_gdbarch_swap (&registers, sizeof (registers), NULL);
   register_gdbarch_swap (&register_valid, sizeof (register_valid), NULL);
   register_gdbarch_swap (NULL, 0, build_regcache);


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