Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/DebugInfo-Tests/DebugInfoTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,24 @@ DebugInfoTest >> testReadLocalMethodTemporaryVariable [
equals: contextWithArguments
]

{ #category : 'tests - read variables' }
DebugInfoTest >> testReadLocalMethodTemporaryVariableFromDeadContext [

| debugInfo contextWithArguments |
contextWithArguments := thisContext copy
pc: nil;
yourself.
self assert: contextWithArguments isDead.
debugInfo := self newDebugInfoFor: contextWithArguments method.

self
shouldnt: [
debugInfo
readVariableNamed: #contextWithArguments
fromContext: contextWithArguments ]
raise: MessageNotUnderstood
]

{ #category : 'tests - read variables' }
DebugInfoTest >> testReadLocalOptimizedBlockArgumentVariable [

Expand Down
2 changes: 1 addition & 1 deletion src/DebugInfo/OnlineSourceDebugInfo.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ OnlineSourceDebugInfo >> rangeForPC: aPC [
{ #category : 'api' }
OnlineSourceDebugInfo >> readVariableNamed: aName fromContext: aContext [

^ (self debugScopeAt: aContext pc) readVariableNamed: aName fromContext: aContext
^ (self debugScopeAt: aContext currentPC) readVariableNamed: aName fromContext: aContext
]

{ #category : 'api' }
Expand Down