aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2010-08-13 13:22:44 +0000
committerVladimir Prus <vladimir@codesourcery.com>2010-08-13 13:22:44 +0000
commit8dedea0203a9ff24396a5e78b4addfc33c9135a7 (patch)
tree9a954f4d302bc540883f02f5bbd456aa77af7f0d /gdb/target.h
parentf608cd77e751a7c47cfb0f8fb91677cbb3e75232 (diff)
downloadgdb-8dedea0203a9ff24396a5e78b4addfc33c9135a7.zip
gdb-8dedea0203a9ff24396a5e78b4addfc33c9135a7.tar.gz
gdb-8dedea0203a9ff24396a5e78b4addfc33c9135a7.tar.bz2
Easier and more stubborn MI memory read commands.
* mi/mi-cmds.c (mi_cmds): Register data-read-memory-bytes and data-write-memory-bytes. * mi/mi-cmds.h (mi_cmd_data_read_memory_bytes) (mi_cmd_data_write_memory_bytes): New. * mi/mi-main.c (mi_cmd_data_read_memory): Use regular target_read. (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory_bytes): New. (mi_cmd_list_features): Add "data-read-memory-bytes" feature. * target.c (target_read_until_error): Remove. (read_whatever_is_readable, free_memory_read_result_vector) (read_memory_robust): New. * target.h (target_read_until_error): Remove. (struct memory_read_result, free_memory_read_result_vector) (read_memory_robust): New.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/gdb/target.h b/gdb/target.h
index e493d9d..7cedf8f 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -299,10 +299,23 @@ extern LONGEST target_read (struct target_ops *ops,
const char *annex, gdb_byte *buf,
ULONGEST offset, LONGEST len);
-extern LONGEST target_read_until_error (struct target_ops *ops,
- enum target_object object,
- const char *annex, gdb_byte *buf,
- ULONGEST offset, LONGEST len);
+struct memory_read_result
+ {
+ /* First address that was read. */
+ ULONGEST begin;
+ /* Past-the-end address. */
+ ULONGEST end;
+ /* The data. */
+ gdb_byte *data;
+};
+typedef struct memory_read_result memory_read_result_s;
+DEF_VEC_O(memory_read_result_s);
+
+extern void free_memory_read_result_vector (void *);
+
+extern VEC(memory_read_result_s)* read_memory_robust (struct target_ops *ops,
+ ULONGEST offset,
+ LONGEST len);
extern LONGEST target_write (struct target_ops *ops,
enum target_object object,