diff options
Diffstat (limited to 'gdb/mi/mi-main.c')
-rw-r--r-- | gdb/mi/mi-main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index d7354606b52..51d0a268c9a 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -266,7 +266,7 @@ proceed_thread_callback (struct thread_info *thread, void *arg) static void exec_continue (char **argv, int argc) { - prepare_execution_command (¤t_target, mi_async_p ()); + prepare_execution_command (target_stack, mi_async_p ()); if (non_stop) { @@ -405,7 +405,7 @@ run_one_inferior (struct inferior *inf, void *arg) int start_p = *(int *) arg; const char *run_cmd = start_p ? "start" : "run"; struct target_ops *run_target = find_run_target (); - int async_p = mi_async && run_target->to_can_async_p (run_target); + int async_p = mi_async && run_target->can_async_p (); if (inf->pid != 0) { @@ -479,7 +479,7 @@ mi_cmd_exec_run (const char *command, char **argv, int argc) { const char *run_cmd = start_p ? "start" : "run"; struct target_ops *run_target = find_run_target (); - int async_p = mi_async && run_target->to_can_async_p (run_target); + int async_p = mi_async && run_target->can_async_p (); mi_execute_cli_command (run_cmd, async_p, async_p ? "&" : NULL); @@ -1353,10 +1353,7 @@ mi_cmd_data_read_memory (const char *command, char **argv, int argc) gdb::byte_vector mbuf (total_bytes); - /* Dispatch memory reads to the topmost target, not the flattened - current_target. */ - nr_bytes = target_read (current_target.beneath, - TARGET_OBJECT_MEMORY, NULL, mbuf.data (), + nr_bytes = target_read (target_stack, TARGET_OBJECT_MEMORY, NULL, mbuf.data (), addr, total_bytes); if (nr_bytes <= 0) error (_("Unable to read memory.")); @@ -1476,7 +1473,7 @@ mi_cmd_data_read_memory_bytes (const char *command, char **argv, int argc) length = atol (argv[1]); std::vector<memory_read_result> result - = read_memory_robust (current_target.beneath, addr, length); + = read_memory_robust (target_stack, addr, length); if (result.size () == 0) error (_("Unable to read memory.")); |