Initial support for VDB python-based variable objects
Due to a limitation of GDB itself, one cannot create variable
object for "synthetic" argument/local created by custom frame
decorator. Therefore one cannot "dig deeper" and inspect contents
of such a variable in case it is a kind of composite - like an
object on a heap referring to another objects.
This is a problem when a debugee is does not have debug information
and / or it's language is not C - such as when debugging JITed code.
This (experimental) commit adds a parallel implementation of variable
objects done completely in python. This new varobj MI interface is a
super-set of GDB's builtin varobj MI interface.
--- a/Make.proto Mon Jul 08 12:37:49 2019 +0100
+++ b/Make.proto Mon Jul 08 13:31:11 2019 +0100
@@ -149,11 +149,20 @@
$(OUTDIR)VDBEvaluator.$(O) VDBEvaluator.$(C) VDBEvaluator.$(H): VDBEvaluator.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBIconLibrary.$(O) VDBIconLibrary.$(C) VDBIconLibrary.$(H): VDBIconLibrary.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionBasicBlock.$(O) VDBInstructionBasicBlock.$(C) VDBInstructionBasicBlock.$(H): VDBInstructionBasicBlock.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_create.$(O) VDBMI_vdb_var_create.$(C) VDBMI_vdb_var_create.$(H): VDBMI_vdb_var_create.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_create.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_delete.$(O) VDBMI_vdb_var_delete.$(C) VDBMI_vdb_var_delete.$(H): VDBMI_vdb_var_delete.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_delete.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_evaluate_expression.$(O) VDBMI_vdb_var_evaluate_expression.$(C) VDBMI_vdb_var_evaluate_expression.$(H): VDBMI_vdb_var_evaluate_expression.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_evaluate_expression.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_info_path_expression.$(O) VDBMI_vdb_var_info_path_expression.$(C) VDBMI_vdb_var_info_path_expression.$(H): VDBMI_vdb_var_info_path_expression.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_info_path_expression.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_list_children.$(O) VDBMI_vdb_var_list_children.$(C) VDBMI_vdb_var_list_children.$(H): VDBMI_vdb_var_list_children.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_list_children.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_set_visualizer.$(O) VDBMI_vdb_var_set_visualizer.$(C) VDBMI_vdb_var_set_visualizer.$(H): VDBMI_vdb_var_set_visualizer.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_set_visualizer.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_update.$(O) VDBMI_vdb_var_update.$(C) VDBMI_vdb_var_update.$(H): VDBMI_vdb_var_update.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_update.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBScatchPadApplication.$(O) VDBScatchPadApplication.$(C) VDBScatchPadApplication.$(H): VDBScatchPadApplication.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/MultiViewToolApplication.$(H) $(INCLUDE_TOP)/stx/libtool/WorkspaceApplication.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libview2/ToolApplicationModel.$(H) $(STCHDR)
$(OUTDIR)VDBSettingsApplication.$(O) VDBSettingsApplication.$(C) VDBSettingsApplication.$(H): VDBSettingsApplication.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/AbstractSettingsApplication.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
$(OUTDIR)VDBSimpleConsoleView.$(O) VDBSimpleConsoleView.$(C) VDBSimpleConsoleView.$(H): VDBSimpleConsoleView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextView.$(H) $(INCLUDE_TOP)/stx/libwidg/ListView.$(H) $(INCLUDE_TOP)/stx/libwidg/TextCollector.$(H) $(INCLUDE_TOP)/stx/libwidg/TextView.$(H) $(STCHDR)
$(OUTDIR)VDBStartup.$(O) VDBStartup.$(C) VDBStartup.$(H): VDBStartup.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/StandaloneStartup.$(H) $(STCHDR)
$(OUTDIR)VDBTerminalView.$(O) VDBTerminalView.$(C) VDBTerminalView.$(H): VDBTerminalView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextView.$(H) $(INCLUDE_TOP)/stx/libwidg/ListView.$(H) $(INCLUDE_TOP)/stx/libwidg/TextCollector.$(H) $(INCLUDE_TOP)/stx/libwidg/TextView.$(H) $(INCLUDE_TOP)/stx/libwidg2/TerminalView.$(H) $(INCLUDE_TOP)/stx/libwidg2/VT100TerminalView.$(H) $(STCHDR)
+$(OUTDIR)VDBVariableObject.$(O) VDBVariableObject.$(C) VDBVariableObject.$(H): VDBVariableObject.st $(INCLUDE_TOP)/jv/libgdbs/GDBDebuggerObject.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBObject.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBVariableObject.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBVariableObjectExecutor.$(O) VDBVariableObjectExecutor.$(C) VDBVariableObjectExecutor.$(H): VDBVariableObjectExecutor.st $(INCLUDE_TOP)/jv/libgdbs/GDBDebuggerObject.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBObject.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBVariableObjectExecutor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBVirtualMemoryMap.$(O) VDBVirtualMemoryMap.$(C) VDBVirtualMemoryMap.$(H): VDBVirtualMemoryMap.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBVirtualMemoryRegion.$(O) VDBVirtualMemoryRegion.$(C) VDBVirtualMemoryRegion.$(H): VDBVirtualMemoryRegion.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)jv_vdb.$(O) jv_vdb.$(C) jv_vdb.$(H): jv_vdb.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
@@ -169,6 +178,7 @@
$(OUTDIR)VDBFramePresenter.$(O) VDBFramePresenter.$(C) VDBFramePresenter.$(H): VDBFramePresenter.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractPresenter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionPresenter.$(O) VDBInstructionPresenter.$(C) VDBInstructionPresenter.$(H): VDBInstructionPresenter.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractPresenter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionsAndSourcePresenter.$(O) VDBInstructionsAndSourcePresenter.$(C) VDBInstructionsAndSourcePresenter.$(H): VDBInstructionsAndSourcePresenter.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractPresenter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_duplicate.$(O) VDBMI_vdb_var_duplicate.$(C) VDBMI_vdb_var_duplicate.$(H): VDBMI_vdb_var_duplicate.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMICommand.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBMI_var_create.$(H) $(INCLUDE_TOP)/jv/vdb/VDBMI_vdb_var_create.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBMemoryApplication.$(O) VDBMemoryApplication.$(C) VDBMemoryApplication.$(H): VDBMemoryApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
$(OUTDIR)VDBRegisterPresenter.$(O) VDBRegisterPresenter.$(C) VDBRegisterPresenter.$(H): VDBRegisterPresenter.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractPresenter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)VDBSourceApplication.$(O) VDBSourceApplication.$(C) VDBSourceApplication.$(H): VDBSourceApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
--- a/Make.spec Mon Jul 08 12:37:49 2019 +0100
+++ b/Make.spec Mon Jul 08 13:31:11 2019 +0100
@@ -58,11 +58,20 @@
VDBEvaluator \
VDBIconLibrary \
VDBInstructionBasicBlock \
+ VDBMI_vdb_var_create \
+ VDBMI_vdb_var_delete \
+ VDBMI_vdb_var_evaluate_expression \
+ VDBMI_vdb_var_info_path_expression \
+ VDBMI_vdb_var_list_children \
+ VDBMI_vdb_var_set_visualizer \
+ VDBMI_vdb_var_update \
VDBScatchPadApplication \
VDBSettingsApplication \
VDBSimpleConsoleView \
VDBStartup \
VDBTerminalView \
+ VDBVariableObject \
+ VDBVariableObjectExecutor \
VDBVirtualMemoryMap \
VDBVirtualMemoryRegion \
jv_vdb \
@@ -78,6 +87,7 @@
VDBFramePresenter \
VDBInstructionPresenter \
VDBInstructionsAndSourcePresenter \
+ VDBMI_vdb_var_duplicate \
VDBMemoryApplication \
VDBRegisterPresenter \
VDBSourceApplication \
@@ -112,11 +122,20 @@
$(OUTDIR)VDBEvaluator.$(O) \
$(OUTDIR)VDBIconLibrary.$(O) \
$(OUTDIR)VDBInstructionBasicBlock.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_create.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_delete.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_evaluate_expression.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_info_path_expression.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_list_children.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_set_visualizer.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_update.$(O) \
$(OUTDIR)VDBScatchPadApplication.$(O) \
$(OUTDIR)VDBSettingsApplication.$(O) \
$(OUTDIR)VDBSimpleConsoleView.$(O) \
$(OUTDIR)VDBStartup.$(O) \
$(OUTDIR)VDBTerminalView.$(O) \
+ $(OUTDIR)VDBVariableObject.$(O) \
+ $(OUTDIR)VDBVariableObjectExecutor.$(O) \
$(OUTDIR)VDBVirtualMemoryMap.$(O) \
$(OUTDIR)VDBVirtualMemoryRegion.$(O) \
$(OUTDIR)jv_vdb.$(O) \
@@ -132,6 +151,7 @@
$(OUTDIR)VDBFramePresenter.$(O) \
$(OUTDIR)VDBInstructionPresenter.$(O) \
$(OUTDIR)VDBInstructionsAndSourcePresenter.$(O) \
+ $(OUTDIR)VDBMI_vdb_var_duplicate.$(O) \
$(OUTDIR)VDBMemoryApplication.$(O) \
$(OUTDIR)VDBRegisterPresenter.$(O) \
$(OUTDIR)VDBSourceApplication.$(O) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_create.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,50 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_create subclass:#VDBMI_vdb_var_create
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_create class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_create methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-create'
+
+ "Created: / 06-07-2019 / 01:25:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBMI_vdb_var_create methodsFor:'accessing-descriptors'!
+
+resultDescription
+ ^ GDBMAContainer new
+ define: #result as: VDBVariableObject;
+ yourself
+
+ "Created: / 06-07-2019 / 01:28:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_delete.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,40 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_delete subclass:#VDBMI_vdb_var_delete
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_delete class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_delete methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-delete'
+
+ "Created: / 06-07-2019 / 01:25:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_duplicate.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,40 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+VDBMI_vdb_var_create subclass:#VDBMI_vdb_var_duplicate
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_duplicate class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_duplicate methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-duplicate'
+
+ "Created: / 08-07-2019 / 16:49:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_evaluate_expression.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,40 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_evaluate_expression subclass:#VDBMI_vdb_var_evaluate_expression
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_evaluate_expression class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_evaluate_expression methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-evaluate-expression'
+
+ "Created: / 06-07-2019 / 01:25:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_info_path_expression.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,40 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_info_path_expression subclass:#VDBMI_vdb_var_info_path_expression
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_info_path_expression class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_info_path_expression methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-info-path-expression'
+
+ "Created: / 06-07-2019 / 01:25:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_list_children.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,52 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_list_children subclass:#VDBMI_vdb_var_list_children
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_list_children class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_list_children methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-list-children'
+
+ "Created: / 06-07-2019 / 01:25:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBMI_vdb_var_list_children methodsFor:'accessing-descriptors'!
+
+resultDescription
+ ^ (super resultDescription)
+ define:#result
+ as:Array
+ of:VDBVariableObject;
+ yourself
+
+ "Created: / 08-07-2019 / 16:16:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_set_visualizer.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,40 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_set_visualizer subclass:#VDBMI_vdb_var_set_visualizer
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_set_visualizer class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_set_visualizer methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-set-visualizer'
+
+ "Created: / 06-07-2019 / 01:25:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBMI_vdb_var_update.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,40 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBMI_var_update subclass:#VDBMI_vdb_var_update
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Commands'
+!
+
+!VDBMI_vdb_var_update class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBMI_vdb_var_update methodsFor:'accessing'!
+
+operation
+ ^ 'vdb-var-update'
+
+ "Created: / 06-07-2019 / 01:26:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/VDBSimpleConsoleView.st Mon Jul 08 12:37:49 2019 +0100
+++ b/VDBSimpleConsoleView.st Mon Jul 08 13:31:11 2019 +0100
@@ -93,15 +93,12 @@
self insertStringAtCursor: insertion.
bufferPosition := bufferPosition + insertion size.
] ifFalse:[
- self breakPoint: #jv
- ].
- matches size > 1 ifTrue:[
- self flash.
- ].
+ self breakpoint: #jv
+ ]
]
"Created: / 12-06-2019 / 18:28:09 / jv"
- "Modified: / 25-06-2019 / 17:02:28 / jv"
+ "Modified: / 12-06-2019 / 19:54:15 / jv"
!
completionsShow
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBVariableObject.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,260 @@
+"{ Encoding: utf8 }"
+
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBVariableObject subclass:#VDBVariableObject
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core'
+!
+
+!VDBVariableObject class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBVariableObject class methodsFor:'utilities'!
+
+evaluate: expression in: frame using: debugger
+ "Evaluates passed `expression` (in target language). If
+ `frame` (as `GDBFrame`) is given, evaluate expression in
+ context of that `frame`.
+
+ Returns the result as `VDBVariableObject`."
+
+ | result varobj |
+
+ frame notNil ifTrue:[
+ result := debugger send: (VDBMI_vdb_var_create new arguments: (Array with: '--thread' with: frame thread id with: '--frame' with: frame level with: '-' with: '*' with: expression)).
+ ] ifFalse:[
+ result := debugger send: (VDBMI_vdb_var_create new arguments: (Array with: '-' with: '*' with: expression)).
+ ].
+ varobj := result propertyAt: #result.
+ varobj
+ setDebugger: debugger;
+ setExpression: expression;
+ setFrame: frame;
+ registerForFinalization.
+ ^ varobj
+
+ "Created: / 06-07-2019 / 01:04:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBVariableObject methodsFor:'accessing'!
+
+children
+ self isValid ifFalse:[ ^ #() ].
+ children isNil ifTrue:[
+ (self isValid and:[has_more or:[ numchild isNil or:[numchild > 0]]]) ifTrue:[
+ | result |
+
+ result := debugger send: (VDBMI_vdb_var_list_children arguments: (Array with: '--all-values' with: name)).
+ children := (result propertyAt: #result) ? #().
+ children do:[:each | each setDebugger: debugger; setParent: self ].
+ numchild := children size.
+ ] ifFalse:[
+ children := #().
+ ].
+ ].
+ ^ children
+
+ "Created: / 06-07-2019 / 00:39:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-07-2019 / 15:56:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+path
+ "Return (absolute) expression in target language to access the value
+ (asDtring).
+
+ For example, consider
+
+ typedef struct _point {
+ int x;
+ int y;
+ } point;
+ ...
+ point p1 = { 10, 20 };
+
+ and consider a variable object `o` that represents `y` member of point
+ `p1`. Then:
+
+ o path '/ -> 'p1.y'
+
+ while
+
+ p expression '/ -> 'y'
+
+ "
+
+ "/ Raise an error early when #path is requested for a child of dynamic
+ "/ varobj. Thie is not supported by GDB.
+ "/
+ "/ Although GDB should report an error [1], dur to a bug it report
+ "/ either wrong (nonsense) value or crashes. A patch has been send
+ "/ to the upstream [2], but meanwhile, check here as well in case someone
+ "/ uses this with older / not yet patches version of GDB.
+ "/
+ "/ [1]: https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html
+ "/ [2]: https://sourceware.org/ml/gdb-patches/2018-06/msg00058.html
+ "/
+ (parent notNil and:[parent isDynamic]) ifTrue:[
+ GDBError signal: 'Invalid varobj, #path is not supported for children of a dynamic varobjs'.
+ ^ self
+ ].
+
+ path isNil ifTrue:[
+ | result |
+
+ result := debugger send: (VDBMI_vdb_var_info_path_expression arguments: (Array with: name)).
+ path := result propertyAt: #'result'.
+ ].
+ ^ path
+
+ "Created: / 06-07-2019 / 00:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-07-2019 / 15:56:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+valueFormatted: aGDBOutputFormat
+ "Return the value formatted using given format (as String)
+
+ Supported formats are:
+ * FormatSignedDecimal
+ * FormatHexadecimal
+ * FormatOctal
+ * FormatPaddedHexadecimal
+
+ To get the value in 'natural' format use plain #value
+ rather than #valueFormatted:
+ "
+
+ | format result |
+
+ aGDBOutputFormat == FormatBinary ifTrue:[
+ format := 'binary'
+ ] ifFalse:[aGDBOutputFormat == FormatSignedDecimal ifTrue:[
+ format := 'decimal'
+ ] ifFalse:[aGDBOutputFormat == FormatHexadecimal ifTrue:[
+ format := 'hexadecimal'
+ ] ifFalse:[aGDBOutputFormat == FormatOctal ifTrue:[
+ format := 'octal'
+ ] ifFalse:[aGDBOutputFormat == FormatPaddedHexadecimal ifTrue:[
+ format := 'zero-hexadecimal'
+ ] ifFalse:[
+ GDBError signal: 'Unsupported format: ', aGDBOutputFormat displayString
+ ]]]]].
+
+ result := debugger send: (self commandVarEvaluateExpression arguments: (Array with: '-f' with: format with: name)).
+ ^ result value
+
+ "Created: / 06-07-2019 / 00:40:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+visualizer: aString
+ "Set a visualizer for the variable object. `aString` is the
+ visualizer to use. The special value ‘None’ means to disable
+ any visualizer in use.
+
+ If not ‘None’, `aString` must be a Python expression. This expression
+ must evaluate to a callable object which accepts a single argument.
+
+ See https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html
+ "
+ |result |
+
+ self assert: (debugger isPrettyPrintingEnabled or:[ aString = 'None' ]).
+ self visualizer = aString ifTrue:[
+ "/ Already set, no need to do anything.
+ ^ self
+ ].
+ result := debugger send: (VDBMI_vdb_var_set_visualizer arguments: (Array with: name with: aString)) andWait: true.
+ result isDone ifTrue:[
+ visualizer := aString.
+ "/ Since we have changed the visualizer, children
+ "/ may have changed too. Delete them and recreate
+ "/ them on demand (see #children)
+ numchild := nil.
+ children notNil ifTrue:[
+ children do:[:child | child release ].
+ children := nil.
+ ].
+ ].
+
+ "Created: / 06-07-2019 / 00:41:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBVariableObject methodsFor:'copying'!
+
+duplicate
+ "Create and returns a duplicate of the receiver, representing
+ the same value. Other than that the returned duplicate is completely
+ independent"
+
+ | result varobj |
+
+ result := debugger send: (VDBMI_vdb_var_duplicate arguments: (Array with: name)).
+ varobj := result propertyAt: #result.
+ varobj
+ setDebugger: debugger;
+ setExpression: self expression;
+ setFrame: self frame;
+ registerForFinalization.
+ ^ varobj
+
+ "Created: / 06-07-2019 / 00:45:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-07-2019 / 16:52:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBVariableObject methodsFor:'updating'!
+
+updateChanged
+ "Check for updates and update all changed variables accordingly."
+
+ debugger isNil ifTrue:[
+ changed := false.
+ ^ false.
+ ].
+
+ "/ If the thread is running, we cannot check for updates...
+ (frame notNil and:[frame thread isRunning]) ifTrue:[
+ ^ false
+ ].
+
+ (self thread notNil and:[ self thread isValid not]) ifTrue:[
+ self release.
+ ^ true
+ ].
+
+ parent notNil ifTrue:[
+ parent updateChanged
+ ] ifFalse:[
+ | result changelist |
+
+ result := debugger send: (VDBMI_vdb_var_update arguments: (Array with: '--all-values' with: name)).
+ changelist := result propertyAt: #result.
+ self updateChanged: changelist.
+ ].
+ ^ false
+
+ "Created: / 06-07-2019 / 00:41:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-07-2019 / 15:56:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBVariableObjectExecutor.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,49 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBVariableObjectExecutor subclass:#VDBVariableObjectExecutor
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core'
+!
+
+!VDBVariableObjectExecutor class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBVariableObjectExecutor methodsFor:'finalization'!
+
+finalize
+ debugger isConnected ifTrue:[
+ debugger send: (VDBMI_vdb_var_delete arguments: (Array with: '-c' with: name))
+ ].
+
+ "Created: / 06-07-2019 / 00:37:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBVariableObjectExecutor class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/abbrev.stc Mon Jul 08 12:37:49 2019 +0100
+++ b/abbrev.stc Mon Jul 08 13:31:11 2019 +0100
@@ -8,11 +8,20 @@
VDBEvaluator VDBEvaluator jv:vdb 'VDB-Tools' 0
VDBIconLibrary VDBIconLibrary jv:vdb 'VDB-UI-Support' 0
VDBInstructionBasicBlock VDBInstructionBasicBlock jv:vdb 'VDB-UI-Support' 0
+VDBMI_vdb_var_create VDBMI_vdb_var_create jv:vdb 'VDB-Core-Commands' 0
+VDBMI_vdb_var_delete VDBMI_vdb_var_delete jv:vdb 'VDB-Core-Commands' 0
+VDBMI_vdb_var_evaluate_expression VDBMI_vdb_var_evaluate_expression jv:vdb 'VDB-Core-Commands' 0
+VDBMI_vdb_var_info_path_expression VDBMI_vdb_var_info_path_expression jv:vdb 'VDB-Core-Commands' 0
+VDBMI_vdb_var_list_children VDBMI_vdb_var_list_children jv:vdb 'VDB-Core-Commands' 0
+VDBMI_vdb_var_set_visualizer VDBMI_vdb_var_set_visualizer jv:vdb 'VDB-Core-Commands' 0
+VDBMI_vdb_var_update VDBMI_vdb_var_update jv:vdb 'VDB-Core-Commands' 0
VDBScatchPadApplication VDBScatchPadApplication jv:vdb 'VDB-UI-Others' 8
VDBSettingsApplication VDBSettingsApplication jv:vdb 'VDB-UI-Others' 2
VDBSimpleConsoleView VDBSimpleConsoleView jv:vdb 'VDB-UI-Console' 2
VDBStartup VDBStartup jv:vdb 'VDB-UI' 1
VDBTerminalView VDBTerminalView jv:vdb 'VDB-UI-Console-Unix' 2
+VDBVariableObject VDBVariableObject jv:vdb 'VDB-Core' 0
+VDBVariableObjectExecutor VDBVariableObjectExecutor jv:vdb 'VDB-Core' 0
VDBVirtualMemoryMap VDBVirtualMemoryMap jv:vdb 'VDB-Tools' 0
VDBVirtualMemoryRegion VDBVirtualMemoryRegion jv:vdb 'VDB-Tools' 0
jv_vdb jv_vdb jv:vdb '* Projects & Packages *' 3
@@ -28,6 +37,7 @@
VDBFramePresenter VDBFramePresenter jv:vdb 'VDB-Presentation' 0
VDBInstructionPresenter VDBInstructionPresenter jv:vdb 'VDB-Presentation' 0
VDBInstructionsAndSourcePresenter VDBInstructionsAndSourcePresenter jv:vdb 'VDB-Presentation' 0
+VDBMI_vdb_var_duplicate VDBMI_vdb_var_duplicate jv:vdb 'VDB-Core-Commands' 0
VDBMemoryApplication VDBMemoryApplication jv:vdb 'VDB-UI-Others' 2
VDBRegisterPresenter VDBRegisterPresenter jv:vdb 'VDB-Presentation' 0
VDBSourceApplication VDBSourceApplication jv:vdb 'VDB-UI-Source' 2
--- a/application/Make.proto Mon Jul 08 12:37:49 2019 +0100
+++ b/application/Make.proto Mon Jul 08 13:31:11 2019 +0100
@@ -73,11 +73,12 @@
libstx_goodies_magritte \
libstx_libhtml \
libstx_libwidg2 \
+ libstx_libtool \
+ libjv_libgdbs \
+ libstx_goodies_communication \
+ libstx_libtool2 \
libstx_libcompat \
- libstx_libtool \
libstx_goodies_xml_vw \
- libjv_libgdbs \
- libstx_libtool2 \
libjv_vdb \
@@ -95,11 +96,12 @@
$(TOP)/goodies/magritte/libstx_goodies_magritte$(O_EXT) \
$(TOP)/libhtml/libstx_libhtml$(O_EXT) \
$(TOP)/libwidg2/libstx_libwidg2$(O_EXT) \
+ $(TOP)/libtool/libstx_libtool$(O_EXT) \
+ ../../libgdbs/libjv_libgdbs$(O_EXT) \
+ $(TOP)/goodies/communication/libstx_goodies_communication$(O_EXT) \
+ $(TOP)/libtool2/libstx_libtool2$(O_EXT) \
$(TOP)/libcompat/libstx_libcompat$(O_EXT) \
- $(TOP)/libtool/libstx_libtool$(O_EXT) \
$(TOP)/goodies/xml/vw/libstx_goodies_xml_vw$(O_EXT) \
- ../../libgdbs/libjv_libgdbs$(O_EXT) \
- $(TOP)/libtool2/libstx_libtool2$(O_EXT) \
..//libjv_vdb$(O_EXT) \
@@ -117,11 +119,12 @@
libstx_goodies_magritte$(O_EXT) \
libstx_libhtml$(O_EXT) \
libstx_libwidg2$(O_EXT) \
+ libstx_libtool$(O_EXT) \
+ libjv_libgdbs$(O_EXT) \
+ libstx_goodies_communication$(O_EXT) \
+ libstx_libtool2$(O_EXT) \
libstx_libcompat$(O_EXT) \
- libstx_libtool$(O_EXT) \
libstx_goodies_xml_vw$(O_EXT) \
- libjv_libgdbs$(O_EXT) \
- libstx_libtool2$(O_EXT) \
libjv_vdb$(O_EXT) \
@@ -489,19 +492,6 @@
$(TOP)/libwidg2/makefile: $(TOP)/libwidg2/Make.proto
$(TOP)/rules/stmkmf --cd $(TOP)/libwidg2
-libstx_libcompat.so: $(TOP)/libcompat/libstx_libcompat.so
- ln -sf $(TOP)/libcompat/libstx_libcompat.so .
-
-$(TOP)/libcompat/libstx_libcompat.so: $(TOP)/libcompat/makefile $(FORCE)
- @if [ -f "$(TOP)/libcompat/.NOSOURCE" ]; then \
- echo "skip make in $(TOP)/libcompat (no source)"; \
- else \
- cd $(TOP)/libcompat && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
- fi
-
-$(TOP)/libcompat/makefile: $(TOP)/libcompat/Make.proto
- $(TOP)/rules/stmkmf --cd $(TOP)/libcompat
-
libstx_libtool.so: $(TOP)/libtool/libstx_libtool.so
ln -sf $(TOP)/libtool/libstx_libtool.so .
@@ -515,19 +505,6 @@
$(TOP)/libtool/makefile: $(TOP)/libtool/Make.proto
$(TOP)/rules/stmkmf --cd $(TOP)/libtool
-libstx_goodies_xml_vw.so: $(TOP)/goodies/xml/vw/libstx_goodies_xml_vw.so
- ln -sf $(TOP)/goodies/xml/vw/libstx_goodies_xml_vw.so .
-
-$(TOP)/goodies/xml/vw/libstx_goodies_xml_vw.so: $(TOP)/goodies/xml/vw/makefile $(FORCE)
- @if [ -f "$(TOP)/goodies/xml/vw/.NOSOURCE" ]; then \
- echo "skip make in $(TOP)/goodies/xml/vw (no source)"; \
- else \
- cd $(TOP)/goodies/xml/vw && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
- fi
-
-$(TOP)/goodies/xml/vw/makefile: $(TOP)/goodies/xml/vw/Make.proto
- $(TOP)/rules/stmkmf --cd $(TOP)/goodies/xml/vw
-
libjv_libgdbs.so: ../../libgdbs/libjv_libgdbs.so
ln -sf ../../libgdbs/libjv_libgdbs.so .
@@ -541,6 +518,19 @@
../../libgdbs/makefile: ../../libgdbs/Make.proto
$(TOP)/rules/stmkmf --cd ../../libgdbs
+libstx_goodies_communication.so: $(TOP)/goodies/communication/libstx_goodies_communication.so
+ ln -sf $(TOP)/goodies/communication/libstx_goodies_communication.so .
+
+$(TOP)/goodies/communication/libstx_goodies_communication.so: $(TOP)/goodies/communication/makefile $(FORCE)
+ @if [ -f "$(TOP)/goodies/communication/.NOSOURCE" ]; then \
+ echo "skip make in $(TOP)/goodies/communication (no source)"; \
+ else \
+ cd $(TOP)/goodies/communication && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
+ fi
+
+$(TOP)/goodies/communication/makefile: $(TOP)/goodies/communication/Make.proto
+ $(TOP)/rules/stmkmf --cd $(TOP)/goodies/communication
+
libstx_libtool2.so: $(TOP)/libtool2/libstx_libtool2.so
ln -sf $(TOP)/libtool2/libstx_libtool2.so .
@@ -554,6 +544,32 @@
$(TOP)/libtool2/makefile: $(TOP)/libtool2/Make.proto
$(TOP)/rules/stmkmf --cd $(TOP)/libtool2
+libstx_libcompat.so: $(TOP)/libcompat/libstx_libcompat.so
+ ln -sf $(TOP)/libcompat/libstx_libcompat.so .
+
+$(TOP)/libcompat/libstx_libcompat.so: $(TOP)/libcompat/makefile $(FORCE)
+ @if [ -f "$(TOP)/libcompat/.NOSOURCE" ]; then \
+ echo "skip make in $(TOP)/libcompat (no source)"; \
+ else \
+ cd $(TOP)/libcompat && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
+ fi
+
+$(TOP)/libcompat/makefile: $(TOP)/libcompat/Make.proto
+ $(TOP)/rules/stmkmf --cd $(TOP)/libcompat
+
+libstx_goodies_xml_vw.so: $(TOP)/goodies/xml/vw/libstx_goodies_xml_vw.so
+ ln -sf $(TOP)/goodies/xml/vw/libstx_goodies_xml_vw.so .
+
+$(TOP)/goodies/xml/vw/libstx_goodies_xml_vw.so: $(TOP)/goodies/xml/vw/makefile $(FORCE)
+ @if [ -f "$(TOP)/goodies/xml/vw/.NOSOURCE" ]; then \
+ echo "skip make in $(TOP)/goodies/xml/vw (no source)"; \
+ else \
+ cd $(TOP)/goodies/xml/vw && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "; \
+ fi
+
+$(TOP)/goodies/xml/vw/makefile: $(TOP)/goodies/xml/vw/Make.proto
+ $(TOP)/rules/stmkmf --cd $(TOP)/goodies/xml/vw
+
libjv_vdb.so: ..//libjv_vdb.so
ln -sf ..//libjv_vdb.so .
--- a/application/bc.mak Mon Jul 08 12:37:49 2019 +0100
+++ b/application/bc.mak Mon Jul 08 13:31:11 2019 +0100
@@ -100,11 +100,12 @@
libstx_goodies_magritte.dll \
libstx_libhtml.dll \
libstx_libwidg2.dll \
+ libstx_libtool.dll \
+ libjv_libgdbs.dll \
+ libstx_goodies_communication.dll \
+ libstx_libtool2.dll \
libstx_libcompat.dll \
- libstx_libtool.dll \
libstx_goodies_xml_vw.dll \
- libjv_libgdbs.dll \
- libstx_libtool2.dll \
libjv_vdb.dll \
@@ -390,36 +391,42 @@
..\..\..\stx\libwidg2\$(OBJDIR)\libstx_libwidg2.dll: $(FORCE)
pushd ..\..\..\stx\libwidg2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
-libstx_libcompat.dll: ..\..\..\stx\libcompat\$(OBJDIR)\libstx_libcompat.dll
- copy ..\..\..\stx\libcompat\$(OBJDIR)\libstx_libcompat.dll *.*
-
-..\..\..\stx\libcompat\$(OBJDIR)\libstx_libcompat.dll: $(FORCE)
- pushd ..\..\..\stx\libcompat & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
-
libstx_libtool.dll: ..\..\..\stx\libtool\$(OBJDIR)\libstx_libtool.dll
copy ..\..\..\stx\libtool\$(OBJDIR)\libstx_libtool.dll *.*
..\..\..\stx\libtool\$(OBJDIR)\libstx_libtool.dll: $(FORCE)
pushd ..\..\..\stx\libtool & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
-libstx_goodies_xml_vw.dll: ..\..\..\stx\goodies\xml\vw\$(OBJDIR)\libstx_goodies_xml_vw.dll
- copy ..\..\..\stx\goodies\xml\vw\$(OBJDIR)\libstx_goodies_xml_vw.dll *.*
-
-..\..\..\stx\goodies\xml\vw\$(OBJDIR)\libstx_goodies_xml_vw.dll: $(FORCE)
- pushd ..\..\..\stx\goodies\xml\vw & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
-
libjv_libgdbs.dll: ..\..\libgdbs\$(OBJDIR)\libjv_libgdbs.dll
copy ..\..\libgdbs\$(OBJDIR)\libjv_libgdbs.dll *.*
..\..\libgdbs\$(OBJDIR)\libjv_libgdbs.dll: $(FORCE)
pushd ..\..\libgdbs & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+libstx_goodies_communication.dll: ..\..\..\stx\goodies\communication\$(OBJDIR)\libstx_goodies_communication.dll
+ copy ..\..\..\stx\goodies\communication\$(OBJDIR)\libstx_goodies_communication.dll *.*
+
+..\..\..\stx\goodies\communication\$(OBJDIR)\libstx_goodies_communication.dll: $(FORCE)
+ pushd ..\..\..\stx\goodies\communication & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
libstx_libtool2.dll: ..\..\..\stx\libtool2\$(OBJDIR)\libstx_libtool2.dll
copy ..\..\..\stx\libtool2\$(OBJDIR)\libstx_libtool2.dll *.*
..\..\..\stx\libtool2\$(OBJDIR)\libstx_libtool2.dll: $(FORCE)
pushd ..\..\..\stx\libtool2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+libstx_libcompat.dll: ..\..\..\stx\libcompat\$(OBJDIR)\libstx_libcompat.dll
+ copy ..\..\..\stx\libcompat\$(OBJDIR)\libstx_libcompat.dll *.*
+
+..\..\..\stx\libcompat\$(OBJDIR)\libstx_libcompat.dll: $(FORCE)
+ pushd ..\..\..\stx\libcompat & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+libstx_goodies_xml_vw.dll: ..\..\..\stx\goodies\xml\vw\$(OBJDIR)\libstx_goodies_xml_vw.dll
+ copy ..\..\..\stx\goodies\xml\vw\$(OBJDIR)\libstx_goodies_xml_vw.dll *.*
+
+..\..\..\stx\goodies\xml\vw\$(OBJDIR)\libstx_goodies_xml_vw.dll: $(FORCE)
+ pushd ..\..\..\stx\goodies\xml\vw & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
libjv_vdb.dll: ..\$(OBJDIR)\libjv_vdb.dll
copy ..\$(OBJDIR)\libjv_vdb.dll *.*
--- a/application/builder/baseline.rbspec Mon Jul 08 12:37:49 2019 +0100
+++ b/application/builder/baseline.rbspec Mon Jul 08 13:31:11 2019 +0100
@@ -28,11 +28,12 @@
package "stx:goodies/magritte"
package "stx:libhtml"
package "stx:libwidg2"
+ package "stx:libtool"
+ package "jv:libgdbs"
+ package "stx:goodies/communication"
+ package "stx:libtool2"
package "stx:libcompat"
- package "stx:libtool"
package "stx:goodies/xml/vw"
- package "jv:libgdbs"
- package "stx:libtool2"
package "jv:vdb"
--- a/application/builder/package.deps.rake Mon Jul 08 12:37:49 2019 +0100
+++ b/application/builder/package.deps.rake Mon Jul 08 13:31:11 2019 +0100
@@ -17,6 +17,10 @@
task "stx:goodies/announcements" => "stx:libbasic"
+task "stx:goodies/communication" => "stx:libbasic"
+task "stx:goodies/communication" => "stx:libcomp"
+task "stx:goodies/communication" => "stx:libview2"
+
task "stx:goodies/refactoryBrowser/parser" => "stx:libbasic"
@@ -82,6 +86,7 @@
task "jv:vdb/application" => "jv:libgdbs"
task "jv:vdb/application" => "jv:vdb"
task "jv:vdb/application" => "stx:goodies/announcements"
+task "jv:vdb/application" => "stx:goodies/communication"
task "jv:vdb/application" => "stx:goodies/magritte"
task "jv:vdb/application" => "stx:goodies/refactoryBrowser/parser"
task "jv:vdb/application" => "stx:goodies/regex"
--- a/application/modules.stx Mon Jul 08 12:37:49 2019 +0100
+++ b/application/modules.stx Mon Jul 08 13:31:11 2019 +0100
@@ -29,10 +29,11 @@
libstx_goodies_magritte
libstx_libhtml
libstx_libwidg2
+libstx_libtool
+libjv_libgdbs
+libstx_goodies_communication
+libstx_libtool2
libstx_libcompat
-libstx_libtool
libstx_goodies_xml_vw
-libjv_libgdbs
-libstx_libtool2
libjv_vdb
--- a/bc.mak Mon Jul 08 12:37:49 2019 +0100
+++ b/bc.mak Mon Jul 08 13:31:11 2019 +0100
@@ -97,11 +97,20 @@
$(OUTDIR)VDBEvaluator.$(O) VDBEvaluator.$(C) VDBEvaluator.$(H): VDBEvaluator.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBIconLibrary.$(O) VDBIconLibrary.$(C) VDBIconLibrary.$(H): VDBIconLibrary.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionBasicBlock.$(O) VDBInstructionBasicBlock.$(C) VDBInstructionBasicBlock.$(H): VDBInstructionBasicBlock.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_create.$(O) VDBMI_vdb_var_create.$(C) VDBMI_vdb_var_create.$(H): VDBMI_vdb_var_create.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_create.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_delete.$(O) VDBMI_vdb_var_delete.$(C) VDBMI_vdb_var_delete.$(H): VDBMI_vdb_var_delete.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_delete.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_evaluate_expression.$(O) VDBMI_vdb_var_evaluate_expression.$(C) VDBMI_vdb_var_evaluate_expression.$(H): VDBMI_vdb_var_evaluate_expression.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_evaluate_expression.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_info_path_expression.$(O) VDBMI_vdb_var_info_path_expression.$(C) VDBMI_vdb_var_info_path_expression.$(H): VDBMI_vdb_var_info_path_expression.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_info_path_expression.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_list_children.$(O) VDBMI_vdb_var_list_children.$(C) VDBMI_vdb_var_list_children.$(H): VDBMI_vdb_var_list_children.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_list_children.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_set_visualizer.$(O) VDBMI_vdb_var_set_visualizer.$(C) VDBMI_vdb_var_set_visualizer.$(H): VDBMI_vdb_var_set_visualizer.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_set_visualizer.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_update.$(O) VDBMI_vdb_var_update.$(C) VDBMI_vdb_var_update.$(H): VDBMI_vdb_var_update.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_update.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBScatchPadApplication.$(O) VDBScatchPadApplication.$(C) VDBScatchPadApplication.$(H): VDBScatchPadApplication.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\MultiViewToolApplication.$(H) $(INCLUDE_TOP)\stx\libtool\WorkspaceApplication.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libview2\ToolApplicationModel.$(H) $(STCHDR)
$(OUTDIR)VDBSettingsApplication.$(O) VDBSettingsApplication.$(C) VDBSettingsApplication.$(H): VDBSettingsApplication.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\AbstractSettingsApplication.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
$(OUTDIR)VDBSimpleConsoleView.$(O) VDBSimpleConsoleView.$(C) VDBSimpleConsoleView.$(H): VDBSimpleConsoleView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextView.$(H) $(INCLUDE_TOP)\stx\libwidg\ListView.$(H) $(INCLUDE_TOP)\stx\libwidg\TextCollector.$(H) $(INCLUDE_TOP)\stx\libwidg\TextView.$(H) $(STCHDR)
$(OUTDIR)VDBStartup.$(O) VDBStartup.$(C) VDBStartup.$(H): VDBStartup.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\StandaloneStartup.$(H) $(STCHDR)
$(OUTDIR)VDBTerminalView.$(O) VDBTerminalView.$(C) VDBTerminalView.$(H): VDBTerminalView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextView.$(H) $(INCLUDE_TOP)\stx\libwidg\ListView.$(H) $(INCLUDE_TOP)\stx\libwidg\TextCollector.$(H) $(INCLUDE_TOP)\stx\libwidg\TextView.$(H) $(INCLUDE_TOP)\stx\libwidg2\TerminalView.$(H) $(INCLUDE_TOP)\stx\libwidg2\VT100TerminalView.$(H) $(STCHDR)
+$(OUTDIR)VDBVariableObject.$(O) VDBVariableObject.$(C) VDBVariableObject.$(H): VDBVariableObject.st $(INCLUDE_TOP)\jv\libgdbs\GDBDebuggerObject.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBObject.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBVariableObject.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBVariableObjectExecutor.$(O) VDBVariableObjectExecutor.$(C) VDBVariableObjectExecutor.$(H): VDBVariableObjectExecutor.st $(INCLUDE_TOP)\jv\libgdbs\GDBDebuggerObject.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBObject.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBVariableObjectExecutor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBVirtualMemoryMap.$(O) VDBVirtualMemoryMap.$(C) VDBVirtualMemoryMap.$(H): VDBVirtualMemoryMap.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBVirtualMemoryRegion.$(O) VDBVirtualMemoryRegion.$(C) VDBVirtualMemoryRegion.$(H): VDBVirtualMemoryRegion.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)jv_vdb.$(O) jv_vdb.$(C) jv_vdb.$(H): jv_vdb.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
@@ -117,6 +126,7 @@
$(OUTDIR)VDBFramePresenter.$(O) VDBFramePresenter.$(C) VDBFramePresenter.$(H): VDBFramePresenter.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractPresenter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionPresenter.$(O) VDBInstructionPresenter.$(C) VDBInstructionPresenter.$(H): VDBInstructionPresenter.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractPresenter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionsAndSourcePresenter.$(O) VDBInstructionsAndSourcePresenter.$(C) VDBInstructionsAndSourcePresenter.$(H): VDBInstructionsAndSourcePresenter.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractPresenter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
+$(OUTDIR)VDBMI_vdb_var_duplicate.$(O) VDBMI_vdb_var_duplicate.$(C) VDBMI_vdb_var_duplicate.$(H): VDBMI_vdb_var_duplicate.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMICommand.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBMI_var_create.$(H) $(INCLUDE_TOP)\jv\vdb\VDBMI_vdb_var_create.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBMemoryApplication.$(O) VDBMemoryApplication.$(C) VDBMemoryApplication.$(H): VDBMemoryApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
$(OUTDIR)VDBRegisterPresenter.$(O) VDBRegisterPresenter.$(C) VDBRegisterPresenter.$(H): VDBRegisterPresenter.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractPresenter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\AbstractHierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(STCHDR)
$(OUTDIR)VDBSourceApplication.$(O) VDBSourceApplication.$(C) VDBSourceApplication.$(H): VDBSourceApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
--- a/jv_vdb.st Mon Jul 08 12:37:49 2019 +0100
+++ b/jv_vdb.st Mon Jul 08 13:31:11 2019 +0100
@@ -51,7 +51,7 @@
Please take a look at the #referencedPreRequisites method as well."
^ #(
- #'jv:libgdbs' "GDBCommandStatus - shared pool used by VDBSimpleDebuggerConsoleApplication"
+ #'jv:libgdbs' "GDBCommand - superclass of VDBMI_vdb_var_create"
#'stx:goodies/announcements' "Announcement - superclass of RREvent"
#'stx:libbasic' "LibraryDefinition - superclass of jv_vdb"
#'stx:libtool' "AbstractSettingsApplication - superclass of VDBSettingsApplication"
@@ -141,11 +141,20 @@
VDBEvaluator
VDBIconLibrary
VDBInstructionBasicBlock
+ #'VDBMI_vdb_var_create'
+ #'VDBMI_vdb_var_delete'
+ #'VDBMI_vdb_var_evaluate_expression'
+ #'VDBMI_vdb_var_info_path_expression'
+ #'VDBMI_vdb_var_list_children'
+ #'VDBMI_vdb_var_set_visualizer'
+ #'VDBMI_vdb_var_update'
VDBScatchPadApplication
VDBSettingsApplication
VDBSimpleConsoleView
VDBStartup
VDBTerminalView
+ VDBVariableObject
+ VDBVariableObjectExecutor
VDBVirtualMemoryMap
VDBVirtualMemoryRegion
#'jv_vdb'
@@ -161,6 +170,7 @@
VDBFramePresenter
VDBInstructionPresenter
VDBInstructionsAndSourcePresenter
+ #'VDBMI_vdb_var_duplicate'
VDBMemoryApplication
VDBRegisterPresenter
VDBSourceApplication
--- a/libInit.cc Mon Jul 08 12:37:49 2019 +0100
+++ b/libInit.cc Mon Jul 08 13:31:11 2019 +0100
@@ -23,11 +23,20 @@
extern void _VDBEvaluator_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBIconLibrary_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBInstructionBasicBlock_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137create_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137delete_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137evaluate_137expression_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137info_137path_137expression_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137list_137children_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137set_137visualizer_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137update_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBScatchPadApplication_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBSettingsApplication_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBSimpleConsoleView_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBStartup_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBTerminalView_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBVariableObject_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBVariableObjectExecutor_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBVirtualMemoryMap_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBVirtualMemoryRegion_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _jv_137vdb_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
@@ -43,6 +52,7 @@
extern void _VDBFramePresenter_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBInstructionPresenter_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBInstructionsAndSourcePresenter_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBMI_137vdb_137var_137duplicate_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBMemoryApplication_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBRegisterPresenter_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBSourceApplication_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
@@ -86,11 +96,20 @@
_VDBEvaluator_Init(pass,__pRT__,snd);
_VDBIconLibrary_Init(pass,__pRT__,snd);
_VDBInstructionBasicBlock_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137create_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137delete_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137evaluate_137expression_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137info_137path_137expression_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137list_137children_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137set_137visualizer_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137update_Init(pass,__pRT__,snd);
_VDBScatchPadApplication_Init(pass,__pRT__,snd);
_VDBSettingsApplication_Init(pass,__pRT__,snd);
_VDBSimpleConsoleView_Init(pass,__pRT__,snd);
_VDBStartup_Init(pass,__pRT__,snd);
_VDBTerminalView_Init(pass,__pRT__,snd);
+ _VDBVariableObject_Init(pass,__pRT__,snd);
+ _VDBVariableObjectExecutor_Init(pass,__pRT__,snd);
_VDBVirtualMemoryMap_Init(pass,__pRT__,snd);
_VDBVirtualMemoryRegion_Init(pass,__pRT__,snd);
_jv_137vdb_Init(pass,__pRT__,snd);
@@ -106,6 +125,7 @@
_VDBFramePresenter_Init(pass,__pRT__,snd);
_VDBInstructionPresenter_Init(pass,__pRT__,snd);
_VDBInstructionsAndSourcePresenter_Init(pass,__pRT__,snd);
+ _VDBMI_137vdb_137var_137duplicate_Init(pass,__pRT__,snd);
_VDBMemoryApplication_Init(pass,__pRT__,snd);
_VDBRegisterPresenter_Init(pass,__pRT__,snd);
_VDBSourceApplication_Init(pass,__pRT__,snd);
--- a/python/vdb.py Mon Jul 08 12:37:49 2019 +0100
+++ b/python/vdb.py Mon Jul 08 13:31:11 2019 +0100
@@ -7,4 +7,390 @@
# You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
#
+import itertools
+import argparse
+import copy
import gdb
+
+
+class Error(Exception):
+ pass
+
+class BasicPrinter(object):
+ def __init__(self, value):
+ self._value = value
+
+ def to_string(self):
+ return self._value
+
+class _VarObjRegistry(object):
+
+ def __init__(self):
+ self._seqno = 0
+ self._varobjs = {}
+
+ def __iter__(self):
+ return iter(self._varobjs)
+
+ def __getitem__(self, name):
+ return self._varobjs[name]
+
+ def __delitem__(self, name):
+ del self._varobjs[name]
+
+ def generate_name(self):
+ """
+ Generate and return a new, unique variable name.
+ """
+ name = 'vdbvar' + str(self._seqno)
+ self._seqno = self._seqno + 1
+ return name
+
+ def validate_name(self, name):
+ """
+ Check if given `name` is not yet used (and therefore can
+ be used for new variable). Throws an error if the name
+ is already in use, otherwise no-op.
+ """
+ if name in self._varobjs:
+ raise Error("Name not unique: %s" % name)
+
+ def register(self, varobj):
+ self.validate_name(varobj.name)
+ self._varobjs[varobj.name] = varobj
+
+ def unregister(self, varobj):
+ del self._varobjs[varobj.name]
+
+ def unregister_all(self):
+ self._varobjs = {}
+
+_VarObjs = _VarObjRegistry()
+
+
+class _VarObj(object):
+ def __init__(self, name, expr, value, parent = None):
+ self._name = name
+ self._expr = expr
+ self._value = value
+ self._parent = parent
+ self.set_visualizer(None)
+
+ def __copy__(self):
+ return _VarObj(None, self._expr, self._value, self._parent)
+
+ def to_mi(self, properties = [ 'name', 'exp', 'numchild', 'value', 'type', 'thread_id', 'frozen', 'has_more', 'displayhint', 'dynamic' ]):
+ """
+ Return MI record representing this variable object.
+ """
+ return { p : getattr(self, p) for p in properties if getattr(self, p) != None}
+
+ def children(self):
+ """
+ Return an iterable (possibly empty) over child varobjs.
+ Children are NOT registered, the caller must take care
+ about this.
+ """
+ if not hasattr(self, '_children'):
+ def child(exp, value):
+ child_name = self._name + '.' + exp
+ child = _VarObj(child_name, exp, value, self)
+ return child
+ if not hasattr(self._visualizer, "children"):
+ self._children = []
+ else:
+ class lazy():
+ def __init__(self, iterator):
+ self._head = []
+ self._rest = iterator
+
+ def __iter__(self):
+ for each in self._head:
+ yield each
+ for each in self._rest:
+ self._head.append(each)
+ yield each
+ self._children = lazy(map(lambda pair : child(pair[0], pair[1]), self._visualizer.children()))
+ return iter(self._children)
+
+ def set_visualizer(self,visualizer):
+ """
+ Set new visualizer
+ """
+
+ self._visualizer = visualizer
+ if self._visualizer == None:
+ self._visualizer = gdb.default_visualizer(self._value)
+ if self._visualizer == None:
+ self._visualizer = BasicPrinter(self._value)
+ if hasattr(self, "_children"):
+ del self._children
+
+ @property
+ def parent(self):
+ """
+ Return parent varobj or None
+ """
+ return self._parent
+
+ @property
+ def name(self):
+ """
+ The name of the varobj.
+ """
+ return self._name
+
+ @property
+ def numchild(self):
+ """
+ The number of children of the varobj. This number is not necessarily
+ reliable for a dynamic varobj. Instead, you must examine the ‘has_more’
+ attribute.
+ """
+ return 0
+
+ @property
+ def value(self):
+ """
+ The varobj’s scalar value. For a varobj whose type is some sort of
+ aggregate (e.g., a struct), or for a dynamic varobj, this value will not
+ be interesting.
+ """
+ return str(self._visualizer.to_string())
+
+ @property
+ def type(self):
+ """
+ The varobj’s type. This is a string representation of the type, as would
+ be printed by the GDB CLI. If ‘print object’ (see set print object) is
+ set to on, the actual (derived) type of the object is shown rather than
+ the declared one.
+ """
+ return str(self._value.type)
+
+ @property
+ def thread_id(self):
+ """
+ If a variable object is bound to a specific thread, then this is the
+ thread’s global identifier.
+ """
+ return None
+
+ @property
+ def has_more(self):
+ """
+ For a dynamic varobj, this indicates whether there appear to be any
+ children available. For a non-dynamic varobj, this will be 0.
+ """
+ try:
+ next(self.children())
+ return 1
+ except StopIteration:
+ return 0
+
+ @property
+ def dynamic(self):
+ """
+ This attribute will be present and have the value ‘1’ if the varobj is a
+ dynamic varobj. If the varobj is not a dynamic varobj, then this
+ attribute will not be present.
+ """
+ return 1
+
+ @property
+ def displayhint(self):
+ """
+ A dynamic varobj can supply a display hint to the front end. The value
+ comes directly from the Python pretty-printer object’s display_hint
+ method. See Pretty Printing API.
+ """
+ return None
+
+ @property
+ def frozen(self):
+ """
+ If the variable object is frozen, this variable will be present with a
+ value of 1.
+ """
+ return 0
+
+ @property
+ def exp(self):
+ """
+ The expression to be shown to the user by the front end to designate
+ this child. For example this may be the name of a structure member.
+ """
+ return self._expr
+
+_VarEvaluators = []
+
+def register_evaluator(callable, replace = True):
+ """
+ Register `callable` in list of evaluators which are tried when creating
+ -vdb-var-create. To evaluate and expression, `callable` is invoked passing
+ expression string and must return either `gdb.Value` or `None`.
+ """
+ _VarEvaluators.append(callable)
+
+def unregister_evaluator(callable):
+ """
+ Unregister previously registered evaluator.
+ """
+ if callable in _VarEvaluators:
+ _VarEvaluators.remove(callable)
+
+def unregister_evaluators():
+ """
+ Unregister all evaluators. To be used mainly in tests
+ """
+ _VarEvaluators = []
+
+def parse_and_eval(expression):
+ """
+ Parse and evaluate expression and return a gdb.Value() as follows:
+
+ * First, use builtin `gdb.parse_and_eval()`. If builtin succeeds,
+ return resulting value.
+ * Second, check if `expressions` matches any argument or local
+ as returned by frame decorator for current frame, if it does,
+ return it.
+ * Finally, try to use any registered custom evaluator (see
+ `register_evaluator()`. If first non-None value is returned.
+ * If none of the above yields a value, an exception is thrown, just
+ like `gdb.parse_and_eval()` does if it cannot parse/evaluate given
+ expression.
+ """
+
+ # First, try builtin gdb.parse_and_eval:
+ try:
+ return gdb.parse_and_eval(expression)
+ except:
+ pass
+
+ # Second, try frame decorator frame_args() / frame_locals():
+ decorator = next(gdb.frames.execute_frame_filters(gdb.selected_frame(), 0, 0))
+ for var in itertools.chain(decorator.frame_args(), decorator.frame_locals()):
+ if var.sym == expression:
+ return var.value()
+
+ # Firnally, try custom registered expression evaluators:
+ for evaluate in _VarEvaluators:
+ value = evaluate(expression)
+ if value != None:
+ return value
+
+ # Nothing works, give up.
+ raise Error("Cannot evaluate expression: %s" % expression)
+
+def micommand(name):
+ def _command(func):
+ class _Command(gdb.MICommand):
+ def invoke(*args, **kwargs):
+ return func(*args[1:], **kwargs)
+ def __call__(self, *args, **kwargs):
+ return self.invoke(*args, **kwargs)
+ return _Command(name)
+ return _command
+
+@micommand('-vdb-var-create')
+def _var_create(argv):
+ argv_parser = argparse.ArgumentParser()
+ argv_parser.add_argument('name')
+ argv_parser.add_argument('frame')
+ argv_parser.add_argument('expr')
+ args = argv_parser.parse_args(argv)
+
+ if args.frame != '*':
+ raise Exception("frame designator must be '*'")
+ if args.name == '-':
+ args.name = _VarObjs.generate_name()
+ _VarObjs.validate_name(args.name)
+
+ varobj = _VarObj(args.name, args.expr, parse_and_eval(args.expr))
+ _VarObjs.register(varobj)
+ return varobj.to_mi()
+
+@micommand('-vdb-var-delete')
+def _var_delete(argv):
+ argv_parser = argparse.ArgumentParser()
+ argv_parser.add_argument('name')
+ argv_parser.add_argument('-c', dest="children_only", action="store_true")
+ args = argv_parser.parse_args(argv)
+
+ if args.children_only:
+ _VarObjs.unregister_children(_VarObjs[args.name])
+ else:
+ _VarObjs.unregister(_VarObjs[args.name])
+ return None
+
+@micommand('-vdb-var-update')
+def _var_update(argv):
+ # Not yet supported
+ return []
+
+@micommand('-vdb-var-duplicate')
+def _var_duplicate(argv):
+ argv_parser = argparse.ArgumentParser()
+ argv_parser.add_argument('name')
+ args = argv_parser.parse_args(argv)
+
+ orig = _VarObjs[args.name]
+ dup = copy.copy(orig)
+ dup._name = _VarObjs.generate_name()
+ _VarObjs.register(dup)
+ return dup.to_mi()
+
+@micommand('-vdb-var-list-children')
+def _var_list_children(argv):
+ argv_parser = argparse.ArgumentParser()
+ argv_parser.add_argument('--all-values', dest="values", action="store_true")
+ argv_parser.add_argument('--no-values', dest="values", action="store_false")
+ argv_parser.add_argument('name')
+ args = argv_parser.parse_args(argv)
+
+ varobj = _VarObjs[args.name]
+ children = list(varobj.children())
+ for child in children:
+ if not child.name in _VarObjs:
+ _VarObjs.register(child)
+ return map(_VarObj.to_mi, children)
+
+
+@micommand('-vdb-var-info-path-expression')
+def _var_info_path_expression(argv):
+ argv_parser = argparse.ArgumentParser()
+ argv_parser.add_argument('name')
+ args = argv_parser.parse_args(argv)
+
+ varobj = _VarObjs[args.name]
+ if varobj.parent != None:
+ raise Error("-vdb-var-info-path-expression is not supported for children of dynamic varobjs")
+ else:
+ return varobj.exp
+
+@micommand('-vdb-var-set-visualizer')
+def _var_set_visualizer(argv):
+ argv_parser = argparse.ArgumentParser()
+ argv_parser.add_argument('name')
+ argv_parser.add_argument('visualizer')
+ args = argv_parser.parse_args(argv)
+
+ varobj = _VarObjs[args.name]
+ # Now, create visualizer )pretty-printer) object. This is
+ # done by evaluating given visualizer expression and and
+ # "calling" the result with gdb.Value as parameter).
+ #
+ # We have to be careful here: the expression is user-supplied
+ # and might use stuff from __main__ module. So first try as it is
+ # and if if fails, try to evaluate again in context of __main__.
+ #
+ visualizer_factory = None
+ try:
+ visualizer_factory = eval(args.visualizer)
+ except:
+ import __main__
+ visualizer_factory = eval(args.visualizer, __main__.__dict__ , __main__.__dict__)
+
+ visualizer = visualizer_factory(varobj._value)
+
+ varobj.set_visualizer(visualizer)
\ No newline at end of file
--- a/tests/Make.proto Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/Make.proto Mon Jul 08 13:31:11 2019 +0100
@@ -102,10 +102,15 @@
# build all mandatory prerequisite packages (containing superclasses) for this package
prereq:
cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd $(TOP)/goodies/announcements && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
cd $(TOP)/libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
cd $(TOP)/libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
cd $(TOP)/libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
cd $(TOP)/goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd $(TOP)/libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd $(TOP)/goodies/magritte && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libgdbs && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libgdbs/tests && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
@@ -127,6 +132,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)VDBAbstractApplicationTests.$(O) VDBAbstractApplicationTests.$(C) VDBAbstractApplicationTests.$(H): VDBAbstractApplicationTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBSimpleConsoleViewTest.$(O) VDBSimpleConsoleViewTest.$(C) VDBSimpleConsoleViewTest.$(H): VDBSimpleConsoleViewTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)VDBVariableObjectTests.$(O) VDBVariableObjectTests.$(C) VDBVariableObjectTests.$(H): VDBVariableObjectTests.st $(INCLUDE_TOP)/jv/libgdbs/tests/GDBDebuggerTestCase.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)jv_vdb_tests.$(O) jv_vdb_tests.$(C) jv_vdb_tests.$(H): jv_vdb_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionListApplicationTests.$(O) VDBInstructionListApplicationTests.$(C) VDBInstructionListApplicationTests.$(H): VDBInstructionListApplicationTests.st $(INCLUDE_TOP)/jv/vdb/tests/VDBAbstractApplicationTests.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)VDBSimpleDebuggerConsoleApplicationTest.$(O) VDBSimpleDebuggerConsoleApplicationTest.$(C) VDBSimpleDebuggerConsoleApplicationTest.$(H): VDBSimpleDebuggerConsoleApplicationTest.st $(INCLUDE_TOP)/jv/vdb/tests/VDBAbstractApplicationTests.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/tests/Make.spec Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/Make.spec Mon Jul 08 13:31:11 2019 +0100
@@ -53,6 +53,7 @@
COMMON_CLASSES= \
VDBAbstractApplicationTests \
VDBSimpleConsoleViewTest \
+ VDBVariableObjectTests \
jv_vdb_tests \
VDBInstructionListApplicationTests \
VDBSimpleDebuggerConsoleApplicationTest \
@@ -63,6 +64,7 @@
COMMON_OBJS= \
$(OUTDIR)VDBAbstractApplicationTests.$(O) \
$(OUTDIR)VDBSimpleConsoleViewTest.$(O) \
+ $(OUTDIR)VDBVariableObjectTests.$(O) \
$(OUTDIR)jv_vdb_tests.$(O) \
$(OUTDIR)VDBInstructionListApplicationTests.$(O) \
$(OUTDIR)VDBSimpleDebuggerConsoleApplicationTest.$(O) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/VDBVariableObjectTests.st Mon Jul 08 13:31:11 2019 +0100
@@ -0,0 +1,118 @@
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+"{ Package: 'jv:vdb/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+GDBDebuggerTestCase subclass:#VDBVariableObjectTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-Core-Tests'
+!
+
+!VDBVariableObjectTests class methodsFor:'documentation'!
+
+copyright
+"
+jv:vdb - Visual / VM Debugger
+Copyright (C) 2015-now Jan Vrany
+
+This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
+
+You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
+"
+! !
+
+!VDBVariableObjectTests methodsFor:'running'!
+
+setUp
+ super setUp.
+ debugger pythonImportVDB.
+
+ "Created: / 06-07-2019 / 01:20:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-07-2019 / 13:15:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBVariableObjectTests methodsFor:'tests'!
+
+test_variables_01a
+ | stack varobj |
+
+ debugger executable: GDBDebuggeesResource current binaryFactorial1.
+ self assert: debugger breakpoints isEmpty.
+
+ debugger send: 'source ', ((Smalltalk getPackageDirectoryForPackage:GDBDebuggeesResource package)
+ / 'c' / 'py-framedecorator.py') pathName.
+ debugger enableFrameFilters.
+ debugger send: 'b factorial'.
+ debugger send: 'r' andWaitFor: GDBStoppedEvent.
+ stack := debugger selectedInferior threads first stack.
+
+ varobj := VDBVariableObject evaluate: 'syntheticArg0' in: stack first using: debugger.
+
+ self assert: varobj expression = 'syntheticArg0'.
+ self assert: varobj value = '12'.
+ self assert: varobj type = 'long long'.
+
+ "
+ VDBFrameApplication new
+ debugger: debugger;
+ frame: stack first;
+ open.
+ "
+ debugger send: 'quit' andWait: false.
+
+ "Created: / 06-07-2019 / 01:23:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-07-2019 / 13:29:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_variables_02a
+ "
+ Test #duplicate
+ "
+ | c1 c1_cdr c1_cdr_d c1_cdr_d_cdr c1_cdr_d_cdr_d |
+
+ debugger executable: GDBDebuggeesResource current binaryPyVarobj.
+ self assert: debugger breakpoints isEmpty.
+
+ debugger send: 'source ', ((Smalltalk getPackageDirectoryForPackage:GDBDebuggeesResource package)
+ / 'c' / 'py-varobj.py') pathName.
+ debugger enablePrettyPrinting.
+ debugger send: 'b py-varobj.c:22'.
+ debugger send: 'r' andWaitFor: GDBStoppedEvent.
+
+ c1 := VDBVariableObject evaluate: '&c1' in: debugger selectedInferior threads first stack first using: debugger.
+ self assert: c1 isDynamic.
+ self assert: c1 path = '&c1'.
+
+ c1_cdr := c1 children second.
+ self assert: c1_cdr expression = 'cdr'.
+ self assert: c1_cdr isDynamic.
+ self assert: c1_cdr parent == c1.
+
+ c1_cdr_d := c1_cdr duplicate.
+ self assert: c1_cdr_d ~= c1_cdr.
+ self assert: c1_cdr_d parent ~= c1_cdr parent.
+
+ c1_cdr_d_cdr := c1_cdr_d children second.
+ self assert: c1_cdr_d_cdr expression = 'cdr'.
+ self assert: c1_cdr_d_cdr isDynamic.
+ self assert: c1_cdr_d_cdr parent == c1_cdr_d
+.
+ c1_cdr_d_cdr_d := c1_cdr_d_cdr duplicate.
+ self assert: c1_cdr_d_cdr_d ~= c1_cdr_d_cdr.
+ self assert: c1_cdr_d_cdr_d parent ~= c1_cdr_d_cdr parent.
+
+ debugger send: 'quit' andWait: false.
+
+ "Created: / 08-07-2019 / 15:38:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 08-07-2019 / 16:53:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/tests/abbrev.stc Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/abbrev.stc Mon Jul 08 13:31:11 2019 +0100
@@ -3,6 +3,7 @@
# it provides information about a classes filename, category and especially namespace.
VDBAbstractApplicationTests VDBAbstractApplicationTests jv:vdb/tests 'VDB-UI-Abstract-Tests' 1
VDBSimpleConsoleViewTest VDBSimpleConsoleViewTest jv:vdb/tests 'VDB-UI-Console-Tests' 1
+VDBVariableObjectTests VDBVariableObjectTests jv:vdb/tests 'VDB-Core-Tests' 1
jv_vdb_tests jv_vdb_tests jv:vdb/tests '* Projects & Packages *' 3
VDBInstructionListApplicationTests VDBInstructionListApplicationTests jv:vdb/tests 'VDB-UI-Others-Tests' 1
VDBSimpleDebuggerConsoleApplicationTest VDBSimpleDebuggerConsoleApplicationTest jv:vdb/tests 'VDB-UI-Console-Tests' 1
--- a/tests/bc.mak Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/bc.mak Mon Jul 08 13:31:11 2019 +0100
@@ -52,10 +52,15 @@
# build all mandatory prerequisite packages (containing superclasses) for this package
prereq:
pushd ..\..\..\stx\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\stx\goodies\announcements & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\..\stx\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\..\stx\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\..\stx\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\..\stx\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\stx\libwidg & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\..\stx\goodies\magritte & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libgdbs & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libgdbs\tests & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
@@ -74,6 +79,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)VDBAbstractApplicationTests.$(O) VDBAbstractApplicationTests.$(C) VDBAbstractApplicationTests.$(H): VDBAbstractApplicationTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBSimpleConsoleViewTest.$(O) VDBSimpleConsoleViewTest.$(C) VDBSimpleConsoleViewTest.$(H): VDBSimpleConsoleViewTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)VDBVariableObjectTests.$(O) VDBVariableObjectTests.$(C) VDBVariableObjectTests.$(H): VDBVariableObjectTests.st $(INCLUDE_TOP)\jv\libgdbs\tests\GDBDebuggerTestCase.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)jv_vdb_tests.$(O) jv_vdb_tests.$(C) jv_vdb_tests.$(H): jv_vdb_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
$(OUTDIR)VDBInstructionListApplicationTests.$(O) VDBInstructionListApplicationTests.$(C) VDBInstructionListApplicationTests.$(H): VDBInstructionListApplicationTests.st $(INCLUDE_TOP)\jv\vdb\tests\VDBAbstractApplicationTests.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)VDBSimpleDebuggerConsoleApplicationTest.$(O) VDBSimpleDebuggerConsoleApplicationTest.$(C) VDBSimpleDebuggerConsoleApplicationTest.$(H): VDBSimpleDebuggerConsoleApplicationTest.st $(INCLUDE_TOP)\jv\vdb\tests\VDBAbstractApplicationTests.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/tests/jv_vdb_tests.st Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/jv_vdb_tests.st Mon Jul 08 13:31:11 2019 +0100
@@ -51,6 +51,7 @@
Please take a look at the #referencedPreRequisites method as well."
^ #(
+ #'jv:libgdbs/tests' "GDBDebuggerTestCase - superclass of VDBVariableObjectTests"
#'stx:goodies/sunit' "TestAsserter - superclass of VDBAbstractApplicationTests"
#'stx:libbasic' "LibraryDefinition - superclass of jv_vdb_tests"
)
@@ -69,7 +70,6 @@
^ #(
#'jv:libgdbs' "GDBDebugger - referenced by VDBInstructionListApplicationTests>>test_01a"
- #'jv:libgdbs/tests' "GDBDebuggeesResource - referenced by VDBAbstractApplicationTests class>>resources"
#'jv:vdb' "VDBInstructionListApplication - referenced by VDBInstructionListApplicationTests>>test_01a"
#'stx:libbasic3' "MessageTracer - referenced by VDBAbstractApplicationTests>>setUp"
#'stx:libview' "StandardSystemView - referenced by VDBSimpleConsoleViewTest>>setUp"
@@ -99,6 +99,7 @@
"<className> or (<className> attributes...) in load order"
VDBAbstractApplicationTests
VDBSimpleConsoleViewTest
+ VDBVariableObjectTests
#'jv_vdb_tests'
VDBInstructionListApplicationTests
VDBSimpleDebuggerConsoleApplicationTest
--- a/tests/libInit.cc Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/libInit.cc Mon Jul 08 13:31:11 2019 +0100
@@ -18,6 +18,7 @@
extern void _VDBAbstractApplicationTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBSimpleConsoleViewTest_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _VDBVariableObjectTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _jv_137vdb_137tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBInstructionListApplicationTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
extern void _VDBSimpleDebuggerConsoleApplicationTest_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
@@ -37,6 +38,7 @@
__BEGIN_PACKAGE2__("libjv_vdb_tests", _libjv_vdb_tests_Init, "jv:vdb/tests");
_VDBAbstractApplicationTests_Init(pass,__pRT__,snd);
_VDBSimpleConsoleViewTest_Init(pass,__pRT__,snd);
+ _VDBVariableObjectTests_Init(pass,__pRT__,snd);
_jv_137vdb_137tests_Init(pass,__pRT__,snd);
_VDBInstructionListApplicationTests_Init(pass,__pRT__,snd);
_VDBSimpleDebuggerConsoleApplicationTest_Init(pass,__pRT__,snd);
--- a/tests/python/vdbtests.py Mon Jul 08 12:37:49 2019 +0100
+++ b/tests/python/vdbtests.py Mon Jul 08 13:31:11 2019 +0100
@@ -25,8 +25,180 @@
vdb_tests_python_dir = os.path.dirname(__file__)
vdb_python_dir = os.path.join(vdb_tests_python_dir, '..' , '..' , 'python')
+libgdbs_tests_dir = os.path.join(vdb_python_dir, '..', '..' , 'libgdbs' , 'tests')
sys.path.append(vdb_python_dir)
import gdb
import vdb
+
+class parse_and_eval_test(unittest.TestCase):
+ def setUp(self):
+ test_prog_dir = os.path.join(libgdbs_tests_dir, 'c', 'x86_64-pc-linux-gnu')
+
+ gdb.execute('set startup-with-shell off')
+ gdb.execute('set auto-load safe-path /')
+ gdb.execute('set python print-stack full')
+ gdb.execute('set breakpoint pending on')
+ gdb.execute('set confirm off')
+ gdb.execute('set pagination off')
+ gdb.execute('file "%s"' % os.path.join(test_prog_dir, 'py-varobj'))
+ gdb.execute('source %s' % os.path.join(test_prog_dir, '..', 'py-varobj.py'))
+ gdb.execute('source %s' % os.path.join(test_prog_dir, '..', 'py-framedecorator.py'))
+ gdb.execute('b py-varobj.c : 22')
+ gdb.execute('r')
+ gdb.execute('frame 0')
+
+
+ def tearDown(self):
+ vdb.unregister_evaluators()
+ gdb.execute("del")
+ try:
+ gdb.execute('kill')
+ except:
+ pass
+
+ def test_01a(self):
+ self.assertRaises(vdb.Error, vdb.parse_and_eval, 'foo')
+ self.assertEqual(gdb.Value(1), vdb.parse_and_eval('1'))
+
+ def test_01b(self):
+ v = vdb.parse_and_eval('&c1')
+ self.assertEqual('struct _cons *', str(v.type))
+
+ def test_01c(self):
+ v = vdb.parse_and_eval('&c1')
+ self.assertEqual('struct _cons *', str(v.type))
+
+ def test_02a(self):
+ self.assertEqual(gdb.Value(12), vdb.parse_and_eval('syntheticLocal0'))
+ self.assertEqual(gdb.Value(42), vdb.parse_and_eval('syntheticLocal2'))
+
+ def test_03(self):
+ def parse_and_eval(expr):
+ if expr == 'a':
+ return gdb.Value(1)
+ elif expr == 'b':
+ return None
+ elif expr == 'c':
+ raise Exception("Bad")
+ vdb.register_evaluator(parse_and_eval)
+
+ self.assertEqual(gdb.Value(1), vdb.parse_and_eval('a'))
+
+ self.assertRaises(vdb.Error, vdb.parse_and_eval, 'b')
+ self.assertRaises(Exception, vdb.parse_and_eval, 'c')
+ self.assertRaises(vdb.Error, vdb.parse_and_eval, 'd')
+
+ vdb.unregister_evaluator(parse_and_eval)
+ self.assertRaises(vdb.Error, vdb.parse_and_eval, 'a')
+
+
+
+class VarObj_test(unittest.TestCase):
+ def setUp(self):
+ test_prog_dir = os.path.join(libgdbs_tests_dir, 'c', 'x86_64-pc-linux-gnu')
+
+ gdb.execute('set startup-with-shell off')
+ gdb.execute('set auto-load safe-path /')
+ gdb.execute('set python print-stack full')
+ gdb.execute('set breakpoint pending on')
+ gdb.execute('set confirm off')
+ gdb.execute('set pagination off')
+ gdb.execute('file "%s"' % os.path.join(test_prog_dir, 'py-varobj'))
+ gdb.execute('source %s' % os.path.join(test_prog_dir, '..', 'py-varobj.py'))
+ gdb.execute('source %s' % os.path.join(test_prog_dir, '..', 'py-framedecorator.py'))
+ gdb.execute('b py-varobj.c : 22')
+ gdb.execute('r')
+ gdb.execute('frame 0')
+
+ def tearDown(self):
+ vdb.unregister_evaluators()
+ gdb.execute("del")
+ try:
+ gdb.execute('kill')
+ except:
+ pass
+
+ def test_01(self):
+ varobj = vdb._VarObj('test_01', '1', gdb.Value(1))
+ self.assertEqual({ 'name' : 'test_01' ,
+ 'numchild' : 0,
+ 'exp' : '1',
+ 'value' : '1',
+ 'type' : 'long long',
+ 'has_more' : 0,
+ 'dynamic' : 1,
+ 'frozen' : 0
+ },
+ varobj.to_mi())
+
+ def test_02(self):
+ varobj = vdb._VarObj('test_02', '&c1', gdb.parse_and_eval('&c1'))
+ self.assertEqual({ 'name' : 'test_02' ,
+ 'numchild' : 0,
+ 'exp' : '&c1',
+ 'value' : '(...)',
+ 'type' : 'struct _cons *',
+ 'has_more' : 1,
+ 'dynamic' : 1,
+ 'frozen' : 0
+ },
+ varobj.to_mi())
+ children = list(varobj.children())
+ self.assertEqual(2, len(children))
+ self.assertEqual('car', children[0].exp)
+ self.assertEqual('cdr', children[1].exp)
+
+ self.assertEqual('test_02.car', children[0].name)
+ self.assertEqual('test_02.cdr', children[1].name)
+
+ self.assertEqual(varobj, children[0].parent)
+ self.assertEqual(varobj, children[1].parent)
+
+ children2 = list(varobj.children())
+ self.assertEqual(children[0], children2[0])
+ self.assertEqual(children[1], children2[1])
+
+ def test_03(self):
+ varobj = vdb._VarObj('test_02', '&c1', gdb.parse_and_eval('&c1'))
+ children = list(varobj.children())
+ self.assertEqual(2, len(children))
+
+ varobj.set_visualizer(vdb._DefaultVisualizer(varobj._value))
+ children = list(varobj.children())
+ self.assertEqual(0, len(children))
+
+
+
+
+class MI_test(unittest.TestCase):
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ vdb._VarObjs.unregister_all()
+
+ def test_01(self):
+ self.assertEqual({ 'name' : 'test_01' ,
+ 'numchild' : 0,
+ 'exp' : '1',
+ 'value' : '1',
+ 'type' : 'int',
+ 'has_more' : 0,
+ 'dynamic' : 1,
+ 'frozen' : 0
+ },
+ vdb._var_create(['test_01', '*' , '1']))
+ self.assertEqual(None,
+ vdb._var_delete(['test_01']))
+
+
+def run(test = None):
+ if test == None:
+ unittest.main()
+ else:
+ suite = unittest.TestSuite()
+ suite.addTest(test)
+ runner = unittest.TextTestRunner()
+ runner.run(suite)
\ No newline at end of file