From: Mark Kettenis <kettenis@chello.nl>
To: msnyder@redhat.com
Cc: thorpej@wasabisystems.com, m.m.kettenis@chello.nl,
gdb-patches@sources.redhat.com, drow@mvista.com,
ac131313@cygnus.com
Subject: Re: [PATCH/RFA] Don't gdbarch_init for core files
Date: Fri, 17 May 2002 16:06:00 -0000 [thread overview]
Message-ID: <200205172306.g4HN6OQ01741@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <3CE541BF.C833493F@redhat.com> (message from Michael Snyder on Fri, 17 May 2002 10:45:35 -0700)
Date: Fri, 17 May 2002 10:45:35 -0700
From: Michael Snyder <msnyder@redhat.com>
Jason R Thorpe wrote:
>
> On Fri, May 17, 2002 at 03:58:49PM +0200, m.m.kettenis@chello.nl wrote:
>
> > 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.
>
> Hm, why didn't I think of that :-)
>
> This would be totally cool with me.
Let's do it.
OK, I checked in the attached patch.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* corelow.c (core_open): Only call set_gdbarch_from_file if
exec_bfd is NULL.
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.21
diff -u -p -r1.21 corelow.c
--- corelow.c 5 May 2002 01:15:13 -0000 1.21
+++ corelow.c 17 May 2002 23:04:13 -0000
@@ -321,7 +321,12 @@ core_open (char *filename, int from_tty)
error ("\"%s\": Can't find sections: %s",
bfd_get_filename (core_bfd), bfd_errmsg (bfd_get_error ()));
- set_gdbarch_from_file (core_bfd);
+ /* If we have no exec file, try to set the architecture from the
+ core file. We don't do this unconditionally since an exec file
+ typically contains more information that helps us determine the
+ architecture than a core file. */
+ if (!exec_bfd)
+ set_gdbarch_from_file (core_bfd);
ontop = !push_target (&core_ops);
discard_cleanups (old_chain);
next prev parent reply other threads:[~2002-05-17 23:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-17 6:58 m.m.kettenis
2002-05-17 10:47 ` Jason R Thorpe
2002-05-17 10:59 ` Michael Snyder
2002-05-17 16:06 ` Mark Kettenis [this message]
2002-05-17 10:54 ` Michael Snyder
-- strict thread matches above, loose matches on Subject: below --
2002-05-09 18:58 Jason R Thorpe
2002-05-09 20:04 ` Andrew Cagney
2002-05-09 21:21 ` Jason R Thorpe
2002-05-11 19:48 ` Andrew Cagney
2002-05-11 20:30 ` Jason R Thorpe
2002-05-11 20:46 ` Daniel Jacobowitz
2002-05-16 16:24 ` Michael Snyder
2002-05-16 16:24 ` Michael Snyder
2002-05-16 17:33 ` Andrew Cagney
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=200205172306.g4HN6OQ01741@elgar.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=ac131313@cygnus.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=m.m.kettenis@chello.nl \
--cc=msnyder@redhat.com \
--cc=thorpej@wasabisystems.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