[PATCH/RFA] arm-netbsdelf cross-debugging fixes
Jason R Thorpe
thorpej@wasabisystems.com
Tue Sep 3 15:40:00 GMT 2002
On Tue, Sep 03, 2002 at 08:23:01PM +0100, Richard Earnshaw wrote:
> > While there, I also fixed a problem with arm_addr_bits_remove -- No
> > 26-bit systems can run in Thumb mode, and so doing an arm_pc_is_thumb
> > on them is unnecessary (and could return incorrect results if debugging
> > code which runs in FIQ mode, since (pc & 1) == FIQ mode on those CPUs).
> >
> Yep, that would be a good move, but it would be easier to say yes if it
> were a separate patch.
Ok, here's this one, separated out.
* arm-tdep.c (arm_addr_bits_remove): Don't check for Thumb mode
if arm_apcs_32 is false.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.69
diff -c -r1.69 arm-tdep.c
*** arm-tdep.c 24 Aug 2002 00:21:34 -0000 1.69
--- arm-tdep.c 3 Sep 2002 22:29:17 -0000
***************
*** 225,234 ****
static CORE_ADDR
arm_addr_bits_remove (CORE_ADDR val)
{
! if (arm_pc_is_thumb (val))
! return (val & (arm_apcs_32 ? 0xfffffffe : 0x03fffffe));
else
! return (val & (arm_apcs_32 ? 0xfffffffc : 0x03fffffc));
}
/* When reading symbols, we need to zap the low bit of the address,
--- 225,234 ----
static CORE_ADDR
arm_addr_bits_remove (CORE_ADDR val)
{
! if (arm_apcs_32)
! return (val & (arm_pc_is_thumb (val) ? 0xfffffffe : 0xfffffffc));
else
! return (val & 0x03fffffc);
}
/* When reading symbols, we need to zap the low bit of the address,
More information about the Gdb-patches
mailing list