aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 2ae279a..10204bc 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -897,11 +897,12 @@ CORE_ADDR
skip_prologue(pc)
CORE_ADDR pc;
{
- int inst;
+ char buf[4];
+ unsigned long inst;
int status;
- status = target_read_memory (pc, (char *)&inst, 4);
- SWAP_TARGET_AND_HOST (&inst, sizeof (inst));
+ status = target_read_memory (pc, buf, 4);
+ inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;