diff options
Diffstat (limited to 'gdb/h8300-tdep.c')
-rw-r--r-- | gdb/h8300-tdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index f2a2d02..69a720d 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -180,10 +180,11 @@ NEXT_PROLOGUE_INSN (addr, lim, pword1) CORE_ADDR lim; short *pword1; { + char buf[2]; if (addr < lim + 8) { - read_memory (addr, pword1, sizeof (*pword1)); - SWAP_TARGET_AND_HOST (pword1, sizeof (short)); + read_memory (addr, buf, 2); + *pword1 = extract_signed_integer (buf, 2); return addr + 2; } |