GDBBreakpoint.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 25 Feb 2019 17:55:20 +0000
changeset 177 e7bd05df3d6b
parent 120 73877848ea7f
child 184 d70c70c3e495
permissions -rw-r--r--
Introduce new internal API `GDBDebuggerObject >> updateFrom:` to update one ("old") object with another one ("new"). This is used in cases when we want to preserve an identity of API objects.
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: 90
diff changeset
     1
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
diff changeset
     4
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
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: 90
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: 90
diff changeset
     9
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
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: 90
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: 90
diff changeset
    14
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
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: 90
diff changeset
    18
"
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
78
c24e7d8bc881 BUpdated build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 45
diff changeset
    21
"{ NameSpace: Smalltalk }"
c24e7d8bc881 BUpdated build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 45
diff changeset
    22
36
095c4b0b74d3 Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 35
diff changeset
    23
GDBDebuggerObject subclass:#GDBBreakpoint
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    24
	instanceVariableNames:'number type disp enabled addr func file fullname line times
120
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
    25
		condition script locations'
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	classVariableNames:''
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	poolDictionaries:''
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
	category:'GDB-Core'
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
91
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    31
!GDBBreakpoint class methodsFor:'documentation'!
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    32
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    33
copyright
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    34
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    35
jv:libgdbs - GNU Debugger Interface Library
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    36
Copyright (C) 2015-now Jan Vrany
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    37
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    38
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: 90
diff changeset
    39
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: 90
diff changeset
    40
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: 90
diff changeset
    41
version 2.1 of the License. 
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    42
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    43
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: 90
diff changeset
    44
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: 90
diff changeset
    45
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: 90
diff changeset
    46
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: 90
diff changeset
    47
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    48
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: 90
diff changeset
    49
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: 90
diff changeset
    50
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: 90
diff changeset
    51
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    52
! !
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
    53
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
!GDBBreakpoint class methodsFor:'accessing - GDB value descriptors'!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
45
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    56
description
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    57
    ^ (super description)
120
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
    58
        define:#number as:String;
45
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    59
        define:#type as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    60
        define:#disp as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    61
        define:#enabled as:Boolean;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    62
        define:#addr as:Integer;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    63
        define:#func as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    64
        define:#file as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    65
        define:#fullname as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    66
        define:#line as:Integer;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 36
diff changeset
    67
        define:#times as:Integer;
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
        yourself
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
    "Created: / 06-09-2014 / 01:56:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
120
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
    71
    "Modified: / 18-05-2018 / 12:38:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
! !
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
!GDBBreakpoint methodsFor:'accessing'!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
addr
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
    ^ addr
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    80
condition
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    81
    ^ condition
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    82
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    83
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    84
condition:aString
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    85
    self assert: debugger notNil.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    86
    condition ~= aString ifTrue:[ 
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
    87
        debugger send: (GDBMI_break_condition arguments: (Array with: number with: aString)) andWait: true.    
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    88
        condition := aString
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    89
    ].
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    90
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
    91
    "Modified: / 17-11-2017 / 20:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    92
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
    93
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
disp
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
    ^ disp
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
enabled
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
    ^ enabled
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   102
enabled: aBoolean
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   103
    self assert: debugger notNil.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   104
    enabled ~~ aBoolean ifTrue:[
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   105
        aBoolean ifTrue:[
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
   106
            debugger send: (GDBMI_break_enable arguments: (Array with: number)) andWait: true.
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   107
        ] ifFalse:[ 
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
   108
            debugger send: (GDBMI_break_disable arguments: (Array with: number)) andWait: true.
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   109
        ].
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   110
        enabled := aBoolean.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   111
    ].
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   112
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   113
    "Created: / 07-07-2017 / 12:33:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
   114
    "Modified: / 17-11-2017 / 20:24:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   115
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   116
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
file
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
    ^ file
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   119
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
fullname
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
    ^ fullname
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
func
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
    ^ func
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
line
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
    ^ line
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
120
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   133
locations
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   134
    locations isNil ifTrue:[ ^ Array with: self ].
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   135
    ^ locations
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   136
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   137
    "Modified: / 18-05-2018 / 12:23:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   138
!
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   139
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   140
locations:aCollection
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   141
    self assert:  aCollection isCollection.
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   142
    self assert: (aCollection allSatisfy:[:e|e isKindOf: GDBBreakpoint]).
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   143
    self assert: (aCollection allSatisfy:[:e|e number startsWith: number , '.']).
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   144
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   145
    locations := aCollection.
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   146
    locations do:[:e|e setDebugger: debugger].
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   147
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   148
    "Modified: / 18-05-2018 / 15:01:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   149
!
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   150
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
number
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
    ^ number
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   155
script
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   156
    ^ script
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   157
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   158
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   159
script:aString
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   160
    self assert: debugger notNil.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   161
    script ~= aString ifTrue:[ 
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
   162
        debugger send: (GDBMI_break_commands arguments: (Array with: number) , aString asStringCollection) andWait: true.    
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   163
        script := aString
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   164
    ].
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   165
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   166
    "Created: / 11-07-2017 / 14:32:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
