This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] regcache fix
- From: "Martin M. Hunt" <hunt at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 19 Mar 2002 18:28:53 -0800
- Subject: [RFA] regcache fix
- Organization: Red Hat Inc
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 (®isters, sizeof (registers), NULL);
register_gdbarch_swap (®ister_valid, sizeof (register_valid), NULL);
register_gdbarch_swap (NULL, 0, build_regcache);