tests/libInit.cc
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 08 Jul 2019 13:31:11 +0100
changeset 178 5d1c3e5fab6b
parent 143 df7f89efd39d
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     1
/*
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     2
 * $Header$
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     3
 *
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     4
 * DO NOT EDIT
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     5
 * automagically generated from the projectDefinition: jv_vdb_tests.
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     6
 */
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     7
#define __INDIRECTVMINITCALLS__
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     8
#include <stc.h>
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
     9
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    10
#ifdef WIN32
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    11
# pragma codeseg INITCODE "INITCODE"
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    12
#endif
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    13
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    14
#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    15
DLL_EXPORT void _libjv_vdb_tests_Init() INIT_TEXT_SECTION;
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    16
DLL_EXPORT void _libjv_vdb_tests_InitDefinition() INIT_TEXT_SECTION;
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    17
#endif
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    18
111
a70313e80780 UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
    19
extern void _VDBAbstractApplicationTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
143
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 132
diff changeset
    20
extern void _VDBSimpleConsoleViewTest_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
178
5d1c3e5fab6b Initial support for VDB python-based variable objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    21
extern void _VDBVariableObjectTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    22
extern void _jv_137vdb_137tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
111
a70313e80780 UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
    23
extern void _VDBInstructionListApplicationTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
132
a1dededebc0b UX: add initial support for command completion in simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    24
extern void _VDBSimpleDebuggerConsoleApplicationTest_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    25
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    26
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    27
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    28
void _libjv_vdb_tests_InitDefinition(int pass, struct __vmData__ *__pRT__, OBJ snd)
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    29
{
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    30
  __BEGIN_PACKAGE2__("libjv_vdb_tests__DFN", _libjv_vdb_tests_InitDefinition, "jv:vdb/tests");
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    31
    _jv_137vdb_137tests_Init(pass,__pRT__,snd);
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    32
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    33
  __END_PACKAGE__();
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    34
}
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    35
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    36
void _libjv_vdb_tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd)
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    37
{
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    38
  __BEGIN_PACKAGE2__("libjv_vdb_tests", _libjv_vdb_tests_Init, "jv:vdb/tests");
111
a70313e80780 UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
    39
    _VDBAbstractApplicationTests_Init(pass,__pRT__,snd);
143
df7f89efd39d A complete rewrite of simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 132
diff changeset
    40
    _VDBSimpleConsoleViewTest_Init(pass,__pRT__,snd);
178
5d1c3e5fab6b Initial support for VDB python-based variable objects
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 143
diff changeset
    41
    _VDBVariableObjectTests_Init(pass,__pRT__,snd);
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    42
    _jv_137vdb_137tests_Init(pass,__pRT__,snd);
111
a70313e80780 UI: add *View* -> *Disassembly* menu item to debugger menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 72
diff changeset
    43
    _VDBInstructionListApplicationTests_Init(pass,__pRT__,snd);
132
a1dededebc0b UX: add initial support for command completion in simple console
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    44
    _VDBSimpleDebuggerConsoleApplicationTest_Init(pass,__pRT__,snd);
72
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    45
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    46
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    47
  __END_PACKAGE__();
4e8268dabaf7 UI: "disable" frames in frame list while inferior is running
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    48
}