Use ldn_p(TARGET_LONG_SIZE) instead of ldl_p() / ldq_p().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/gdbstub/helpers.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/gdbstub/helpers.h b/include/gdbstub/helpers.h
index 26140ef1ac0..fd83e366a51 100644
--- a/include/gdbstub/helpers.h
+++ b/include/gdbstub/helpers.h
@@ -94,10 +94,10 @@ static inline uint8_t *gdb_get_reg_ptr(GByteArray *buf, int
len)
#if TARGET_LONG_BITS == 64
#define gdb_get_regl(buf, val) gdb_get_reg64(buf, val)
-#define ldtul_p(addr) ldq_p(addr)
#else
#define gdb_get_regl(buf, val) gdb_get_reg32(buf, val)
-#define ldtul_p(addr) ldl_p(addr)
#endif
+#define ldtul_p(addr) ldn_p(addr, TARGET_LONG_SIZE)