diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2011-12-06 23:19:43 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2011-12-06 23:19:43 +0000 |
commit | 91912e4d08609d91a27931942660fc9c8297b6a9 (patch) | |
tree | 2ec8e5861b83e99a643019b8b0706b813449c2f0 /gdb | |
parent | 50275556916ee2979672cab1cfd3e8d58f3b0779 (diff) | |
download | gdb-91912e4d08609d91a27931942660fc9c8297b6a9.zip gdb-91912e4d08609d91a27931942660fc9c8297b6a9.tar.gz gdb-91912e4d08609d91a27931942660fc9c8297b6a9.tar.bz2 |
* mips-tdep.c (mips_pc_is_mips16): Reverse the order of checks
performed to determine whether an address refers to standard
MIPS or MIPS16 code.
(mips16_next_pc): Use mips_pc_is_mips16 instead of
is_mips16_addr.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 15 |
2 files changed, 14 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cd9507a..03ab880 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2011-12-06 Maciej W. Rozycki <macro@codesourcery.com> + + * mips-tdep.c (mips_pc_is_mips16): Reverse the order of checks + performed to determine whether an address refers to standard + MIPS or MIPS16 code. + (mips16_next_pc): Use mips_pc_is_mips16 instead of + is_mips16_addr. + 2011-12-06 Pedro Alves <pedro@codesourcery.com> * breakpoint.c (breakpoint_restore_shadows): Rename to ... diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 7e74bc4..2e23836 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -989,18 +989,15 @@ mips_pc_is_mips16 (CORE_ADDR memaddr) { struct minimal_symbol *sym; - /* If bit 0 of the address is set, assume this is a MIPS16 address. */ - if (is_mips16_addr (memaddr)) - return 1; - - /* A flag indicating that this is a MIPS16 function is stored by elfread.c in - the high bit of the info field. Use this to decide if the function is - MIPS16 or normal MIPS. */ + /* A flag indicating that this is a MIPS16 function is stored by + elfread.c in the high bit of the info field. Use this to decide + if the function is MIPS16 or normal MIPS. Otherwise if bit 0 of + the address is set, assume this is a MIPS16 address. */ sym = lookup_minimal_symbol_by_pc (memaddr); if (sym) return msymbol_is_special (sym); else - return 0; + return is_mips16_addr (memaddr); } /* MIPS believes that the PC has a sign extended value. Perhaps the @@ -1579,7 +1576,7 @@ mips16_next_pc (struct frame_info *frame, CORE_ADDR pc) static CORE_ADDR mips_next_pc (struct frame_info *frame, CORE_ADDR pc) { - if (is_mips16_addr (pc)) + if (mips_pc_is_mips16 (pc)) return mips16_next_pc (frame, pc); else return mips32_next_pc (frame, pc); |