GDBCommand.st
changeset 222 2c06fc7c39f5
parent 94 6a4377ee1563
child 259 651864c2aa29
--- a/GDBCommand.st	Tue Mar 09 11:27:22 2021 +0000
+++ b/GDBCommand.st	Wed Mar 10 13:49:55 2021 +0000
@@ -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
@@ -92,6 +94,31 @@
     "Modified: / 11-07-2017 / 23:14:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!GDBCommand methodsFor:'hooks'!
+
+postExecuteIn: debugger result: result 
+    "This is called when a result for this command is retrieved. Subclasses
+     may override this to react on result (usually only when command succeeds).
+
+     In particular this is used to inject artificial events back onto event queue.
+     This is needed for some MI commands since the GDB does not emit events
+     (such as `=breakpoint-modified` or `=thread-selected` when the change originated
+     from MI command. This GDB behavior is very unlikely to change."
+
+    "Nothing by default"
+
+    "Created: / 09-03-2021 / 10:44:45 / Jan Vrany <jan.vrany@labware.com>"
+!
+
+preExecuteIn: debugger 
+    "This is called just before the command is sent to GDB for processing. Subclasses
+     may override this."
+
+    "Nothing by default"
+
+    "Created: / 10-03-2021 / 13:26:20 / Jan Vrany <jan.vrany@labware.com>"
+! !
+
 !GDBCommand methodsFor:'printing & storing'!
 
 printOn: aStream