* Alpha completely broken: build_regcache never called
@ 2002-04-03 15:05 Daniel Jacobowitz
2002-04-03 15:23 ` Martin M. Hunt
2002-04-03 21:15 ` Andrew Cagney
0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-03 15:05 UTC (permalink / raw)
To: gdb; +Cc: hunt, cagney
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.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-03 15:05 Alpha completely broken: build_regcache never called Daniel Jacobowitz
@ 2002-04-03 15:23 ` Martin M. Hunt
2002-04-03 21:15 ` Andrew Cagney
1 sibling, 0 replies; 8+ messages in thread
From: Martin M. Hunt @ 2002-04-03 15:23 UTC (permalink / raw)
To: Daniel Jacobowitz, gdb; +Cc: cagney
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);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-03 15:05 Alpha completely broken: build_regcache never called Daniel Jacobowitz
2002-04-03 15:23 ` Martin M. Hunt
@ 2002-04-03 21:15 ` Andrew Cagney
2002-04-03 21:25 ` Daniel Jacobowitz
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-03 21:15 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb, hunt, cagney
> 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.
When non-multi-arch, that function should still be called via:
initialize_non_multiarch ();
is this not happening?
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-03 21:15 ` Andrew Cagney
@ 2002-04-03 21:25 ` Daniel Jacobowitz
2002-04-04 6:23 ` Andrew Cagney
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-03 21:25 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb, hunt, cagney
On Thu, Apr 04, 2002 at 12:15:04AM -0500, Andrew Cagney 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.
>
> When non-multi-arch, that function should still be called via:
>
> initialize_non_multiarch ();
>
> is this not happening?
That function only initializes things created with
register_gdbarch_data... not register_gdbarch_swap. Adding a call to
init_gdbarch_swap (&startup_gdbarch) in initialize_non_multiarch causes
it to be called. Is that correct?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-03 21:25 ` Daniel Jacobowitz
@ 2002-04-04 6:23 ` Andrew Cagney
2002-04-04 8:42 ` Daniel Jacobowitz
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-04 6:23 UTC (permalink / raw)
To: Daniel Jacobowitz, hunt; +Cc: gdb, cagney
> On Thu, Apr 04, 2002 at 12:15:04AM -0500, Andrew Cagney 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.
>
>>
>> When non-multi-arch, that function should still be called via:
>>
>> initialize_non_multiarch ();
>>
>> is this not happening?
>
>
> That function only initializes things created with
> register_gdbarch_data... not register_gdbarch_swap. Adding a call to
> init_gdbarch_swap (&startup_gdbarch) in initialize_non_multiarch causes
> it to be called. Is that correct?
Er, yes :-( Does it ``work'' (between the other two functions to match
gdbarch_update_p())?
There could be a problem (memory leak, NULL test?) if code is doing the
sequence:
_initialize_foo()
-> build_foo()
....
_initialize_non_multiarch()
-> init_gdbarch_swap()
-> build_foo ()
but I think I can live with that (with liberal commenting :-) as it is
the non-multi-arch case.
This looks to also be a partial fix to gdb/438. The underlying problem
is still there but this further improves things.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-04 6:23 ` Andrew Cagney
@ 2002-04-04 8:42 ` Daniel Jacobowitz
2002-04-05 18:30 ` Andrew Cagney
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-04 8:42 UTC (permalink / raw)
To: Andrew Cagney; +Cc: hunt, gdb, cagney
On Thu, Apr 04, 2002 at 09:23:28AM -0500, Andrew Cagney 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.
> >
> >>
> >>When non-multi-arch, that function should still be called via:
> >>
> >>initialize_non_multiarch ();
> >>
> >>is this not happening?
> >
> >
> >That function only initializes things created with
> >register_gdbarch_data... not register_gdbarch_swap. Adding a call to
> >init_gdbarch_swap (&startup_gdbarch) in initialize_non_multiarch causes
> >it to be called. Is that correct?
>
> Er, yes :-( Does it ``work'' (between the other two functions to match
> gdbarch_update_p())?
Yep. Want me to check it in?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-04 8:42 ` Daniel Jacobowitz
@ 2002-04-05 18:30 ` Andrew Cagney
2002-04-05 18:39 ` Daniel Jacobowitz
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-05 18:30 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: hunt, gdb, cagney
> That function only initializes things created with
>> >register_gdbarch_data... not register_gdbarch_swap. Adding a call to
>> >init_gdbarch_swap (&startup_gdbarch) in initialize_non_multiarch causes
>> >it to be called. Is that correct?
>
>>
>> Er, yes :-( Does it ``work'' (between the other two functions to match
>> gdbarch_update_p())?
>
>
> Yep. Want me to check it in?
M'kay (thanks). No need for the branch - doesn't contain the patch that
triggered this.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Alpha completely broken: build_regcache never called
2002-04-05 18:30 ` Andrew Cagney
@ 2002-04-05 18:39 ` Daniel Jacobowitz
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-05 18:39 UTC (permalink / raw)
To: gdb
On Fri, Apr 05, 2002 at 09:30:35PM -0500, Andrew Cagney wrote:
> >That function only initializes things created with
> >>>register_gdbarch_data... not register_gdbarch_swap. Adding a call to
> >>>init_gdbarch_swap (&startup_gdbarch) in initialize_non_multiarch causes
> >>>it to be called. Is that correct?
> >
> >>
> >>Er, yes :-( Does it ``work'' (between the other two functions to match
> >>gdbarch_update_p())?
> >
> >
> >Yep. Want me to check it in?
>
> M'kay (thanks). No need for the branch - doesn't contain the patch that
> triggered this.
Sure. I committed this.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2382
diff -u -r1.2382 ChangeLog
--- ChangeLog 2002/04/06 01:52:34 1.2382
+++ ChangeLog 2002/04/06 02:37:45
@@ -1,3 +1,8 @@
+2002-04-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbarch.sh (initialize_non_multiarch): Call init_gdbarch_swap.
+ * gdbarch.c: Regenerate.
+
2002-04-05 Michael Snyder <msnyder@redhat.com>
* cli/cli-dump.c (restore_section_callback): Use paddr_nz.
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.111
diff -u -r1.111 gdbarch.c
--- gdbarch.c 2002/03/19 02:51:05 1.111
+++ gdbarch.c 2002/04/06 02:37:46
@@ -412,6 +412,7 @@
initialize_non_multiarch ()
{
alloc_gdbarch_data (&startup_gdbarch);
+ init_gdbarch_swap (&startup_gdbarch)
init_gdbarch_data (&startup_gdbarch);
}
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.119
diff -u -r1.119 gdbarch.sh
--- gdbarch.sh 2002/03/19 02:51:07 1.119
+++ gdbarch.sh 2002/04/06 02:37:47
@@ -1333,6 +1333,7 @@
initialize_non_multiarch ()
{
alloc_gdbarch_data (&startup_gdbarch);
+ init_gdbarch_swap (&startup_gdbarch)
init_gdbarch_data (&startup_gdbarch);
}
EOF
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-04-06 2:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 15:05 Alpha completely broken: build_regcache never called Daniel Jacobowitz
2002-04-03 15:23 ` Martin M. Hunt
2002-04-03 21:15 ` Andrew Cagney
2002-04-03 21:25 ` Daniel Jacobowitz
2002-04-04 6:23 ` Andrew Cagney
2002-04-04 8:42 ` Daniel Jacobowitz
2002-04-05 18:30 ` Andrew Cagney
2002-04-05 18:39 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox