From 143260c9bf2058b768d4d04cd4518054104dafd4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 8 Apr 2009 06:58:37 +0000 Subject: [PATCH] Implement -exec-jump. * mi/mi-cmds.h (mi_cmd_exec_jump): Declare. * mi/mi-main.c (mi_cmd_exec_jump): New. * mi/mi-cmds.c (mi_cmds): Register exec-jump. --- gdb/ChangeLog | 8 ++++++++ gdb/mi/mi-cmds.c | 1 + gdb/mi/mi-cmds.h | 1 + gdb/mi/mi-main.c | 7 +++++++ 4 files changed, 17 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0df9e94acb8..f6e4d595964 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2009-04-08 Vladimir Prus + + Implement -exec-jump. + + * mi/mi-cmds.h (mi_cmd_exec_jump): Declare. + * mi/mi-main.c (mi_cmd_exec_jump): New. + * mi/mi-cmds.c (mi_cmds): Register exec-jump. + 2009-04-07 Doug Evans * symfile.c (symbol_file_clear): Fix indentation. diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index 2610b6a67b3..df8f74a107b 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -61,6 +61,7 @@ struct mi_cmd mi_cmds[] = { "exec-arguments", { "set args", 1 }, NULL }, { "exec-continue", { NULL, 0 }, mi_cmd_exec_continue}, { "exec-finish", { NULL, 0 }, mi_cmd_exec_finish}, + { "exec-jump", { NULL, 0 }, mi_cmd_exec_jump}, { "exec-interrupt", { NULL, 0 }, mi_cmd_exec_interrupt}, { "exec-next", { NULL, 0 }, mi_cmd_exec_next}, { "exec-next-instruction", { NULL, 0 }, mi_cmd_exec_next_instruction}, diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h index 39f16fba0f3..634aac1594b 100644 --- a/gdb/mi/mi-cmds.h +++ b/gdb/mi/mi-cmds.h @@ -53,6 +53,7 @@ extern mi_cmd_argv_ftype mi_cmd_env_path; extern mi_cmd_argv_ftype mi_cmd_env_pwd; extern mi_cmd_argv_ftype mi_cmd_exec_continue; extern mi_cmd_argv_ftype mi_cmd_exec_finish; +extern mi_cmd_argv_ftype mi_cmd_exec_jump; extern mi_cmd_argv_ftype mi_cmd_exec_next; extern mi_cmd_argv_ftype mi_cmd_exec_next_instruction; extern mi_cmd_argv_ftype mi_cmd_exec_return; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index f7a13805d80..74e8ab9e818 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -168,6 +168,13 @@ mi_cmd_exec_return (char *command, char **argv, int argc) print_stack_frame (get_selected_frame (NULL), 1, LOC_AND_ADDRESS); } +void +mi_cmd_exec_jump (char *args, char **argv, int argc) +{ + /* FIXME: Should call a libgdb function, not a cli wrapper. */ + return mi_execute_async_cli_command ("jump", argv, argc); +} + static int proceed_thread_callback (struct thread_info *thread, void *arg) { -- 2.30.2