forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
21
gdb/target.h
21
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,
|
||||
|
||||
Reference in New Issue
Block a user