GDBMI_break_condition.st
changeset 231 dcadeaddd0c8
parent 91 472a4841a8b6
child 259 651864c2aa29
--- a/GDBMI_break_condition.st	Sat May 22 16:52:20 2021 +0100
+++ b/GDBMI_break_condition.st	Mon Jun 28 12:43:27 2021 +0100
@@ -1,6 +1,7 @@
 "
 jv:libgdbs - GNU Debugger Interface Library
 Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2021 LabWare
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -33,6 +34,7 @@
 "
 jv:libgdbs - GNU Debugger Interface Library
 Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2021 LabWare
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -99,3 +101,31 @@
 	^ 'break-condition'
 ! !
 
+!GDBMI_break_condition methodsFor:'accessing-descriptors'!
+
+resultDescription
+    ^ (super resultDescription)
+        define:#bkpt as:GDBBreakpoint;
+        yourself
+
+    "Created: / 22-05-2021 / 15:28:49 / Jan Vrany <jan.vrany@labware.com>"
+! !
+
+!GDBMI_break_condition methodsFor:'hooks'!
+
+postExecuteIn: debugger result: result 
+    result isDone ifTrue: [ 
+         | breakpoint event |
+
+        breakpoint := debugger breakpointForId: arguments first.
+        breakpoint _cond: arguments second.
+
+        event := GDBBreakpointModifiedEvent new.
+        event _bkpt: (Array with: breakpoint).
+        debugger push: event     
+    ].
+
+    "Created: / 22-05-2021 / 15:31:20 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified: / 28-06-2021 / 12:29:12 / Jan Vrany <jan.vrany@labware.com>"
+! !
+