GDBUnixProcess.st
changeset 90 6046abc9ddf4
parent 79 303c4edc75ad
child 91 472a4841a8b6
equal deleted inserted replaced
89:ba62d486014f 90:6046abc9ddf4
    57 
    57 
    58     conpty := GDBPTY new.
    58     conpty := GDBPTY new.
    59 
    59 
    60     dbgpty := GDBPTY new.
    60     dbgpty := GDBPTY new.
    61     dbgpty setLocalEcho: false.
    61     dbgpty setLocalEcho: false.
    62     dbgpty setOutputCRLF: false.  
    62     dbgpty setOutputCRLF: false.
    63 
    63 
    64     args := { GDBExecutable ? '/usr/bin/gdb' . '-q' . '-ex' . 'new-ui mi ', dbgpty name . '-ex' . 'set pagination off' . '-ex' . 'show version'}.
    64     args := (Array new: 8)
    65     Processor 
    65                 at: 1 put: GDBExecutable ? '/usr/bin/gdb';
       
    66                 at: 2 put: '-q';
       
    67                 at: 3 put: '-ex';
       
    68                 at: 4 put: 'new-ui mi ', dbgpty name;
       
    69                 at: 5 put: '-ex';
       
    70                 at: 6 put: 'set pagination off';
       
    71                 at: 7 put: '-ex';
       
    72                 at: 8 put: 'show version';
       
    73                 yourself.
       
    74     Processor
    66         monitor:[
    75         monitor:[
    67             pid := OperatingSystem 
    76             pid := OperatingSystem
    68                     exec:args first
    77                     exec:args first
    69                     withArguments:args
    78                     withArguments:args
    70                     environment:OperatingSystem getEnvironment
    79                     environment:OperatingSystem getEnvironment
    71                     fileDescriptors:{
    80                     fileDescriptors:{
    72                             conpty slave fileDescriptor.
    81                             conpty slave fileDescriptor.
    86         conpty close.
    95         conpty close.
    87         dbgpty close.
    96         dbgpty close.
    88         self error:'Failed to launch gdb'.
    97         self error:'Failed to launch gdb'.
    89     ].
    98     ].
    90 
    99 
    91     "Modified: / 02-06-2017 / 08:18:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   100     "Modified: / 17-11-2017 / 20:18:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    92 !
   101 !
    93 
   102 
    94 release
   103 release
    95     debuggerPTY notNil ifTrue:[ 
   104     debuggerPTY notNil ifTrue:[
    96         debuggerPTY release.
   105         debuggerPTY release.
    97     ].
   106     ].
    98     consolePTY notNil ifTrue:[ 
   107     consolePTY notNil ifTrue:[
    99         consolePTY release.
   108         consolePTY release.
   100     ]. 
   109     ].
   101     super release
   110     super release
   102 
   111 
   103     "Created: / 02-06-2017 / 23:33:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   112     "Created: / 02-06-2017 / 23:33:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   104 ! !
   113 ! !
   105 
   114