Allow for setting path to GDB executable via classvar in GDBUnixProcess.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 01 Mar 2015 08:28:30 +0000
changeset 58 531c7f5d6558
parent 57 f27c9f059a08
child 59 95d6b1e90e2d
Allow for setting path to GDB executable via classvar in GDBUnixProcess.
GDBUnixProcess.st
--- a/GDBUnixProcess.st	Sun Mar 01 08:27:42 2015 +0000
+++ b/GDBUnixProcess.st	Sun Mar 01 08:28:30 2015 +0000
@@ -1,12 +1,31 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'jv:libgdbs' }"
 
+"{ NameSpace: Smalltalk }"
+
 GDBProcess subclass:#GDBUnixProcess
 	instanceVariableNames:''
-	classVariableNames:''
+	classVariableNames:'GDBExecutable'
 	poolDictionaries:''
 	category:'GDB-Private'
 !
 
+
+!GDBUnixProcess class methodsFor:'accessing'!
+
+gdbExecutable
+    ^ GDBExecutable
+
+    "Created: / 01-03-2015 / 08:07:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+gdbExecutable: aString
+    GDBExecutable := aString
+
+    "Created: / 01-03-2015 / 08:07:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !GDBUnixProcess methodsFor:'initialization'!
 
 initialize
@@ -16,7 +35,7 @@
     input := inputPipe second.
     outputPipe := NonPositionableExternalStream makePipe.
     output := outputPipe first.
-    args := #( '/usr/bin/gdb' '-q' '-nx' '--interpreter' 'mi2' ).
+    args := { GDBExecutable ? '/usr/bin/gdb' . '-q' . '-nx' . '--interpreter' . 'mi2' }.
     Processor 
         monitor:[
             pid := OperatingSystem 
@@ -44,6 +63,13 @@
         self error:'Failed to launch gdb'.
     ].
 
-    "Modified: / 23-06-2014 / 23:37:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 01-03-2015 / 08:06:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!GDBUnixProcess class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+