From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7660 invoked by alias); 27 Aug 2009 00:46:48 -0000 Received: (qmail 7650 invoked by uid 22791); 27 Aug 2009 00:46:46 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Aug 2009 00:46:40 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 3D90F13017; Wed, 26 Aug 2009 17:46:38 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id 33DB0CD902; Wed, 26 Aug 2009 17:46:38 -0700 (PDT) Message-ID: <4A95D7A0.6070509@vmware.com> Date: Thu, 27 Aug 2009 01:13:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Jakob Engblom CC: "gdb-patches@sourceware.org" Subject: Re: GDB MI Reverse Commands added [1 of 3] References: <00ce01ca265a$ccb66ca0$662345e0$@com> In-Reply-To: <00ce01ca265a$ccb66ca0$662345e0$@com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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-08/txt/msg00467.txt.bz2 Jakob Engblom wrote: > Here are the patches adding the MI commands for reverse execution to gdb. > > Changelog entry: "Added reverse debugging support to gdb MI" Jakob, thanks for this contribution. We need an actual contributor's name for the changelog! Here's the format: 2009-06-17 Ulrich Weigand * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected frame architecture instead of current_gdbarch. (mi_cmd_data_list_changed_registers): Likewise. (mi_cmd_data_list_register_values): Likewise. Pass selected frame to get_register. By the way, some of these changes don't actually seem to change anything. I guess we can apply them as is, but could you just check to see if something went wrong or got left out? I'm looking at for instance these... > *************** mi_cmd_exec_interrupt (char *command, ch > *** 252,258 **** > { > if (!any_running ()) > error ("Inferior not running."); > ! > interrupt_target_1 (1); > } > else if (argc == 2 && strcmp (argv[0], "--thread-group") == 0) > --- 307,313 ---- > { > if (!any_running ()) > error ("Inferior not running."); > ! > interrupt_target_1 (1); > } > else if (argc == 2 && strcmp (argv[0], "--thread-group") == 0) > *************** void > *** 349,355 **** > mi_cmd_thread_info (char *command, char **argv, int argc) > { > int thread = -1; > ! > if (argc != 0 && argc != 1) > error ("Invalid MI command"); > > --- 404,410 ---- > mi_cmd_thread_info (char *command, char **argv, int argc) > { > int thread = -1; > ! > if (argc != 0 && argc != 1) > error ("Invalid MI command"); > > *************** print_one_inferior (struct inferior *inf > *** 367,373 **** > ui_out_field_fmt (uiout, "id", "%d", inferior->pid); > ui_out_field_string (uiout, "type", "process"); > ui_out_field_int (uiout, "pid", inferior->pid); > ! > do_cleanups (back_to); > return 0; > } > --- 422,428 ---- > ui_out_field_fmt (uiout, "id", "%d", inferior->pid); > ui_out_field_string (uiout, "type", "process"); > ui_out_field_int (uiout, "pid", inferior->pid); > ! > do_cleanups (back_to); > return 0; > } > *************** mi_cmd_list_thread_groups (char *command > *** 433,446 **** > int pid = atoi (id); > if (!in_inferior_list (pid)) > error ("Invalid thread group id '%s'", id); > ! print_thread_info (uiout, -1, pid); > } > else > { > make_cleanup_ui_out_list_begin_end (uiout, "groups"); > iterate_over_inferiors (print_one_inferior, NULL); > } > ! > do_cleanups (back_to); > } > > --- 488,501 ---- > int pid = atoi (id); > if (!in_inferior_list (pid)) > error ("Invalid thread group id '%s'", id); > ! print_thread_info (uiout, -1, pid); > } > else > { > make_cleanup_ui_out_list_begin_end (uiout, "groups"); > iterate_over_inferiors (print_one_inferior, NULL); > } > ! > do_cleanups (back_to); > } > > *************** get_register (struct frame_info *frame, > *** 713,719 **** > } > > /* Write given values into registers. The registers and values are > ! given as pairs. The corresponding MI command is > -data-write-register-values [ ... > ]*/ > void > mi_cmd_data_write_register_values (char *command, char **argv, int argc) > --- 768,774 ---- > } > > /* Write given values into registers. The registers and values are > ! given as pairs. The corresponding MI command is > -data-write-register-values [ ... > ]*/ > void > mi_cmd_data_write_register_values (char *command, char **argv, int argc) > *************** mi_cmd_data_evaluate_expression (char *c > *** 810,816 **** > /* DATA-MEMORY-READ: > > ADDR: start address of data to be dumped. > ! WORD-FORMAT: a char indicating format for the ``word''. See > the ``x'' command. > WORD-SIZE: size of each ``word''; 1,2,4, or 8 bytes. > NR_ROW: Number of rows. > --- 865,871 ---- > /* DATA-MEMORY-READ: > > ADDR: start address of data to be dumped. > ! WORD-FORMAT: a char indicating format for the ``word''. See > the ``x'' command. > WORD-SIZE: size of each ``word''; 1,2,4, or 8 bytes. > NR_ROW: Number of rows. > *************** mi_cmd_data_evaluate_expression (char *c > *** 823,829 **** > > {addr="...",rowN={wordN="..." ,... [,ascii="..."]}, ...} > > ! Returns: > The number of bytes read is SIZE*ROW*COL. */ > > void > --- 878,884 ---- > > {addr="...",rowN={wordN="..." ,... [,ascii="..."]}, ...} > > ! Returns: > The number of bytes read is SIZE*ROW*COL. */ > > void > *************** mi_cmd_data_read_memory (char *command, > *** 1019,1025 **** > ADDR: start address of the row in the memory grid where the memory > cell is, if OFFSET_COLUMN is specified. Otherwise, the address of > the location to write to. > ! FORMAT: a char indicating format for the ``word''. See > the ``x'' command. > WORD_SIZE: size of each ``word''; 1,2,4, or 8 bytes > VALUE: value to be written into the memory address. > --- 1074,1080 ---- > ADDR: start address of the row in the memory grid where the memory > cell is, if OFFSET_COLUMN is specified. Otherwise, the address of > the location to write to. > ! FORMAT: a char indicating format for the ``word''. See > the ``x'' command. > WORD_SIZE: size of each ``word''; 1,2,4, or 8 bytes > VALUE: value to be written into the memory address. > *************** mi_cmd_enable_timings (char *command, ch > *** 1112,1118 **** > } > else > goto usage_error; > ! > return; > > usage_error: > --- 1167,1173 ---- > } > else > goto usage_error; > ! > return; > > usage_error: > *************** mi_cmd_list_features (char *command, cha > *** 1125,1140 **** > if (argc == 0) > { > struct cleanup *cleanup = NULL; > ! cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); > > ui_out_field_string (uiout, NULL, "frozen-varobjs"); > ui_out_field_string (uiout, NULL, "pending-breakpoints"); > ui_out_field_string (uiout, NULL, "thread-info"); > ! > #if HAVE_PYTHON > ui_out_field_string (uiout, NULL, "python"); > #endif > ! > do_cleanups (cleanup); > return; > } > --- 1180,1195 ---- > if (argc == 0) > { > struct cleanup *cleanup = NULL; > ! cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); > > ui_out_field_string (uiout, NULL, "frozen-varobjs"); > ui_out_field_string (uiout, NULL, "pending-breakpoints"); > ui_out_field_string (uiout, NULL, "thread-info"); > ! > #if HAVE_PYTHON > ui_out_field_string (uiout, NULL, "python"); > #endif > ! > do_cleanups (cleanup); > return; > } > *************** mi_cmd_list_target_features (char *comma > *** 1148,1158 **** > if (argc == 0) > { > struct cleanup *cleanup = NULL; > ! cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); > > if (target_can_async_p ()) > ui_out_field_string (uiout, NULL, "async"); > ! > do_cleanups (cleanup); > return; > } > --- 1203,1213 ---- > if (argc == 0) > { > struct cleanup *cleanup = NULL; > ! cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); > > if (target_can_async_p ()) > ui_out_field_string (uiout, NULL, "async"); > ! > do_cleanups (cleanup); > return; > } ... and so on...