API: add `GDBFrame >> hasSymbol` and `GDBFrame >> hasSource`
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 02 Oct 2018 10:56:33 +0100
changeset 146 50a8d9281fdc
parent 145 1256a03213cf
child 147 4b05154f2723
API: add `GDBFrame >> hasSymbol` and `GDBFrame >> hasSource`
GDBFrame.st
--- a/GDBFrame.st	Fri Sep 28 09:56:36 2018 +0100
+++ b/GDBFrame.st	Tue Oct 02 10:56:33 2018 +0100
@@ -364,6 +364,26 @@
     "Modified: / 27-09-2018 / 10:18:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!GDBFrame methodsFor:'queries'!
+
+hasSource
+    "Return `true` if a source file can is available,
+     `false` otherwise."
+
+    ^ self file notNil
+
+    "Created: / 02-10-2018 / 10:28:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hasSymbol
+    "Return `true` if GDB find a symbol (function name) 
+     for this frame's code, `false` otherwise."
+
+    ^ func notNil and:[ func ~= '??' ]
+
+    "Created: / 02-10-2018 / 09:47:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !GDBFrame methodsFor:'testing'!
 
 isValid