GDBProcess.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 20 Oct 2018 07:48:11 +0100
changeset 152 fab425b52c21
parent 149 0db2ccc6da7b
child 153 dd55019f1d86
permissions -rw-r--r--
Refactor `GDBProcess` hierarchy to improve portability Spawning and managing an OS process is tightly bound to the underlaying platform (both, smalltalk-wise and OS-wise). To improve portability and clarity of the code, rename `GDBUnixProcess` and `GDBWindowsProcess` to `GDBStXUnixProcess` and `GDBStxWindowsProcess`. This commit also includes a new abstract superclass (a `GDBLocalProcess`) for all specialisation spawning and managing a GDB process running on the same host as `jv:libgdbs` code.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
91
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     1
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     2
jv:libgdbs - GNU Debugger Interface Library
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     4
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     5
This library is free software; you can redistribute it and/or
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     6
modify it under the terms of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     7
License as published by the Free Software Foundation; either
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     8
version 2.1 of the License. 
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
     9
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    10
This library is distributed in the hope that it will be useful,
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    13
Lesser General Public License for more details.
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    14
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    15
You should have received a copy of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    16
License along with this library; if not, write to the Free Software
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    18
"
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
78
c24e7d8bc881 BUpdated build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    21
"{ NameSpace: Smalltalk }"
c24e7d8bc881 BUpdated build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 24
diff changeset
    22
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
Object subclass:#GDBProcess
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    24
	instanceVariableNames:'connection debuggerInput debuggerOutput'
