This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit/mips] For elf_flags, use the previous arch
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 08 Jan 2004 00:06:25 -0500
- Subject: [commit/mips] For elf_flags, use the previous arch
Hello,
This fixes a subtle edge case. Given the sequence:
(gdb) file foo
(gdb) set mipsfpu none
(gdb) file foo
An extra, unnecessary arch was being created after the second "file foo".
committed,
Andrew
2004-01-07 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (mips_gdbarch_init): Set elf_flags to the previous
architecture's elf flags (when available).
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.267
diff -u -r1.267 mips-tdep.c
--- mips-tdep.c 8 Jan 2004 04:57:38 -0000 1.267
+++ mips-tdep.c 8 Jan 2004 05:02:23 -0000
@@ -5688,6 +5688,8 @@
/* First of all, extract the elf_flags, if available. */
if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
elf_flags = elf_elfheader (info.abfd)->e_flags;
+ else if (arches != NULL)
+ elf_flags = gdbarch_tdep (arches->gdbarch)->elf_flags;
else
elf_flags = 0;
if (gdbarch_debug)