New regcache_raw_get_signed
[deliverable/binutils-gdb.git] / gdb / regcache.c
index a5c90a6314c78423bf7c6c0e73969ac43d64d9ed..1fcf93386f7d3d4180ab6dad4f228566563855b2 100644 (file)
@@ -742,6 +742,19 @@ regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
   regcache_raw_write (regcache, regnum, buf);
 }
 
+LONGEST
+regcache_raw_get_signed (struct regcache *regcache, int regnum)
+{
+  LONGEST value;
+  enum register_status status;
+
+  status = regcache_raw_read_signed (regcache, regnum, &value);
+  if (status == REG_UNAVAILABLE)
+    throw_error (NOT_AVAILABLE_ERROR,
+                _("Register %d is not available"), regnum);
+  return value;
+}
+
 enum register_status
 regcache_cooked_read (struct regcache *regcache, int regnum, gdb_byte *buf)
 {
This page took 0.024974 seconds and 4 git commands to generate.