This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
allow async reverse-finish
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 26 May 2011 17:02:43 +0100
- Subject: allow async reverse-finish
reverse-finish& (note &) or MI's -exec-finish with async on,
now works:
(gdb) record
(gdb) n
During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x4005ad.
46 x = 1; /* NEXT TEST 1 */
(gdb)
47 y = 2; /* STEP TEST 1 */
(gdb)
48 z = 3; /* REVERSE NEXT TEST 1 */
(gdb)
49 w = w + 2; /* NEXT TEST 2 */
(gdb)
50 x = x + 3; /* REVERSE STEP TEST 1 */
(gdb)
51 y = y + 4;
(gdb)
52 z = z + 5; /* STEP TEST 2 */
(gdb)
55 callee(); /* NEXT OVER THIS CALL */
(gdb)
58 callee(); /* STEP INTO THIS CALL */
(gdb) s
callee () at ../../../src/gdb/testsuite/gdb.reverse/step-reverse.c:26
26 myglob++; return 0; /* ARRIVED IN CALLEE */
(gdb) n
27 } /* RETURN FROM CALLEE */
(gdb) reverse-finish &
Run back to call of #0 callee () at ../../../src/gdb/testsuite/gdb.reverse/step-reverse.c:27
(gdb) 0x00000000004005ef in main () at ../../../src/gdb/testsuite/gdb.reverse/step-reverse.c:58
58 callee(); /* STEP INTO THIS CALL */
(Patches to make target record async aware coming soon.)
Applied.
Pedro Alves
2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
* infcmd.c (finish_command): Allow async finish in reverse.
---
gdb/infcmd.c | 4 ----
1 file changed, 4 deletions(-)
Index: src/gdb/infcmd.c
===================================================================
--- src.orig/gdb/infcmd.c 2011-05-26 16:53:50.111254267 +0100
+++ src/gdb/infcmd.c 2011-05-26 16:53:53.641254266 +0100
@@ -1639,10 +1639,6 @@ finish_command (char *arg, int from_tty)
if (async_exec && !target_can_async_p ())
error (_("Asynchronous execution not supported on this target."));
- /* Don't try to async in reverse. */
- if (async_exec && execution_direction == EXEC_REVERSE)
- error (_("Asynchronous 'finish' not supported in reverse."));
-
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
if (!async_exec && target_can_async_p ())