* corelow.c (core_open): Only call set_gdbarch_from_file if

exec_bfd is NULL.
This commit is contained in:
Mark Kettenis 2002-05-17 23:06:10 +00:00
parent f617d2b61f
commit 2f1b59840e
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-05-18 Mark Kettenis <kettenis@gnu.org>
* corelow.c (core_open): Only call set_gdbarch_from_file if
exec_bfd is NULL.
2002-05-17 Andrey Volkov <avolkov@transas.com>
* h8300-tdep.c: Add support of EXR register

View File

@ -321,6 +321,11 @@ core_open (char *filename, int from_tty)
error ("\"%s\": Can't find sections: %s",
bfd_get_filename (core_bfd), bfd_errmsg (bfd_get_error ()));
/* 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);