This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH/RFA] Don't gdbarch_init for core files
- From: Michael Snyder <msnyder at redhat dot com>
- To: m dot m dot kettenis at chello dot nl
- Cc: gdb-patches at sources dot redhat dot com, drow at mvista dot com, ac131313 at cygnus dot com, thorpej at wasabisystems dot com
- Date: Fri, 17 May 2002 10:40:28 -0700
- Subject: Re: [PATCH/RFA] Don't gdbarch_init for core files
- Organization: Red Hat, Inc.
- References: <20020517135849.ZGDH1268.amsfep15-int.chello.nl@[127.0.0.1]>
m.m.kettenis@chello.nl wrote:
>
> Michael Snyder wrote:
> > > > I guess I really do need to know why the change was added in the first
> > > > place (the message with the original patch doesn't describe the problem
> > > > the patch is trying to solve).
> > > > Just a guess - debugging a core file without an original binary?
> >
> > Bingo! ;-)
>
> Ah, but in that case, why not call set_gdbarch_from_file() only when exec_bfd is NULL? As in:
>
> if (!exec_bfd)
> set_gdbarch_from_file (core_bfd);
>
> I tested this, and it seems to solve the problems for me when testing my pending i386 multi-arch patches on Linux.
I cannot immediately think of any objections to this.
Michael