+Tue Jul 11 12:52:31 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * value.h (read_register, read_signed_register): Change return
+ type to ULONGEST.
+ (read_signed_register, read_signed_register_pid): Declare.
+
+ * regcache.c (read_register, read_register_pid): Update.
+ (read_signed_register_pid, read_signed_register): New functions.
+
Mon Jul 10 18:06:18 2000 Andrew Cagney <cagney@b1.cygnus.com>
* mips-tdep.c (mips_push_arguments): Always align struct_addr on a
/* Return the raw contents of register REGNO, regarding it as an
- integer. This probably should be returning LONGEST rather than
- CORE_ADDR. */
+ UNSIGNED integer. */
-CORE_ADDR
+ULONGEST
read_register (int regno)
{
if (registers_pid != inferior_pid)
if (!register_valid[regno])
target_fetch_registers (regno);
- return ((CORE_ADDR)
- extract_unsigned_integer (®isters[REGISTER_BYTE (regno)],
+ return (extract_unsigned_integer (®isters[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno)));
}
-CORE_ADDR
+ULONGEST
read_register_pid (int regno, int pid)
{
int save_pid;
return retval;
}
+/* Return the raw contents of register REGNO, regarding it a SIGNED
+ integer. */
+
+LONGEST
+read_signed_register (int regno)
+{
+ if (registers_pid != inferior_pid)
+ {
+ registers_changed ();
+ registers_pid = inferior_pid;
+ }
+
+ if (!register_valid[regno])
+ target_fetch_registers (regno);
+
+ return (extract_signed_integer (®isters[REGISTER_BYTE (regno)],
+ REGISTER_RAW_SIZE (regno)));
+}
+
+LONGEST
+read_signed_register_pid (int regno, int pid)
+{
+ int save_pid;
+ LONGEST retval;
+
+ if (pid == inferior_pid)
+ return read_signed_register (regno);
+
+ save_pid = inferior_pid;
+
+ inferior_pid = pid;
+
+ retval = read_signed_register (regno);
+
+ inferior_pid = save_pid;
+
+ return retval;
+}
+
/* Store VALUE, into the raw contents of register number REGNO. */
void
extern void write_register_gen (int regno, char *myaddr);
-extern CORE_ADDR read_register (int regno);
+/* Rename to read_unsigned_register()? */
+extern ULONGEST read_register (int regno);
-extern CORE_ADDR read_register_pid (int regno, int pid);
+extern LONGEST read_signed_register (int regno);
+
+/* Rename to read_unsigned_register_pid()? */
+extern ULONGEST read_register_pid (int regno, int pid);
+
+extern LONGEST read_signed_register_pid (int regno, int pid);
extern void write_register (int regno, LONGEST val);