Set target-async option to allow asynchronous communication with GDB.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 29 Sep 2014 23:57:00 +0100
changeset 48 330aa6df3dfb
parent 47 4f5d75acecb0
child 49 dec248235d3f
Set target-async option to allow asynchronous communication with GDB.
GDBDebugger.st
GDBSimulatorProcess.st
GDBSimulatorResource.st
libgdbs.rc
tests/tests.rc
--- a/GDBDebugger.st	Thu Sep 25 09:40:26 2014 +0100
+++ b/GDBDebugger.st	Mon Sep 29 23:57:00 2014 +0100
@@ -295,10 +295,11 @@
     Delay waitForMilliseconds:100.  
 
 "/    self send: (GDBMICommand inferiorTtySet: driver inferiorPTY name).
-    self send: (GDBMI_inferior_tty_set arguments: { connection inferiorPTY name })
+    self send: (GDBMI_inferior_tty_set arguments: { connection inferiorPTY name }).
+    self send: (GDBMI_gdb_set arguments: #('target-async' 'on')).
 
     "Created: / 20-06-2014 / 21:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 23-06-2014 / 23:44:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-09-2014 / 23:30:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 release
--- a/GDBSimulatorProcess.st	Thu Sep 25 09:40:26 2014 +0100
+++ b/GDBSimulatorProcess.st	Mon Sep 29 23:57:00 2014 +0100
@@ -66,6 +66,9 @@
     (actual class == GDBMI_inferior_tty_set and:[expected class == GDBMI_inferior_tty_set]) ifTrue:[ 
         ^ false.
     ].
+    (actual class == GDBMI_gdb_set and:[ expected class == GDBMI_gdb_set ]) ifTrue:[ 
+        ^ false
+    ].
 
     actual token notNil ifTrue:[ 
         debuggerOutput nextPutAll: actual token printString.
@@ -75,7 +78,7 @@
     ^ true
 
     "Created: / 24-06-2014 / 23:37:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 26-08-2014 / 09:27:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-09-2014 / 23:32:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 processCommandLineExpecting:lineExpected 
--- a/GDBSimulatorResource.st	Thu Sep 25 09:40:26 2014 +0100
+++ b/GDBSimulatorResource.st	Mon Sep 29 23:57:00 2014 +0100
@@ -27,33 +27,41 @@
 ';
 
 >>>
-'2-file-exec-and-symbols /home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/jv/libgdbs/tests/c/factorial';
+'2-gdb-set target-async on';
 
 <<<
 '2^done
+(gdb)
+';
+
+>>>
+'3-file-exec-and-symbols /home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/jv/libgdbs/tests/c/factorial';
+
+<<<
+'3^done
 (gdb) 
 ';
 
 >>>
-'3b factorial';
+'4b factorial';
 
 <<<
 '&"b factorial\n"
 ~"Breakpoint 1 at 0x400527: file factorial.c, line 4.\n"
 =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400527",func="factorial",file="factorial.c",fullname="/home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/jv/libgdbs/tests/c/factorial.c",line="4",times="0",original-location="factorial"}
-3^done
+4^done
 (gdb) 
 ';
 
 >>>
-'4r';
+'5r';
 
 <<<
 '&"r\n"
 ~"Starting program: /home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/jv/libgdbs/tests/c/factorial \n"
 =thread-group-started,id="i1",pid="7719"
 =thread-created,id="1",group-id="i1"
-4^running
+5^running
 *running,thread-id="all"
 (gdb) 
 ';
@@ -70,38 +78,38 @@
 ';
 
 >>>
-'5-stack-info-depth --thread 1 100';
+'6-stack-info-depth --thread 1 100';
 
 <<<
-'5^done,depth="2"
+'6^done,depth="2"
 (gdb) 
 ';
 
 >>>
-'6-stack-list-frames --thread 1 0 1';
+'7-stack-list-frames --thread 1 0 1';
 
 <<<
-'6^done,stack=[frame={level="0",addr="0x000107a4",func="factorial",file="factorial.c",fullname="/home/foo/bar/factorial.c",line="4"},frame={level="0",addr="0x000107a0",func="main",file="factorial.c",fullname="/home/foo/bar/factorial.c",line="13"}]
+'7^done,stack=[frame={level="0",addr="0x000107a4",func="factorial",file="factorial.c",fullname="/home/foo/bar/factorial.c",line="4"},frame={level="0",addr="0x000107a0",func="main",file="factorial.c",fullname="/home/foo/bar/factorial.c",line="13"}]
 (gdb)
 ';
 
 >>>
-'7del 1';
+'8del 1';
 
 <<<
 '&"del 1\n"
 =breakpoint-deleted,id="1"
-7^done
+8^done
 (gdb) 
 ';
 
 >>>
-'8c';
+'9c';
 
 <<<
 '&"c\n"
 ~"Continuing.\n"
-8^running
+9^running
 *running,thread-id="all"
 (gdb) 
 ';
@@ -116,6 +124,6 @@
 
 yourself
 
-    "Modified: / 17-09-2014 / 07:36:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-09-2014 / 23:35:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/libgdbs.rc	Thu Sep 25 09:40:26 2014 +0100
+++ b/libgdbs.rc	Mon Sep 29 23:57:00 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "LibraryName\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Thu, 25 Sep 2014 08:39:33 GMT\0"
+      VALUE "ProductDate", "Mon, 29 Sep 2014 22:56:12 GMT\0"
     END
 
   END
--- a/tests/tests.rc	Thu Sep 25 09:40:26 2014 +0100
+++ b/tests/tests.rc	Mon Sep 29 23:57:00 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "LibraryName\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Thu, 25 Sep 2014 08:39:35 GMT\0"
+      VALUE "ProductDate", "Mon, 29 Sep 2014 22:56:13 GMT\0"
     END
 
   END