+2001-11-12 Jim Blandy <jimb@redhat.com>
+
+ * corefile.c (write_memory_unsigned_integer,
+ write_memory_signed_integer): New functions.
+ (write_memory): Move to be with other write_memory_* functions.
+ * gdbcore.h (write_memory_unsigned_integer,
+ write_memory_signed_integer): New declarations.
+
2001-11-11 Geoffrey Keating <geoffk@redhat.com>
* dwarf2read.c (dwarf_decode_lines): Properly deal with
print_address (addr, info->stream);
}
-/* Same as target_write_memory, but report an error if can't write. */
-void
-write_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- int status;
-
- status = target_write_memory (memaddr, myaddr, len);
- if (status != 0)
- memory_error (status, memaddr);
-}
-
/* Read an integer from debugged memory, given address and number of bytes. */
LONGEST
break;
}
}
+
+/* Same as target_write_memory, but report an error if can't write. */
+void
+write_memory (CORE_ADDR memaddr, char *myaddr, int len)
+{
+ int status;
+
+ status = target_write_memory (memaddr, myaddr, len);
+ if (status != 0)
+ memory_error (status, memaddr);
+}
+
+/* Store VALUE at ADDR in the inferior as a LEN-byte unsigned integer. */
+void
+write_memory_unsigned_integer (CORE_ADDR addr, int len, ULONGEST value)
+{
+ char *buf = alloca (len);
+ store_unsigned_integer (buf, len, value);
+ write_memory (addr, buf, len);
+}
+
+/* Store VALUE at ADDR in the inferior as a LEN-byte signed integer. */
+void
+write_memory_signed_integer (CORE_ADDR addr, int len, LONGEST value)
+{
+ char *buf = alloca (len);
+ store_signed_integer (buf, len, value);
+ write_memory (addr, buf, len);
+}
+
\f
#if 0
extern void write_memory (CORE_ADDR memaddr, char *myaddr, int len);
+/* Store VALUE at ADDR in the inferior as a LEN-byte unsigned integer. */
+extern void write_memory_unsigned_integer (CORE_ADDR addr, int len,
+ ULONGEST value);
+
+/* Store VALUE at ADDR in the inferior as a LEN-byte unsigned integer. */
+extern void write_memory_signed_integer (CORE_ADDR addr, int len,
+ LONGEST value);
+
extern void generic_search (int len, char *data, char *mask,
CORE_ADDR startaddr, int increment,
CORE_ADDR lorange, CORE_ADDR hirange,