Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tomas Holmberg <th@virtutech.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	  Michael Snyder <msnyder@vmware.com>
Subject: reverse for GDB/MI
Date: Mon, 15 Dec 2008 10:59:00 -0000	[thread overview]
Message-ID: <49463870.6080302@virtutech.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

Hi,

I have looked at the new reverse functionality in GDB and I think that
it looks really good. I would like to see the reverse commands in the
GDB/MI interface as well. I have attached two patches with the same
purpose, to add reverse commands to the MI interface, as I am not sure
which one that is best.

/Tomas Holmberg

[-- Attachment #2: mi_reverse_ver0.diff --]
[-- Type: text/x-patch, Size: 1078 bytes --]

Index: gdb/mi/mi-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmds.c,v
retrieving revision 1.37
diff -c -p -r1.37 mi-cmds.c
*** gdb/mi/mi-cmds.c	17 Nov 2008 16:37:35 -0000	1.37
--- gdb/mi/mi-cmds.c	15 Dec 2008 09:54:10 -0000
*************** struct mi_cmd mi_cmds[] =
*** 70,75 ****
--- 70,81 ----
    { "exec-step", { NULL, 0 }, mi_cmd_exec_step},
    { "exec-step-instruction", { NULL, 0 }, mi_cmd_exec_step_instruction},
    { "exec-until", { "until", 1 }, NULL},
+   { "exec-reverse-continue", { "reverse-continue", 1 }, NULL},
+   { "exec-reverse-finish", { "reverse-finish", 1 }, NULL},
+   { "exec-reverse-next", { "reverse-next", 1 }, NULL},
+   { "exec-reverse-next-instruction", { "reverse-next-instruction", 1 }, NULL},
+   { "exec-reverse-step", { "reverse-step", 1 }, NULL},
+   { "exec-reverse-step-instruction", { "reverse-step-instruction", 1 }, NULL},
    { "file-clear", { NULL, 0 }, NULL },
    { "file-exec-and-symbols", { "file", 1 }, NULL },
    { "file-exec-file", { "exec-file", 1 }, NULL },

[-- Attachment #3: mi_reverse_ver1.diff --]
[-- Type: text/x-patch, Size: 4040 bytes --]

Index: gdb/mi/mi-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmds.c,v
retrieving revision 1.37
diff -c -p -r1.37 mi-cmds.c
*** gdb/mi/mi-cmds.c	17 Nov 2008 16:37:35 -0000	1.37
--- gdb/mi/mi-cmds.c	15 Dec 2008 09:57:08 -0000
*************** struct mi_cmd mi_cmds[] =
*** 70,75 ****
--- 70,81 ----
    { "exec-step", { NULL, 0 }, mi_cmd_exec_step},
    { "exec-step-instruction", { NULL, 0 }, mi_cmd_exec_step_instruction},
    { "exec-until", { "until", 1 }, NULL},
+   { "exec-reverse-continue", { NULL, 0 }, mi_cmd_exec_reverse_continue},
+   { "exec-reverse-finish", { NULL, 0 }, mi_cmd_exec_reverse_finish},
+   { "exec-reverse-next", { NULL, 0 }, mi_cmd_exec_reverse_next},
+   { "exec-reverse-next-instruction", { NULL, 0 }, mi_cmd_exec_reverse_next_instruction},
+   { "exec-reverse-step", { NULL, 0 }, mi_cmd_exec_reverse_step},
+   { "exec-reverse-step-instruction", { NULL, 0 }, mi_cmd_exec_reverse_step_instruction},
    { "file-clear", { NULL, 0 }, NULL },
    { "file-exec-and-symbols", { "file", 1 }, NULL },
    { "file-exec-file", { "exec-file", 1 }, NULL },
Index: gdb/mi/mi-cmds.h
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmds.h,v
retrieving revision 1.35
diff -c -p -r1.35 mi-cmds.h
*** gdb/mi/mi-cmds.h	17 Nov 2008 16:37:35 -0000	1.35
--- gdb/mi/mi-cmds.h	15 Dec 2008 09:57:08 -0000
*************** extern mi_cmd_argv_ftype mi_cmd_exec_ret
*** 59,64 ****
--- 59,70 ----
  extern mi_cmd_argv_ftype mi_cmd_exec_step;
  extern mi_cmd_argv_ftype mi_cmd_exec_step_instruction;
  extern mi_cmd_argv_ftype mi_cmd_exec_interrupt;
+ extern mi_cmd_argv_ftype mi_cmd_exec_reverse_continue;
+ extern mi_cmd_argv_ftype mi_cmd_exec_reverse_finish;
+ extern mi_cmd_argv_ftype mi_cmd_exec_reverse_next;
+ extern mi_cmd_argv_ftype mi_cmd_exec_reverse_next_instruction;
+ extern mi_cmd_argv_ftype mi_cmd_exec_reverse_step;
+ extern mi_cmd_argv_ftype mi_cmd_exec_reverse_step_instruction;
  extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_file;
  extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_files;
  extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
Index: gdb/mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.139
diff -c -p -r1.139 mi-main.c
*** gdb/mi/mi-main.c	2 Dec 2008 15:52:15 -0000	1.139
--- gdb/mi/mi-main.c	15 Dec 2008 09:57:09 -0000
*************** mi_cmd_exec_interrupt (char *command, ch
*** 261,266 ****
--- 261,308 ----
      error ("Usage: -exec-interrupt [--all|--thread-group id]");
  }
  
+ void
+ mi_cmd_exec_reverse_continue (char *command, char **argv, int argc)
+ {
+   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
+   mi_execute_async_cli_command ("reverse-continue", argv, argc);
+ }
+ 
+ void
+ mi_cmd_exec_reverse_finish (char *command, char **argv, int argc)
+ {
+   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
+   mi_execute_async_cli_command ("reverse-finish", argv, argc);
+ }
+ 
+ void
+ mi_cmd_exec_reverse_next (char *command, char **argv, int argc)
+ {
+   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
+   mi_execute_async_cli_command ("reverse-next", argv, argc);
+ }
+ 
+ void
+ mi_cmd_exec_reverse_next_instruction (char *command, char **argv, int argc)
+ {
+   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
+   mi_execute_async_cli_command ("reverse-nexti", argv, argc);
+ }
+ 
+ void
+ mi_cmd_exec_reverse_step (char *command, char **argv, int argc)
+ {
+   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
+   mi_execute_async_cli_command ("reverse-step", argv, argc);
+ }
+ 
+ void
+ mi_cmd_exec_reverse_step_instruction (char *command, char **argv, int argc)
+ {
+   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
+   mi_execute_async_cli_command ("reverse-stepi", argv, argc);
+ }
+ 
  static int
  find_thread_of_process (struct thread_info *ti, void *p)
  {

             reply	other threads:[~2008-12-15 10:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 10:59 Tomas Holmberg [this message]
2008-12-15 18:52 ` Marc Khouzam
2008-12-16  8:44   ` Jakob Engblom
2008-12-16 14:45     ` Marc Khouzam
2008-12-15 20:50 ` Eli Zaretskii
2008-12-17 14:57   ` Tomas Holmberg
2008-12-17 16:41     ` Eli Zaretskii
2008-12-17 16:17 ` Vladimir Prus
2008-12-18  8:33   ` Tomas Holmberg
2008-12-18  8:35     ` Vladimir Prus
2008-12-18  9:16       ` Jakob Engblom
2009-02-05  9:38         ` Vladimir Prus
2009-02-06  4:11           ` Doug Evans
2009-02-06 10:08           ` Jakob Engblom
2009-02-06 10:49             ` Vladimir Prus
2009-02-06 13:56               ` Jakob Engblom
2008-12-19  8:26       ` Tomas Holmberg
2008-12-19 11:07         ` Joel Brobecker
2008-12-19 13:22           ` Pedro Alves
2008-12-19 13:32             ` Jakob Engblom
2008-12-19 19:11         ` Michael Snyder
2008-12-22 20:27           ` Marc Khouzam
2008-12-22 21:14             ` Michael Snyder
2008-12-22 21:16               ` Marc Khouzam
2009-01-03 18:09             ` Jakob Engblom
2009-01-20 18:22               ` Marc Khouzam
2009-01-21  5:23                 ` teawater
2009-01-21 15:21                 ` Tomas Holmberg
2009-02-05 12:08                 ` Vladimir Prus
2008-12-18 21:39     ` Michael Snyder
2008-12-19  9:10       ` Tomas Holmberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49463870.6080302@virtutech.com \
    --to=th@virtutech.com \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox