mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
Fix bug detected by GDB testsuite - when fetching registers more than 4
bytes wide return 0 for the other bytes.
This commit is contained in:
parent
b3ca3a6a1f
commit
272fcdcd59
@ -1,3 +1,8 @@
|
||||
2002-01-09 Nick Clifton <nickc@cambridge.redhat.com>
|
||||
|
||||
* wrapper.c (sim_fetch_register): If fetching more than 4 bytes
|
||||
return zeroes in the other words.
|
||||
|
||||
2001-11-16 Ben Harris <bjh21@netbsd.org>
|
||||
|
||||
* Makefile.in (armemu32.o): Replace $< with autoconf recommended
|
||||
|
@ -220,6 +220,10 @@ sim_create_inferior (sd, abfd, argv, env)
|
||||
/* We wouldn't set the machine type with earlier toolchains, so we
|
||||
explicitly select a processor capable of supporting all ARMs in
|
||||
32bit mode. */
|
||||
case bfd_mach_arm_XScale:
|
||||
ARMul_SelectProcessor (state, ARM_v5_Prop | ARM_v5e_Prop | ARM_XScale_Prop);
|
||||
break;
|
||||
|
||||
case bfd_mach_arm_5:
|
||||
case bfd_mach_arm_5T:
|
||||
ARMul_SelectProcessor (state, ARM_v5_Prop);
|
||||
@ -229,10 +233,6 @@ sim_create_inferior (sd, abfd, argv, env)
|
||||
ARMul_SelectProcessor (state, ARM_v5_Prop | ARM_v5e_Prop);
|
||||
break;
|
||||
|
||||
case bfd_mach_arm_XScale:
|
||||
ARMul_SelectProcessor (state, ARM_v5_Prop | ARM_v5e_Prop | ARM_XScale_Prop);
|
||||
break;
|
||||
|
||||
case bfd_mach_arm_4:
|
||||
case bfd_mach_arm_4T:
|
||||
ARMul_SelectProcessor (state, ARM_v4_Prop);
|
||||
@ -395,7 +395,16 @@ sim_fetch_register (sd, rn, memory, length)
|
||||
regval = ARMul_GetCPSR (state);
|
||||
else
|
||||
regval = 0; /* FIXME: should report an error */
|
||||
tomem (state, memory, regval);
|
||||
|
||||
while (length)
|
||||
{
|
||||
tomem (state, memory, regval);
|
||||
|
||||
length -= 4;
|
||||
memory += 4;
|
||||
regval = 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user