mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def test_receiving_breakpoint_added(self):
"""Test that we get breakpoint added events, waiting on event classes on the debugger"""
self.build()
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@no_debug_info_test
def test_apropos(self):
self.expect("apropos", error=True,
"""Import some Python scripts by path and test them"""
self.run_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def run_test(self):
"""Import some Python scripts by path and test them."""
"""Check that we handle an ImportError in a special way when command script importing files."""
self.run_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def run_test(self):
"""Check that we handle an ImportError in a special way when command script importing files."""
self.build()
self.frame_disassemble_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def frame_disassemble_test(self):
"""Sample test to ensure SBFrame::Disassemble produces SOME output"""
exe = self.getBuildArtifact("a.out")
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def test__calculator_mode(self):
"""Test calling expressions in the dummy target."""
self.expect("expression 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
self.main_source_file = lldb.SBFileSpec("main.c")
self.expr_options_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def expr_cmd_test(self):
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
"Set a breakpoint here", self.main_source_file)
self.assertTrue(result.IsValid(), "Can't evaluate expression")
self.assertEqual(8, result.GetValueAsSigned())
- def setUp(self):
- TestBase.setUp(self)
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def test(self):
"""Test that we can have persistent pointer variables"""
self.build()
self.main_source_file = lldb.SBFileSpec("main.c")
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def run_weak_var_check (self, weak_varname, present):
# The expression will modify present_weak_int to signify which branch
# was taken. Set it to so we don't get confused by a previous run.
class TestArray(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipUnlessDarwin
@skipIfDarwinEmbedded # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
def test_array(self):
self.build()
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def check_language(self, thread, frame_no, test_lang):
frame = thread.frames[frame_no]
self.assertTrue(frame.IsValid(), "Frame %d was not valid."%(frame_no))
self.build()
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def do_test(self):
exe = self.getBuildArtifact("a.out")
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipIf(compiler="clang")
@skipIf(oslist=no_match(['linux']))
@skipIf(archs=no_match(['i386', 'x86_64']))
MPX_CONFIG_REGS = ('bndcfgu', 'bndstatus')
BND_VALUE = '{' + ' '.join(('0xff' for _ in range(16))) + '}'
- def setUp(self):
- TestBase.setUp(self)
-
@skipIf(oslist=no_match(['linux']))
@skipIf(archs=no_match(['x86_64']))
def test_mpx_registers_offset_intersection(self):
self.main_source_file = lldb.SBFileSpec("main.c")
self.step_out_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def step_out_test(self):
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
"Set a breakpoint here", self.main_source_file)
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@no_debug_info_test
def test_version(self):
# Should work even when people patch the output,
class TestWatchpointSetEnable(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def test_disable_works (self):
"""Set a watchpoint, disable it, and make sure it doesn't get hit."""
self.build()
self.build()
self.address_breakpoints()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def address_breakpoints(self):
"""Test address breakpoints set with shared library of SBAddress work correctly."""
exe = self.getBuildArtifact("a.out")
self.build()
self.address_breakpoints()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def address_breakpoints(self):
"""Test that breakpoints set on a bad address say they are bad."""
target, process, thread, bkpt = \
return process
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def simple_auto_continue(self):
bpno = self.make_target_and_bkpt()
process = self.launch_it(lldb.eStateExited)
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
-
def check_location_file(self, bp, loc, test_name):
bp_loc = bp.GetLocationAtIndex(loc)
addr = bp_loc.GetAddress()
self.build()
self.do_test_bad_options()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def make_target_and_import(self):
target = lldbutil.run_to_breakpoint_make_target(self)
interp = self.dbg.GetCommandInterpreter()
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
def test_with_run_command(self):
"""
Test that hardcoded summary formatter matches aren't improperly cached.
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
@no_debug_info_test
def test_type_summary_list_with_arg(self):
"""Test that the 'type summary list' command handles command line arguments properly"""
"""Test the !N and !-N functionality of the command interpreter."""
self.sample_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def sample_test(self):
interp = self.dbg.GetCommandInterpreter()
result = lldb.SBCommandReturnObject()
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
@expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
@skipIf(oslist=no_match(['darwin','macos']))
def test(self):
"""Test that we find directly linked dylib pre-run."""
class TestStatsAPI(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
def test_stats_api(self):
self.build()
exe = self.getBuildArtifact("a.out")
self.build()
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def do_test(self):
exe = self.getBuildArtifact("a.out")
self.assertEqual(frame4.GetDisplayFunctionName(), "main")
self.assertFalse(frame2.IsArtificial())
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def test_backtrace_depth(self):
"""Test that the max-backtrace-depth setting limits backtraces."""
self.build()
self.build()
self.tsan_tests()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def tsan_tests(self):
exe = self.getBuildArtifact("a.out")
self.expect(
self.build()
self.tsan_tests()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def tsan_tests(self):
exe = self.getBuildArtifact("a.out")
self.expect(
self.build()
self.tsan_tests()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def tsan_tests(self):
exe = self.getBuildArtifact("a.out")
self.expect(
self.build()
self.tsan_tests()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def tsan_tests(self):
exe = self.getBuildArtifact("a.out")
self.expect(
self.build()
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def verify_point(self, frame, var_name, var_typename, x_value, y_value):
v = frame.GetValueForVariablePath(var_name)
self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % (var_name))
self.build()
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def do_test(self):
"""Make sure FindTypes actually finds 'struct typename' not just 'typename'."""
exe = self.getBuildArtifact("a.out")
self.main_source_file = lldb.SBFileSpec("main.c")
self.expr_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def run_and_check_expr(self, num_children, child_type):
frame = self.thread.GetFrameAtIndex(0)
result = frame.EvaluateExpression("struct Foo *$mine = (struct Foo *) malloc(sizeof(struct Foo)); $mine")
self.main_source_file = lldb.SBFileSpec("main.cpp")
self.sample_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def sample_test(self):
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
"Break here to get started", self.main_source_file)
self.main_source_file = lldb.SBFileSpec("main.cpp")
self.expr_test(False)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def check_value(self, test_var, ivar_value):
self.assertTrue(test_var.GetError().Success(), "Invalid valobj: %s"%(test_var.GetError().GetCString()))
ivar = test_var.GetChildMemberWithName("ivar")
class TestClangModuleAppUpdate(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipUnlessDarwin
@skipIf(debug_info=no_match(["gmodules"]))
def test_rebuild_app_modules_untouched(self):
NO_DEBUG_INFO_TESTCASE = True
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipUnlessDarwin
def test_expr(self):
self.build()
class TestClangModuleHashMismatch(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipUnlessDarwin
@skipIf(debug_info=no_match(["gmodules"]))
def test_expr(self):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
@skipUnlessDarwin
@skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"]))
def test_expr(self):
class TestClangModuleUpdate(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipUnlessDarwin
@skipIf(debug_info=no_match(["gmodules"]))
def test_expr(self):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipUnlessDarwin
def test_bridged_type_po(self):
self.build()
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@skipIfFreeBSD
@skipIfLinux
@skipIfWindows
class TestMixedDwarfBinary(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- TestBase.setUp(self)
-
@no_debug_info_test # Prevent the genaration of the dwarf version of this test
@add_test_categories(["dwo"])
@skipUnlessPlatform(["linux"])
self.main_source_file = lldb.SBFileSpec("main.c")
self.find_app_in_bundle_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def find_app_in_bundle_test(self):
"""This reads in the .app, makes sure we get the right binary and can run it."""
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
@skipUnlessDarwin
@add_test_categories(['pyapi'])
def test_with_python_api(self):
self.yaml2obj("libDylib.dylib.yaml", self.getBuildArtifact("libDylib.dylib"))
self.do_test()
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def do_test(self):
lib_name = "libDylib.dylib"
target = lldbutil.run_to_breakpoint_make_target(self, exe_name=lib_name)
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
def setup_test(self):
# Get the full path to our executable to be debugged.
self.exe = self.getBuildArtifact("process_io")
def test(self):
self.structured_data_api_test()
- def setUp(self):
- TestBase.setUp(self)
-
@add_test_categories(['pyapi'])
def structured_data_api_test(self):
error = lldb.SBError()
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
@add_test_categories(['pyapi'])
def test_with_process_launch_api(self):
"""Test SBValue::GetValueDidChange"""