90
6046abc9ddf4 Replaced Squek computed arrays by more verbose `Array with:...`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 87
diff changeset
   167
    "Modified: / 17-11-2017 / 20:24:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   168
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   169
35
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
times
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
    ^ times
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   172
!
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
type
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   175
    ^ type
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
! !
c17ecf90e446 Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   177
81
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   178
!GDBBreakpoint methodsFor:'accessing-properties'!
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   179
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   180
propertyAt: name
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   181
    name = 'at' ifTrue:[ 
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   182
        ^ nil
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   183
    ].
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   184
    ^super propertyAt: name
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   185
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   186
    "Created: / 05-06-2017 / 23:22:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   187
    "Modified: / 06-06-2017 / 09:18:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   188
!
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   189
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   190
propertyAt: name put: value
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   191
    name = 'at' ifTrue:[ 
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   192
        ^ self.
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   193
    ].
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   194
    ^ super propertyAt: name put: value
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   195
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   196
    "Created: / 05-06-2017 / 23:22:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   197
    "Modified: / 06-06-2017 / 09:19:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   198
! !
5e07808d349f Fixed and improvemets in `GDBThreadGroup` API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 79
diff changeset
   199
120
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   200
!GDBBreakpoint methodsFor:'initialization & release'!
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   201
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   202
setDebugger: aGDBDebugger
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   203
    super setDebugger: aGDBDebugger.
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   204
    locations notEmptyOrNil ifTrue:[ 
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   205
        locations do:[:e | e setDebugger: debugger ]
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   206
    ].
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   207
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   208
    "Created: / 18-05-2018 / 15:00:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   209
! !
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   210
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   211
!GDBBreakpoint methodsFor:'inspecting'!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   212
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   213
inspector2TabCondition
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   214
    <inspector2Tab>
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   215
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   216
    | editor |
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   217
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   218
    editor := (HVScrollableView for:EditTextView).
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   219
    editor model: ((AspectAdaptor forAspect: #condition) subject: self).
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   220
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   221
    ^ Tools::Inspector2Tab new
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   222
            priority: 41;
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   223
            label:'Condition';  
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   224
            view: editor
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   225
            yourself.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   226
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   227
    "Created: / 11-07-2017 / 14:36:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   228
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   229
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   230
inspector2TabScript
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   231
    <inspector2Tab>
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   232
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   233
    | editor |
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   234
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   235
    editor := (HVScrollableView for:EditTextView).
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   236
    editor model: ((AspectAdaptor forAspect: #script) subject: self).
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   237
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   238
    ^ Tools::Inspector2Tab new
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   239
            priority: 40;
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   240
            label:'Script';  
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   241
            view: editor
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   242
            yourself.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   243
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   244
    "Created: / 11-07-2017 / 14:41:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   245
! !
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   246
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   247
!GDBBreakpoint methodsFor:'printing & storing'!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   248
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   249
printOn:aStream
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   250
    "append a printed representation of the receiver to the argument, aStream"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   251
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   252
    super printOn:aStream.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   253
    aStream nextPut:$(.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   254
    number printOn:aStream.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   255
    aStream nextPutAll:', '.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   256
    aStream nextPutAll:(enabled ifTrue:[ 'enabled, ' ] ifFalse:[ 'disabled, ' ]).
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   257
    func notNil ifTrue:[ 
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   258
        aStream nextPutAll:'in '.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   259
        func printOn:aStream.   
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   260
        aStream nextPutAll:'(), '. 
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   261
    ].
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   262
    file notNil ifTrue:[
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   263
        file printOn:aStream.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   264
        aStream nextPut:$:.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   265
        line printOn:aStream.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   266
    ] ifFalse:[ 
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   267
        aStream nextPutAll:'at '.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   268
        addr printOn: aStream.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   269
    ].
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   270
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   271
    "Modified: / 10-07-2017 / 12:55:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   272
! !
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   273
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   274
!GDBBreakpoint methodsFor:'private'!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   275
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   276
_cond: aString
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   277
    condition := aString
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   278
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   279
    "Created: / 11-07-2017 / 14:11:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   280
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   281
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   282
_enabled: aBoolean
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   283
    enabled := aBoolean
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   284
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   285
    "Created: / 07-07-2017 / 12:46:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   286
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   287
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   288
_script: anArray
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   289
    script := anArray asStringWith: Character cr.
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   290
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   291
    "Created: / 11-07-2017 / 14:11:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   292
!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   293
177
e7bd05df3d6b Introduce new internal API `GDBDebuggerObject >> updateFrom:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 120
diff changeset
   294
updateFromIgnoredInstvarNames
e7bd05df3d6b Introduce new internal API `GDBDebuggerObject >> updateFrom:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 120
diff changeset
   295
    ^ super updateFromIgnoredInstvarNames , #(locations)
120
73877848ea7f Added support for breakpoints with multiple locations
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   296
177
e7bd05df3d6b Introduce new internal API `GDBDebuggerObject >> updateFrom:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 120
diff changeset
   297
    "Created: / 25-02-2019 / 16:25:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   298
! !
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   299
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   300
!GDBBreakpoint methodsFor:'testing'!
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   301
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   302
isEnabled
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   303
    ^ enabled
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   304
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   305
    "Created: / 07-07-2017 / 12:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   306
!
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   307
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   308
isValid
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   309
    ^ debugger isConnected
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   310
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
   311
    "Created: / 04-02-2018 / 21:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
87
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   312
! !
50e80d25ea6f Added initial support for breakppints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 81
diff changeset
   313
79
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   314
!GDBBreakpoint class methodsFor:'documentation'!
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   315
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   316
version_HG
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   317
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   318
    ^ '$Changeset: <not expanded> $'
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   319
! !
303c4edc75ad `GDBProcess` refatored to have console interpreter on STDIN/STDOUT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   320