GDBUnixProcess.st
changeset 294 7c84fcc868e2
parent 293 d1422e1ee1bd
equal deleted inserted replaced
293:d1422e1ee1bd 294:7c84fcc868e2
    87 ! !
    87 ! !
    88 
    88 
    89 !GDBUnixProcess methodsFor:'accessing'!
    89 !GDBUnixProcess methodsFor:'accessing'!
    90 
    90 
    91 consoleInput
    91 consoleInput
    92     ^ consolePTY master
    92     ^ consolePTY masterWriteStream
    93 
    93 
    94     "Created: / 02-06-2017 / 23:36:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    94     "Created: / 02-06-2017 / 23:36:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    95     "Modified: / 02-08-2023 / 12:50:52 / Jan Vrany <jan.vrany@labware.com>"
    95 !
    96 !
    96 
    97 
    97 consoleOutput
    98 consoleOutput
    98     ^ consolePTY master
    99     ^ consolePTY masterReadStream
    99 
   100 
   100     "Created: / 02-06-2017 / 23:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   101     "Created: / 02-06-2017 / 23:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   102     "Modified: / 02-08-2023 / 12:50:41 / Jan Vrany <jan.vrany@labware.com>"
   101 !
   103 !
   102 
   104 
   103 nativeTargetFeatures
   105 nativeTargetFeatures
   104     ^ #('async')
   106     ^ #('async')
   105 
   107 
   126                 at: 5 put: 'set pagination off';
   128                 at: 5 put: 'set pagination off';
   127                 yourself).
   129                 yourself).
   128 
   130 
   129     pid := GDBPortlib current 
   131     pid := GDBPortlib current 
   130                  spawn: argv
   132                  spawn: argv
   131                  stdin: conpty slave
   133                  stdin: conpty slaveReadStream
   132                  stdout: conpty slave
   134                  stdout: conpty slaveWriteStream
   133                  stderr: conpty slave
   135                  stderr: conpty slaveWriteStream
   134                  exit: [:stat | self exited: stat ].             
   136                  exit: [:stat | self exited: stat ].             
   135     pid isNil ifTrue:[
   137     pid isNil ifTrue:[
   136         conpty close.
   138         conpty close.
   137         dbgpty close.
   139         dbgpty close.
   138         self error:'Failed to launch gdb'.
   140         self error:'Failed to launch gdb'.
   139     ].
   141     ].
   140 
   142 
   141     consolePTY := conpty.
   143     consolePTY := conpty.
   142     debuggerPTY := dbgpty.
   144     debuggerPTY := dbgpty.
   143     debuggerInput := debuggerOutput := debuggerPTY master.
   145     debuggerInput := dbgpty masterWriteStream. 
       
   146     debuggerOutput := dbgpty masterReadStream.
   144 
   147 
   145     "Created: / 12-12-2018 / 20:13:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   148     "Created: / 12-12-2018 / 20:13:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   146     "Modified: / 11-06-2019 / 11:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   149     "Modified: / 11-06-2019 / 11:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   147     "Modified: / 24-07-2023 / 23:00:19 / Jan Vrany <jan.vrany@labware.com>"
   150     "Modified: / 02-08-2023 / 13:07:17 / Jan Vrany <jan.vrany@labware.com>"
   148 !
   151 !
   149 
   152 
   150 release
   153 release
   151     debuggerPTY notNil ifTrue:[
   154     debuggerPTY notNil ifTrue:[
   152         debuggerPTY release.
   155         debuggerPTY release.