[Lldb-commits] [PATCH] D53731: [NativePDB] Add the ability to display global variables
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 25 13:59:35 PDT 2018
zturner created this revision.
zturner added reviewers: lemo, aleksandr.urakov, stella.stamenova.
LLDB has the ability to display global variables, even without a running process, via the `target variable` command. This is because global variables are linker initialized, so their values are embedded directly into the executables. This gives us great power for testing native PDB functionality in a cross-platform manner, because we don't actually need a running process. We can just create a target using an EXE file, and display global variables. And global variables can have arbitrarily complex types, so in theory we can fully exercise the type system, record layout, and data formatters for native PDB files and PE/COFF executables on any host platform, as long as our type does not require a dynamic initializer.
This patch adds basic support for finding variables by name, and adds an exhaustive test for fundamental data types and pointers / references to fundamental data types.
Subsequent patches will extend this to typedefs, classes, pointers to functions, and other cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 50472 bytes
Desc: not available
More information about the lldb-commits