From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6898 invoked by alias); 8 Apr 2009 05:50:26 -0000 Received: (qmail 6884 invoked by uid 22791); 8 Apr 2009 05:50:25 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Apr 2009 05:50:20 +0000 Received: (qmail 20522 invoked from network); 8 Apr 2009 05:50:18 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Apr 2009 05:50:18 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: Implement -exec-jump Date: Wed, 08 Apr 2009 05:50:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.68; i686; svn-948090; 2009-04-01) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200904080950.16691.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00138.txt.bz2 This patch, committed, implements the -exec-jump MI command. (Documentation follows later) - Volodya Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.10357 diff -u -p -r1.10357 ChangeLog --- gdb/ChangeLog 5 Apr 2009 22:37:19 -0000 1.10357 +++ gdb/ChangeLog 8 Apr 2009 05:48:34 -0000 @@ -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-06 Mark Kettenis * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment. Index: gdb/mi/mi-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmds.c,v retrieving revision 1.38 diff -u -p -r1.38 mi-cmds.c --- gdb/mi/mi-cmds.c 3 Jan 2009 05:57:57 -0000 1.38 +++ gdb/mi/mi-cmds.c 8 Apr 2009 05:48:34 -0000 @@ -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}, Index: gdb/mi/mi-cmds.h =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmds.h,v retrieving revision 1.36 diff -u -p -r1.36 mi-cmds.h --- gdb/mi/mi-cmds.h 3 Jan 2009 05:57:57 -0000 1.36 +++ gdb/mi/mi-cmds.h 8 Apr 2009 05:48:34 -0000 @@ -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; Index: gdb/mi/mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.146 diff -u -p -r1.146 mi-main.c --- gdb/mi/mi-main.c 25 Mar 2009 21:42:35 -0000 1.146 +++ gdb/mi/mi-main.c 8 Apr 2009 05:48:34 -0000 @@ -168,6 +168,13 @@ mi_cmd_exec_return (char *command, char 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) {