Files
clang-p2996/lldb/test/API/functionalities/target_var/no_vars/TestTargetVarNoVars.py
Jim Ingham 94b0d836a1 Fix reporting the lack of global variables in "target var".
There was a little thinko which meant when stopped in a frame with
debug information but whose CU didn't have any global variables we
report:

no debug info for frame <N>

This patch fixes that error message to say the intended:

no global variables in current compile unit

<rdar://problem/69086361>
2020-09-21 17:29:40 -07:00

22 lines
552 B
Python

"""
Test that target var with no variables returns a correct error
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestTargetVarNoVars(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
def test_target_var_no_vars(self):
self.build()
lldbutil.run_to_name_breakpoint(self, 'main')
self.expect("target variable", substrs=['no global variables in current compile unit', 'main.c'], error=True)