Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] regcache fix
@ 2002-03-19 18:29 Martin M. Hunt
  2002-03-20 12:41 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Martin M. Hunt @ 2002-03-19 18:29 UTC (permalink / raw)
  To: gdb-patches

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);


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

end of thread, other threads:[~2002-03-21  2:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-19 18:29 [RFA] regcache fix Martin M. Hunt
2002-03-20 12:41 ` Andrew Cagney
2002-03-20 18:16   ` Martin M. Hunt

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