149
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
    25
	classVariableNames:''
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'GDB-Private'
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
91
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    30
!GDBProcess class methodsFor:'documentation'!
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    31
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    32
copyright
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    33
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    34
jv:libgdbs - GNU Debugger Interface Library
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    35
Copyright (C) 2015-now Jan Vrany
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    36
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    37
This library is free software; you can redistribute it and/or
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    38
modify it under the terms of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    39
License as published by the Free Software Foundation; either
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    40
version 2.1 of the License. 
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    41
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    42
This library is distributed in the hope that it will be useful,
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    43
but WITHOUT ANY WARRANTY; without even the implied warranty of
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    44
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    45
Lesser General Public License for more details.
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    46
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    47
You should have received a copy of the GNU Lesser General Public
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    48
License along with this library; if not, write to the Free Software
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    49
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    50
"
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    51
!
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    52
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    53
documentation
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    54
"
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    55
    GDBProcess is represents a running GDB and provides access
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    56
    to MI and CLI channels (see #debuggerIput / #debuggerOutput).
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    57
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    58
    [author:]
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    59
        Jan Vrany <jan.vrany@fit.cvut.cz>
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    60
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    61
    [instance variables:]
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    62
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    63
    [class variables:]
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    64
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    65
    [see also:]
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    66
        GDBStXUnixProcess
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    67
        GDBStXWindowsProcess
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    68
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    69
"
91
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
    70
! !
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
    71
24
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    72
!GDBProcess class methodsFor:'instance creation'!
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    73
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    74
new
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    75
    self == GDBProcess ifTrue:[
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    76
        Smalltalk isSmalltalkX ifTrue:[
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    77
            OperatingSystem isUNIXlike ifTrue:[
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    78
                ^ GDBStXUnixProcess basicNew initialize
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    79
            ].
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    80
            OperatingSystem isMSWINDOWSlike ifTrue:[
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    81
                ^ GDBStXWindowsProcess basicNew initialize
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    82
            ]
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    83
        ].
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    84
        GDBError raiseErrorString:'Unsuported platform'.
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    85
    ] ifFalse:[ 
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    86
        ^ super new.
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    87
    ].
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    88
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 93
diff changeset
    89
    "
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    90
     GDBProcess new release."
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    91
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 93
diff changeset
    92
    "Modified (comment): / 11-01-2018 / 23:02:11 / jv"
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
    93
    "Modified: / 19-10-2018 / 10:03:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    94
! !
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    95
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    96
!GDBProcess class methodsFor:'accessing'!
24
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    97
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    98
gdbExecutable
149
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
    99
    | exe |
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   100
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   101
    exe := UserPreferences current gdbExecutable.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   102
    exe notNil ifTrue:[ ^ exe ].
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   103
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   104
    "/ On Windows, look for MSYS2 installation and
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   105
    "/ try to pick GDB matching current arch (i686
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   106
    "/ or x86_64) since on Windows, there's no GDB
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   107
    "/ supporting both targets :-(
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   108
    OperatingSystem isMSWINDOWSlike ifTrue:[ 
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   109
        ExternalAddress pointerSize == 8 ifTrue:[
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   110
            exe := 'C:\msys64\mingw64\bin\gdb.exe'.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   111
            exe asFilename exists ifTrue:[ ^ exe ].
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   112
            exe := 'C:\msys64\usr\bin\gdb.exe'.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   113
            exe asFilename exists ifTrue:[ ^ exe ].
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   114
        ] ifFalse:[
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   115
            exe := 'C:\msys64\mingw32\bin\gdb.exe'.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   116
            exe asFilename exists ifTrue:[ ^ exe ].
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   117
        ]
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   118
    ].
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   119
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   120
    "/ Search for `gdb` along the PATH...
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   121
    exe := OperatingSystem pathOfCommand: 'gdb'.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   122
    exe notNil ifTrue:[ ^ exe ].   
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   123
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   124
    "/ Nothing found :-(
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   125
    ^ nil
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   126
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   127
    "
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   128
    GDBProcess gdbExecutable
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   129
    UserPreferences current gdbExecutable: nil.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   130
    UserPreferences current gdbExecutable: '/home/jv/Projects/gdb/users_jv_vdb/gdb/gdb'.
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   131
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   132
      
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   133
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   134
    "
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   135
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   136
    "Created: / 01-03-2015 / 08:07:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
149
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   137
    "Modified (format): / 03-10-2018 / 22:18:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   138
    "Modified (comment): / 07-10-2018 / 07:59:57 / jv"
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   139
!
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   140
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   141
gdbExecutable: aString
149
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   142
    UserPreferences current gdbExecutable: aString
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   143
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   144
    "Created: / 01-03-2015 / 08:07:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
149
0db2ccc6da7b Refactor configuration and autodetection of gdb executable
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   145
    "Modified: / 03-10-2018 / 22:08:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
24
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
   146
! !
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
   147
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
!GDBProcess class methodsFor:'queries'!
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   150
isAbstract
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
    "Return if this class is an abstract class.
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
     True is returned here for myself only; false for subclasses.
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
     Abstract subclasses must redefine again."
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
    ^ self == GDBProcess.
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
! !
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
!GDBProcess methodsFor:'accessing'!
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
24
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
   160
connection:aGDBConnection
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
   161
    connection := aGDBConnection.
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
   162
!
98ff50f8a25d Temporary commit : initial work on session recorder (to use for simulation later)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
   163
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   164
consoleInput
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   165
    "Return a write stream on debugger's CLI channel. CLI commands
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   166
     should be written here. If this process does not have a CLI
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   167
     channel opened, `nil` is returned. In this case, CLI must be
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   168
     emulated - if required. See `-interpreter-exec` MI command.
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   169
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   170
     CLI channel is generally available only on Smalltalk/X and only
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   171
     on UNIX platform where this stream points to TTY."
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   172
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   173
    ^ nil
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   174
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   175
    "Created: / 02-06-2017 / 23:35:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   176
    "Modified: / 15-12-2017 / 23:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   177
    "Modified (comment): / 17-10-2018 / 22:20:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   178
!
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   179
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   180
consoleOutput
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   181
    "Return a read stream on debugger's CLI channel. CLI output
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   182
     should be read from. If this process does not have a CLI
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   183
     channel opened, `nil` is returned. In this case, CLI must be
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   184
     emulated - if required.
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   185
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   186
     CLI channel is generally available only on Smalltalk/X and only
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   187
     on UNIX platform where this stream points to TTY."
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   188
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   189
    ^ nil
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   190
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   191
    "Created: / 02-06-2017 / 23:35:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   192
    "Modified: / 15-12-2017 / 23:58:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   193
    "Modified (comment): / 17-10-2018 / 22:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   194
!
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   195
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
debuggerInput
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   197
    "Return a write stream on debugger's MI channel. (MI) commands
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   198
     should be written there."
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   199
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   200
    ^ debuggerInput
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   201
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   202
    "Modified: / 15-12-2017 / 23:58:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   203
    "Modified (comment): / 17-10-2018 / 22:14:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   204
!
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   205
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   206
debuggerOutput
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   207
    "Return read stream on debuugger's MI channel. Command responses
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   208
     and events should be read from here"
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   209
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   210
    ^ debuggerOutput
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   211
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   212
    "Modified: / 15-12-2017 / 23:58:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   213
    "Modified (comment): / 17-10-2018 / 22:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   214
!
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   215
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   216
id
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   217
    "Return a string identification of this GDBProcess. 
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   218
     Used for debugging purposes only."
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   219
116
ffd185f7a357 Fix: initialize debugger features early during initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   220
    ^ self subclassResponsibility
ffd185f7a357 Fix: initialize debugger features early during initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   221
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   222
    "Created: / 19-10-2018 / 10:08:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
116
ffd185f7a357 Fix: initialize debugger features early during initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   223
!
ffd185f7a357 Fix: initialize debugger features early during initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   224
152
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   225
nativeTargetFeatures    
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   226
    "Return default native target features. This is used when
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   227
     used GDB does not support =target-connected and =target-disconnected
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   228
     events."
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   229
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   230
    "/ Be conservative and  report no features at all...
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   231
    ^ #()
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   232
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   233
    "Created: / 09-04-2018 / 15:40:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fab425b52c21 Refactor `GDBProcess` hierarchy to improve portability
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 149
diff changeset
   234
    "Modified (comment): / 17-10-2018 / 22:12:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   235
! !
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   236
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   237
!GDBProcess methodsFor:'initialization & release'!
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   238
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   239
initialize
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 93
diff changeset
   240
    "raise an error: must be redefined in concrete subclass(es)"
93
b1715ebf8df1 Resurected old `GDBProcess` implementation using pipes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   241
95
f417138e9c48 Win32: initial support for Windows
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 93
diff changeset
   242
    ^ self subclassResponsibility
23
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   243
! !
a7eb888c81b5 Introduced GDBProcess - a class encapsulating gdb OS process.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   244
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   245
!GDBProcess class methodsFor:'documentation'!
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   246
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   247
version_HG
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   248
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   249
    ^ '$Changeset: <not expanded> $'
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   250
! !
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   251