This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Alpha completely broken: build_regcache never called
- From: "Martin M. Hunt" <hunt at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>, gdb at sources dot redhat dot com
- Cc: cagney at redhat dot com
- Date: Wed, 3 Apr 2002 15:22:54 -0800
- Subject: Re: Alpha completely broken: build_regcache never called
- Organization: Red Hat Inc
- References: <20020403180530.A570@nevyn.them.org>
On Wednesday 03 April 2002 03:05 pm, Daniel Jacobowitz wrote:
> I believe this patch is responsible:
>
> 2002-03-20 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.
>
> Alpha is completely non-multi-arch. Thus the gdbarch appears to never
> change, and we crash very quickly.
Seems like we should just ifdef the call to build_regcache back in.
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.33
diff -u -p -r1.33 regcache.c
--- regcache.c 2002/03/21 02:13:05 1.33
+++ regcache.c 2002/04/03 23:18:15
@@ -802,6 +802,10 @@ build_regcache (void)
void
_initialize_regcache (void)
{
+#if !GDB_MULTI_ARCH
+ build_regcache();
+#endif
+
register_gdbarch_swap (®isters, sizeof (registers), NULL);
register_gdbarch_swap (®ister_valid, sizeof (register_valid), NULL);
register_gdbarch_swap (NULL, 0, build_regcache);