aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2014-07-25 18:57:06 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2014-07-25 18:57:06 +0100
commitd54398a79e97eff8f51aed2035cb513cdc4fb319 (patch)
tree908a32b98fa7daeb16b85debfac32c59ced44395 /gdb/mips-tdep.c
parentab16fce80e60f15058b594f624024219c3a7a000 (diff)
downloadgdb-d54398a79e97eff8f51aed2035cb513cdc4fb319.zip
gdb-d54398a79e97eff8f51aed2035cb513cdc4fb319.tar.gz
gdb-d54398a79e97eff8f51aed2035cb513cdc4fb319.tar.bz2
MIPS: Respect the "set mips compression" command
This fixes gdbarch matching, making sure one for the opposite compressed ISA variation is not chosen. That in turn makes "set mips compression" work; right now the setting sticks to the initial value, either inferred from the ELF header of the binary first loaded or the default value if no binary has been used. This only affects debugging with no symbol table available or no binary chosen at all, as otherwise symbol annotations determine the compressed ISA variation. * mips-tdep.c (mips_gdbarch_init): Also check the compressed ISA variation in gdbarch matching.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index c3e8e77..9a530a8 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -8296,12 +8296,14 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
arches != NULL;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
- /* MIPS needs to be pedantic about which ABI the object is
- using. */
+ /* MIPS needs to be pedantic about which ABI and the compressed
+ ISA variation the object is using. */
if (gdbarch_tdep (arches->gdbarch)->elf_flags != elf_flags)
continue;
if (gdbarch_tdep (arches->gdbarch)->mips_abi != mips_abi)
continue;
+ if (gdbarch_tdep (arches->gdbarch)->mips_isa != mips_isa)
+ continue;
/* Need to be pedantic about which register virtual size is
used. */
if (gdbarch_tdep (arches->gdbarch)->mips64_transfers_32bit_regs_p