diff -r 258bf0b2317c -r 73877848ea7f GDBBreakpoint.st --- a/GDBBreakpoint.st Tue Apr 03 21:19:35 2018 +0100 +++ b/GDBBreakpoint.st Wed May 23 10:22:36 2018 +0100 @@ -22,7 +22,7 @@ GDBDebuggerObject subclass:#GDBBreakpoint instanceVariableNames:'number type disp enabled addr func file fullname line times - condition script' + condition script locations' classVariableNames:'' poolDictionaries:'' category:'GDB-Core' @@ -55,7 +55,7 @@ description ^ (super description) - define:#number as:Integer; + define:#number as:String; define:#type as:String; define:#disp as:String; define:#enabled as:Boolean; @@ -68,6 +68,7 @@ yourself "Created: / 06-09-2014 / 01:56:34 / Jan Vrany " + "Modified: / 18-05-2018 / 12:38:42 / Jan Vrany " ! ! !GDBBreakpoint methodsFor:'accessing'! @@ -129,6 +130,24 @@ ^ line ! +locations + locations isNil ifTrue:[ ^ Array with: self ]. + ^ locations + + "Modified: / 18-05-2018 / 12:23:14 / Jan Vrany " +! + +locations:aCollection + self assert: aCollection isCollection. + self assert: (aCollection allSatisfy:[:e|e isKindOf: GDBBreakpoint]). + self assert: (aCollection allSatisfy:[:e|e number startsWith: number , '.']). + + locations := aCollection. + locations do:[:e|e setDebugger: debugger]. + + "Modified: / 18-05-2018 / 15:01:25 / Jan Vrany " +! + number ^ number ! @@ -178,6 +197,17 @@ "Modified: / 06-06-2017 / 09:19:01 / Jan Vrany " ! ! +!GDBBreakpoint methodsFor:'initialization & release'! + +setDebugger: aGDBDebugger + super setDebugger: aGDBDebugger. + locations notEmptyOrNil ifTrue:[ + locations do:[:e | e setDebugger: debugger ] + ]. + + "Created: / 18-05-2018 / 15:00:37 / Jan Vrany " +! ! + !GDBBreakpoint methodsFor:'inspecting'! inspector2TabCondition @@ -262,14 +292,20 @@ ! updateFrom: aGDBBreakpoint + | ignored | + self assert: number = aGDBBreakpoint number. + ignored := self class instVarIndexFor: #locations. self class superclass instSize + 1 to: self class instSize do:[:i | - self instVarAt: i put: (aGDBBreakpoint instVarAt: i). + i ~~ ignored ifTrue:[ + self instVarAt: i put: (aGDBBreakpoint instVarAt: i). + ]. ]. properties := aGDBBreakpoint properties. "Created: / 06-07-2017 / 16:30:02 / Jan Vrany " "Modified: / 15-01-2018 / 23:12:02 / jv" + "Modified: / 18-05-2018 / 21:44:34 / Jan Vrany " ! ! !GDBBreakpoint methodsFor:'testing'!