
Add the Data Inspection Language (DIL) implementation pieces for handling plain local and global variable names. See https://discourse.llvm.org/t/rfc-data-inspection-language/69893 for information about DIL. This change includes the basic AST, Lexer, Parser and Evaluator pieces, as well as some tests.
30 lines
867 B
Python
30 lines
867 B
Python
"""
|
|
Make sure 'frame var' using DIL parser/evaultor works for local variables.
|
|
"""
|
|
|
|
import lldb
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
import os
|
|
import shutil
|
|
import time
|
|
|
|
|
|
class TestFrameVarDILInstanceVariables(TestBase):
|
|
# If your test case doesn't stress debug info, then
|
|
# set this to true. That way it won't be run once for
|
|
# each debug info format.
|
|
NO_DEBUG_INFO_TESTCASE = True
|
|
|
|
def test_frame_var(self):
|
|
self.build()
|
|
lldbutil.run_to_source_breakpoint(
|
|
self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")
|
|
)
|
|
|
|
self.runCmd("settings set target.experimental.use-DIL true")
|
|
self.expect_var_path("this", type="TestMethods *")
|
|
self.expect_var_path("c", children=[ValueCheck(name="field_", value="-1")])
|