Module Name: src
Committed By: rin
Date: Thu Aug 17 04:58:59 UTC 2023
Modified Files:
src/external/gpl3/gdb/dist/gdb: arm-netbsd-tdep.c
Log Message:
gdb/arm: Fix PC value for armeb, lost during merge
Extend comments for future references.
XXX
Why uint64_t is unconditionally used as CORE_ADDR even for
LP32 targets? (see gdbsupport/common-types.h)
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/arm-netbsd-tdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/arm-netbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/arm-netbsd-tdep.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/arm-netbsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/arm-netbsd-tdep.c:1.1.1.1 Sun Jul 30 22:44:46 2023
+++ src/external/gpl3/gdb/dist/gdb/arm-netbsd-tdep.c Thu Aug 17 04:58:58 2023
@@ -70,7 +70,10 @@ arm_nbsd_supply_gregset (const struct re
if (regnum == -1 || regnum == ARM_PC_REGNUM)
{
- CORE_ADDR r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->pc);
+ /* XXX Use uint32_t instead of CORE_ADDR (aka uint64_t; see
+ gdbsupport/common-types.h). Otherwise, zero-filled word
+ will be stored for big-endian targets. */
+ uint32_t r_pc = gdbarch_addr_bits_remove (regcache->arch (), gregset->pc);
regcache->raw_supply (ARM_PC_REGNUM, (char *) &r_pc);
}