Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>, hunt@redhat.com
Cc: gdb@sources.redhat.com, cagney@redhat.com
Subject: Re: Alpha completely broken: build_regcache never called
Date: Thu, 04 Apr 2002 06:23:00 -0000	[thread overview]
Message-ID: <3CAC61E0.7040300@cygnus.com> (raw)
In-Reply-To: <20020404002511.A11444@nevyn.them.org>

> 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


  reply	other threads:[~2002-04-04 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03 15:05 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 [this message]
2002-04-04  8:42       ` Daniel Jacobowitz
2002-04-05 18:30         ` Andrew Cagney
2002-04-05 18:39           ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CAC61E0.7040300@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=cagney@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=hunt@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox