GDBFrame.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 27 Mar 2018 08:50:56 +0100
changeset 115 efb49f057011
parent 111 7ce18f6f18ac
child 126 fb73b0af430b
permissions -rw-r--r--
API: improved `GDBFrame >> #file` ...to try to resolve relative paths using source directories. GDB should do that but somethimes it gets confused so try ourselves in that case.
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
"
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
    21
"{ NameSpace: Smalltalk }"
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
    22
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    23
GDBDebuggerObject subclass:#GDBFrame
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
    24
	instanceVariableNames:'thread level addr func file fullname line from variables'
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'GDB-Core'
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
0ce76b671515 Some more support for stack frames.
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: 90
diff changeset
    30
!GDBFrame class methodsFor:'documentation'!
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    31
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    32
copyright
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    33
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
diff changeset
    36
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
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: 90
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: 90
diff changeset
    41
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
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: 90
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: 90
diff changeset
    46
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
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: 90
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: 90
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: 90
diff changeset
    50
"
472a4841a8b6 License this package under 'GNU Lesser General Public License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 90
diff changeset
    51
! !
71
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
    52
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
!GDBFrame class methodsFor:'accessing - GDB value descriptors'!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
45
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    55
description
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    56
    ^ (super description)
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    57
        define:#level as:Integer;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    58
        define:#func as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    59
        define:#file as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    60
        define:#fullname as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    61
        define:#line as:Integer;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    62
        define:#from as:String;
deb908479a37 Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 43
diff changeset
    63
        define:#addr as:Integer;
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
        yourself
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
    "Created: / 16-09-2014 / 23:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
    67
    "Modified: / 15-02-2018 / 08:27:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
! !
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
!GDBFrame methodsFor:'accessing'!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
addr
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
    ^ addr
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
file
115
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    77
    "Return filename (path) containing frame's function source."
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    78
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    79
    | f |
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    80
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    81
    "/ GDB/MI provides two paths, `file` and `fullname`. 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    82
    "/ 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    83
    "/ However, sometimes GDB gets confused and does not return
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    84
    "/ anything directly useful, especially when debug info contains
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    85
    "/ relative paths with multiple segments. 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    86
    "/ 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    87
    "/ As a courtesy to the user, in that case try to resolve full
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    88
    "/ path here too. Hence the code below.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    89
    "/
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    90
    "/ To avoid re-resolving of file each time this method is called,
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    91
    "/ cache resolved Filename in `fullname` instvar. 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    92
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    93
    fullname isFilename ifTrue:[ 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    94
        "/ Already resolved by the code below
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    95
        ^ fullname pathName
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    96
    ].
82
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    97
115
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    98
    f := fullname ? file.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    99
    f isNil ifTrue:[ ^ nil ].
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   100
    f := f copyReplaceAll: $/ with: Filename separator.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   101
    f := f asFilename.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   102
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   103
    "/ check, if GDB returned correctly resolved filename...
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   104
    f exists ifTrue:[
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   105
        fullname := f.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   106
        ^ fullname pathName
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   107
    ].
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   108
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   109
    "/ ...if not, try to look it up in source directories...
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   110
    self debugger directories do:[:d | 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   111
        f := d asFilename / (fullname ? file).
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   112
        f exists ifTrue:[ 
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   113
            fullname := f.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   114
            ^ fullname pathName.
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   115
        ].
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   116
    ].
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   117
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   118
    "/ ...if not found there...
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   119
    ^ nil
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   120
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   121
    "Modified: / 12-03-2018 / 10:32:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
efb49f057011 API: improved `GDBFrame >> #file`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   122
    "Modified: / 22-03-2018 / 16:52:52 / jv"
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
from
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
    ^ from
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
func
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
    ^ func
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
level
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
    ^ level
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
!
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
line
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
    ^ line
43
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   139
!
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   140
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   141
thread
22236b6d1d9a Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 41
diff changeset
   142
    ^ thread
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   143
!
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   144
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   145
variables
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   146
    self ensureIsValid.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   147
    variables isNil ifTrue:[
104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   148
        variables := GDBTransientDataHolder debugger: debugger factory:[ :old |
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   149
            | result new |
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   150
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   151
            result := debugger send: (GDBMI_stack_list_variables new arguments: (Array with: '--thread' with: thread id with: '--frame' with: level with: '--no-values')).
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   152
            new := (result propertyAt: #variables) ? #().
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   153
            old notNil ifTrue:[ 
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   154
                old size == new size ifTrue:[
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   155
                    1 to: new size do:[:i | 
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   156
                        | oldVar newVar |
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   157
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   158
                        oldVar := old at: i.
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   159
                        newVar := new at: i.
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   160
                        newVar name = oldVar name ifTrue:[ 
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   161
                            new at: i put: (old at: i)
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   162
                        ].
104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   163
                    ].
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   164
                ] ifFalse:[ 
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   165
                    "/ Sorry for this - but I'm not sure when this may happen
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   166
                    "/ so I would like get a debugger to investigate
111
7ce18f6f18ac API: added methods for querying debugger and target features
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   167
                    self breakPoint: #jv.
7ce18f6f18ac API: added methods for querying debugger and target features
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   168
                    new do:[:newVar | newVar setFrame: self ]
104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   169
                ].
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   170
            ] ifFalse:[ 
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   171
                new do:[:newVar | newVar setFrame: self ]
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   172
            ].
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   173
            new
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   174
        ].
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   175
    ].
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   176
    ^ variables value
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   177
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   178
    "Created: / 27-02-2015 / 14:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
111
7ce18f6f18ac API: added methods for querying debugger and target features
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
   179
    "Modified: / 06-02-2018 / 22:45:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
40
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
! !
0ce76b671515 Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   181
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   182
!GDBFrame methodsFor:'initialization'!
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   183
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   184
setAddr: aString
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   185
    addr := aString
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   186
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   187
    "Created: / 31-01-2018 / 09:50:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   188
!
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   189
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   190
setLevel: anInteger
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   191
    level := anInteger
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   192
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   193
    "Created: / 15-02-2018 / 08:34:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
104
4add55336dfe Variable objects: automagically update values whenever changed.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 103
diff changeset
   194
    "Created: / 02-02-2018 / 12:16:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   195
!
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   196
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   197
setLine: anInteger
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   198
    line := anInteger
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   199
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   200
    "Created: / 01-02-2018 / 10:09:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   201
!
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   202
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   203
setThread: aGDBThread
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   204
    thread := aGDBThread
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   205
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   206
    "Created: / 30-01-2018 / 15:56:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   207
! !
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   208
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   209
!GDBFrame methodsFor:'printing & storing'!
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   210
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   211
displayString
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   212
    ^ String streamContents: [ :aStream |
82
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   213
        | f |
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   214
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   215
        f := self file.
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   216
        level printOn:aStream base: 10 size: 2 fill: Character space.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   217
        aStream nextPutAll:' '.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   218
        addr printOn:aStream.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   219
        aStream nextPutAll:' '.
82
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   220
        func notNil ifTrue:[
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   221
            func printOn:aStream.
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   222
        ] ifFalse:[ 
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   223
            aStream nextPutAll: '?'
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   224
        ].
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   225
        f notNil ifTrue:[
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   226
            aStream nextPutAll:' ('.
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   227
            aStream nextPutAll: f startingAt: (f lastIndexOf: Filename separator) + 1.
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   228
            line notNil ifTrue:[
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   229
                aStream nextPutAll:':'.
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   230
                line printOn:aStream.
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   231
            ].
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   232
            aStream nextPutAll:')'.
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   233
        ].
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   234
    ].
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   235
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   236
    "Created: / 27-02-2015 / 15:20:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
82
7ee72b7a498f Added #enablePrettyPrinting and #enableFrameFilters to allow Python scripts to augment presentation
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
   237
    "Modified: / 12-06-2017 / 09:04:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   238
!
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   239
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   240
printOn:aStream
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   241
    "append a printed representation if the receiver to the argument, aStream"
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   242
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   243
    super printOn: aStream.
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   244
    aStream nextPutAll:'('.
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   245
    level printOn:aStream base: 10 size: 2 fill: Character space.
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   246
    aStream nextPutAll:' '.
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   247
    addr printOn:aStream.
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   248
    aStream nextPutAll:' '.
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   249
    func printOn:aStream.
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   250
    aStream nextPutAll:' - '.
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   251
    file printOn:aStream.
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   252
    aStream nextPutAll:':'.
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   253
    line printOn:aStream.
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   254
    aStream nextPutAll:')'.
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   255
55
437ee6413c74 Initial support for variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 51
diff changeset
   256
    "Modified: / 27-02-2015 / 15:21:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   257
! !
fb48207b6104 Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 40
diff changeset
   258
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   259
!GDBFrame methodsFor:'testing'!
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   260
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   261
isValid
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   262
    ^ thread isValid and:[addr notNil]
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   263
106
12c96f17fc53 Variable objects: invalidate variable object when thread on inferior terminates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 104
diff changeset
   264
    "Modified: / 04-02-2018 / 21:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
103
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   265
! !
56bf65352505 Variable objects: preserve the identity of `GDBFrame` and `GDBVariable` objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 91
diff changeset
   266
71
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   267
!GDBFrame class methodsFor:'documentation'!
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   268
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   269
version_HG
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   270
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   271
    ^ '$Changeset: <not expanded> $'
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   272
! !
016b716773e3 GDBFrame: fix for framew with empty variables
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 56
diff changeset
   273