Fix in transient data holder: remember the last sequence number
Due to this bug the factory was evaluated every time a holder's value
has been read. The reading routine (#value) must remember the current
sequence number when a factory is called in order to properly cache data.
--- a/GDBTransientDataHolder.st Sun Mar 08 15:48:16 2015 +0000
+++ b/GDBTransientDataHolder.st Tue Mar 10 09:07:27 2015 +0000
@@ -1,5 +1,7 @@
"{ Package: 'jv:libgdbs' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#GDBTransientDataHolder
instanceVariableNames:'debugger factory value seqno'
classVariableNames:''
@@ -7,6 +9,7 @@
category:'GDB-Private'
!
+
!GDBTransientDataHolder class methodsFor:'instance creation'!
debugger: aGDBDebugger factory: aBlock
@@ -21,10 +24,12 @@
(value notNil and:[debugger currentInferiorStateSequnceNumber == seqno]) ifTrue:[
^ value.
].
+ seqno := debugger currentInferiorStateSequnceNumber.
value := factory value.
^ value
"Created: / 17-09-2014 / 22:06:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 10-03-2015 / 00:18:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBTransientDataHolder methodsFor:'initialization'!
@@ -36,3 +41,10 @@
"Created: / 17-09-2014 / 22:08:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!GDBTransientDataHolder class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+