On 07/15/2011 06:33 PM, Paolo Bonzini wrote: > On 07/15/2011 06:03 PM, Ladislav Marek wrote: >> Patch should be applied in DebugTools package too (just saying to be >> sure). >> >> diff --git a/packages/debug/DebugTools.st b/packages/debug/DebugTools.st >> index cb41c3b..f7f8695 100644 >> --- a/packages/debug/DebugTools.st >> +++ b/packages/debug/DebugTools.st >> @@ -48,7 +48,7 @@ pointer bytecodes to line numbers.'> >> ifTrue: [MethodLineMapCache := WeakKeyIdentityDictionary new]. >> lineMap := MethodLineMapCache at: method >> ifAbsentPut: [method sourceCodeMap]. >> - ^lineMap at: aContext ip + 1 ifAbsent: [1] >> + ^lineMap at: aContext ip - 1 ifAbsent: [1] >> ] >> >> Debugger class>> on: aProcess [ >> > > Right, thanks!
Actually, the following fix is needed: diff --git a/kernel/ContextPart.st b/kernel/ContextPart.st index dc11dd3..9f69d60 100644 --- a/kernel/ContextPart.st +++ b/kernel/ContextPart.st @@ -125,7 +125,7 @@ methods that can be used in inspection or debugging.'> thus making the implementation faster." <category: 'debugging'> - ^self method sourceCodeMap at: self ip - 1 ifAbsent: [1] + ^self method sourceCodeMap at: (self ip - 1 max: 1) ifAbsent: [1] ] debugger [ diff --git a/packages/debug/DebugTools.st b/packages/debug/DebugTools.st index f7f8695..49033bd 100644 --- a/packages/debug/DebugTools.st +++ b/packages/debug/DebugTools.st @@ -48,7 +48,7 @@ pointer bytecodes to line numbers.'> ifTrue: [MethodLineMapCache := WeakKeyIdentityDictionary new]. lineMap := MethodLineMapCache at: method ifAbsentPut: [method sourceCodeMap]. - ^lineMap at: aContext ip - 1 ifAbsent: [1] + ^lineMap at: (aContext ip - 1 max: 1) ifAbsent: [1] ] Debugger class >> on: aProcess [ Otherwise the DebugTools testsuite (correctly) fails. Paolo _______________________________________________ help-smalltalk mailing list help-smalltalk@gnu.org https://lists.gnu.org/mailman/listinfo/help-smalltalk