aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 2bea4e2..c921bdd 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -570,8 +570,9 @@ regcache_raw_read_signed (struct regcache *regcache, int regnum, LONGEST *val)
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
regcache_raw_read (regcache, regnum, buf);
- (*val) = extract_signed_integer (buf,
- regcache->descr->sizeof_register[regnum]);
+ (*val) = extract_signed_integer
+ (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch));
}
void
@@ -583,8 +584,9 @@ regcache_raw_read_unsigned (struct regcache *regcache, int regnum,
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
regcache_raw_read (regcache, regnum, buf);
- (*val) = extract_unsigned_integer (buf,
- regcache->descr->sizeof_register[regnum]);
+ (*val) = extract_unsigned_integer
+ (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch));
}
void
@@ -594,7 +596,8 @@ regcache_raw_write_signed (struct regcache *regcache, int regnum, LONGEST val)
gdb_assert (regcache != NULL);
gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
- store_signed_integer (buf, regcache->descr->sizeof_register[regnum], val);
+ store_signed_integer (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch), val);
regcache_raw_write (regcache, regnum, buf);
}
@@ -606,7 +609,8 @@ regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
gdb_assert (regcache != NULL);
gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
- store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum], val);
+ store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch), val);
regcache_raw_write (regcache, regnum, buf);
}
@@ -637,8 +641,9 @@ regcache_cooked_read_signed (struct regcache *regcache, int regnum,
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_cooked_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
regcache_cooked_read (regcache, regnum, buf);
- (*val) = extract_signed_integer (buf,
- regcache->descr->sizeof_register[regnum]);
+ (*val) = extract_signed_integer
+ (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch));
}
void
@@ -650,8 +655,9 @@ regcache_cooked_read_unsigned (struct regcache *regcache, int regnum,
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_cooked_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
regcache_cooked_read (regcache, regnum, buf);
- (*val) = extract_unsigned_integer (buf,
- regcache->descr->sizeof_register[regnum]);
+ (*val) = extract_unsigned_integer
+ (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch));
}
void
@@ -662,7 +668,8 @@ regcache_cooked_write_signed (struct regcache *regcache, int regnum,
gdb_assert (regcache != NULL);
gdb_assert (regnum >=0 && regnum < regcache->descr->nr_cooked_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
- store_signed_integer (buf, regcache->descr->sizeof_register[regnum], val);
+ store_signed_integer (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch), val);
regcache_cooked_write (regcache, regnum, buf);
}
@@ -674,7 +681,8 @@ regcache_cooked_write_unsigned (struct regcache *regcache, int regnum,
gdb_assert (regcache != NULL);
gdb_assert (regnum >=0 && regnum < regcache->descr->nr_cooked_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
- store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum], val);
+ store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum],
+ gdbarch_byte_order (regcache->descr->gdbarch), val);
regcache_cooked_write (regcache, regnum, buf);
}