diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:57 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:57 +0000 |
| commit | 88c643b6fec27eec436c8d138fee6346e92337d6 (patch) | |
| tree | 82cd13b2f3cde1c9e5f79689ba4e6ba67694843f /packages/Python/lldbsuite/test/python_api/default-constructor | |
| parent | 94994d372d014ce4c8758b9605d63fae651bd8aa (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/default-constructor')
32 files changed, 0 insertions, 1299 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py deleted file mode 100644 index 5c0c7bbd766a..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py +++ /dev/null @@ -1,421 +0,0 @@ -""" -Test lldb Python API object's default constructor and make sure it is invalid -after initial construction. - -There are also some cases of boundary condition testings sprinkled throughout -the tests where None is passed to SB API which expects (const char *) in the -C++ API counterpart. Passing None should not crash lldb! - -There are three exceptions to the above general rules, though; API objects -SBCommadnReturnObject, SBStream, and SBSymbolContextList, are all valid objects -after default construction. -""" - -from __future__ import print_function - - -import os -import time -import re -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class APIDefaultConstructorTestCase(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBAddress(self): - obj = lldb.SBAddress() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_address - sb_address.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBBlock(self): - obj = lldb.SBBlock() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_block - sb_block.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBBreakpoint(self): - obj = lldb.SBBreakpoint() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_breakpoint - sb_breakpoint.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBBreakpointLocation(self): - obj = lldb.SBBreakpointLocation() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_breakpointlocation - sb_breakpointlocation.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBBreakpointName(self): - obj = lldb.SBBreakpointName() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_breakpointname - sb_breakpointname.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBBroadcaster(self): - obj = lldb.SBBroadcaster() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_broadcaster - sb_broadcaster.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBCommandReturnObject(self): - """SBCommandReturnObject object is valid after default construction.""" - obj = lldb.SBCommandReturnObject() - if self.TraceOn(): - print(obj) - self.assertTrue(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBCommunication(self): - obj = lldb.SBCommunication() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_communication - sb_communication.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBCompileUnit(self): - obj = lldb.SBCompileUnit() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_compileunit - sb_compileunit.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBDebugger(self): - obj = lldb.SBDebugger() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_debugger - sb_debugger.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - # darwin: This test passes with swig 3.0.2, fails w/3.0.5 other tests fail - # with 2.0.12 http://llvm.org/pr23488 - def test_SBError(self): - obj = lldb.SBError() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_error - sb_error.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBEvent(self): - obj = lldb.SBEvent() - # This is just to test that typemap, as defined in lldb.swig, works. - obj2 = lldb.SBEvent(0, "abc") - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_event - sb_event.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - def test_SBFileSpec(self): - obj = lldb.SBFileSpec() - # This is just to test that FileSpec(None) does not crash. - obj2 = lldb.SBFileSpec(None, True) - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_filespec - sb_filespec.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBFrame(self): - obj = lldb.SBFrame() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_frame - sb_frame.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBFunction(self): - obj = lldb.SBFunction() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_function - sb_function.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBInstruction(self): - obj = lldb.SBInstruction() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_instruction - sb_instruction.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBInstructionList(self): - obj = lldb.SBInstructionList() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_instructionlist - sb_instructionlist.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBLineEntry(self): - obj = lldb.SBLineEntry() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_lineentry - sb_lineentry.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBListener(self): - obj = lldb.SBListener() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_listener - sb_listener.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - # Py3 asserts due to a bug in SWIG. Trying to upstream a patch to fix - # this in 3.0.8 - @skipIf(py_version=['>=', (3, 0)], swig_version=['<', (3, 0, 8)]) - def test_SBModule(self): - obj = lldb.SBModule() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_module - sb_module.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBProcess(self): - obj = lldb.SBProcess() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_process - sb_process.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBProcessInfo(self): - obj = lldb.SBProcessInfo() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_process_info - sb_process_info.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBSection(self): - obj = lldb.SBSection() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_section - sb_section.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBStream(self): - """SBStream object is valid after default construction.""" - obj = lldb.SBStream() - if self.TraceOn(): - print(obj) - self.assertTrue(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBStringList(self): - obj = lldb.SBStringList() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_stringlist - sb_stringlist.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBSymbol(self): - obj = lldb.SBSymbol() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_symbol - sb_symbol.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBSymbolContext(self): - obj = lldb.SBSymbolContext() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_symbolcontext - sb_symbolcontext.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBSymbolContextList(self): - """SBSymbolContextList object is valid after default construction.""" - obj = lldb.SBSymbolContextList() - if self.TraceOn(): - print(obj) - self.assertTrue(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBTarget(self): - obj = lldb.SBTarget() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_target - sb_target.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBThread(self): - obj = lldb.SBThread() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_thread - sb_thread.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBType(self): - try: - obj = lldb.SBType() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # If we reach here, the test fails. - self.fail("lldb.SBType() should fail, not succeed!") - except: - # Exception is expected. - return - - # Unreachable code because lldb.SBType() should fail. - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_type - sb_type.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBTypeList(self): - """SBTypeList object is valid after default construction.""" - obj = lldb.SBTypeList() - if self.TraceOn(): - print(obj) - self.assertTrue(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBValue(self): - obj = lldb.SBValue() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_value - sb_value.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBValueList(self): - obj = lldb.SBValueList() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_valuelist - sb_valuelist.fuzz_obj(obj) - - @add_test_categories(['pyapi']) - @no_debug_info_test - def test_SBWatchpoint(self): - obj = lldb.SBWatchpoint() - if self.TraceOn(): - print(obj) - self.assertFalse(obj) - # Do fuzz testing on the invalid obj, it should not crash lldb. - import sb_watchpoint - sb_watchpoint.fuzz_obj(obj) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py deleted file mode 100644 index 8f9665d3a73f..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetFileAddress() - obj.GetLoadAddress(lldb.SBTarget()) - obj.SetLoadAddress(0xffff, lldb.SBTarget()) - obj.OffsetAddress(sys.maxsize) - obj.GetDescription(lldb.SBStream()) - obj.GetSection() - obj.GetSymbolContext(lldb.eSymbolContextEverything) - obj.GetModule() - obj.GetCompileUnit() - obj.GetFunction() - obj.GetBlock() - obj.GetSymbol() - obj.GetLineEntry() - obj.Clear() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py deleted file mode 100644 index 00654ca1246c..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.IsInlined() - obj.GetInlinedName() - obj.GetInlinedCallSiteFile() - obj.GetInlinedCallSiteLine() - obj.GetInlinedCallSiteColumn() - obj.GetParent() - obj.GetSibling() - obj.GetFirstChild() - obj.GetDescription(lldb.SBStream()) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpoint.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpoint.py deleted file mode 100644 index 3bdf5879d30d..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpoint.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetID() - obj.ClearAllBreakpointSites() - obj.FindLocationByAddress(sys.maxsize) - obj.FindLocationIDByAddress(sys.maxsize) - obj.FindLocationByID(0) - obj.GetLocationAtIndex(0) - obj.SetEnabled(True) - obj.IsEnabled() - obj.GetHitCount() - obj.SetIgnoreCount(1) - obj.GetIgnoreCount() - obj.SetCondition("i >= 10") - obj.GetCondition() - obj.SetThreadID(0) - obj.GetThreadID() - obj.SetThreadIndex(0) - obj.GetThreadIndex() - obj.SetThreadName("worker thread") - obj.GetThreadName() - obj.SetQueueName("my queue") - obj.GetQueueName() - obj.SetScriptCallbackFunction(None) - obj.SetScriptCallbackBody(None) - obj.GetNumResolvedLocations() - obj.GetNumLocations() - obj.GetDescription(lldb.SBStream()) - for bp_loc in obj: - s = str(bp_loc) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py deleted file mode 100644 index 26bf6f69c5de..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetAddress() - obj.GetLoadAddress() - obj.SetEnabled(True) - obj.IsEnabled() - obj.SetCondition("i >= 10") - obj.GetCondition() - obj.SetThreadID(0) - obj.GetThreadID() - obj.SetThreadIndex(0) - obj.GetThreadIndex() - obj.SetThreadName("worker thread") - obj.GetThreadName() - obj.SetQueueName("my queue") - obj.GetQueueName() - obj.IsResolved() - obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose) - breakpoint = obj.GetBreakpoint() - # Do fuzz testing on the breakpoint obj, it should not crash lldb. - import sb_breakpoint - sb_breakpoint.fuzz_obj(breakpoint) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py deleted file mode 100644 index 56016c05c313..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py +++ /dev/null @@ -1,42 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.IsValid() - obj.GetName() - obj.SetEnabled(True) - obj.IsEnabled() - obj.SetOneShot(True) - obj.IsOneShot() - obj.SetIgnoreCount(1) - obj.GetIgnoreCount() - obj.SetCondition("1 == 2") - obj.GetCondition() - obj.SetAutoContinue(False) - obj.GetAutoContinue() - obj.SetThreadID(0x1234) - obj.GetThreadID() - obj.SetThreadIndex(10) - obj.GetThreadIndex() - obj.SetThreadName("AThread") - obj.GetThreadName() - obj.SetQueueName("AQueue") - obj.GetQueueName() - obj.SetScriptCallbackFunction("AFunction") - commands = lldb.SBStringList() - obj.SetCommandLineCommands(commands) - obj.GetCommandLineCommands(commands) - obj.SetScriptCallbackBody("Insert Python Code here") - obj.GetAllowList() - obj.SetAllowList(False) - obj.GetAllowDelete() - obj.SetAllowDelete(False) - obj.GetAllowDisable() - obj.SetAllowDisable(False) - stream = lldb.SBStream() - obj.GetDescription(stream) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py deleted file mode 100644 index b2f5ab5b2c5c..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.BroadcastEventByType(lldb.eBreakpointEventTypeInvalidType, True) - obj.BroadcastEvent(lldb.SBEvent(), False) - listener = lldb.SBListener("fuzz_testing") - obj.AddInitialEventsToListener(listener, 0xffffffff) - obj.AddInitialEventsToListener(listener, 0) - obj.AddListener(listener, 0xffffffff) - obj.AddListener(listener, 0) - obj.GetName() - obj.EventTypeHasListeners(0) - obj.RemoveListener(listener, 0xffffffff) - obj.RemoveListener(listener, 0) - obj.Clear() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py deleted file mode 100644 index 9793e9be20e3..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - broadcaster = obj.GetBroadcaster() - # Do fuzz testing on the broadcaster obj, it should not crash lldb. - import sb_broadcaster - sb_broadcaster.fuzz_obj(broadcaster) - obj.AdoptFileDesriptor(0, False) - obj.AdoptFileDesriptor(1, False) - obj.AdoptFileDesriptor(2, False) - obj.Connect("file:/tmp/myfile") - obj.Connect(None) - obj.Disconnect() - obj.IsConnected() - obj.GetCloseOnEOF() - obj.SetCloseOnEOF(True) - obj.SetCloseOnEOF(False) - #obj.Write(None, sys.maxint, None) - #obj.Read(None, sys.maxint, 0xffffffff, None) - obj.ReadThreadStart() - obj.ReadThreadStop() - obj.ReadThreadIsRunning() - obj.SetReadThreadBytesReceivedCallback(None, None) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py deleted file mode 100644 index 0c27c94b752a..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetFileSpec() - obj.GetNumLineEntries() - obj.GetLineEntryAtIndex(0xffffffff) - obj.FindLineEntryIndex(0, 0xffffffff, None) - obj.GetDescription(lldb.SBStream()) - for line_entry in obj: - s = str(line_entry) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py deleted file mode 100644 index ac0f9a8aeb94..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py +++ /dev/null @@ -1,61 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.SetAsync(True) - obj.SetAsync(False) - obj.GetAsync() - obj.SkipLLDBInitFiles(True) - obj.SetInputFileHandle(None, True) - obj.SetOutputFileHandle(None, True) - obj.SetErrorFileHandle(None, True) - obj.GetInputFileHandle() - obj.GetOutputFileHandle() - obj.GetErrorFileHandle() - obj.GetCommandInterpreter() - obj.HandleCommand("nothing here") - listener = obj.GetListener() - obj.HandleProcessEvent(lldb.SBProcess(), lldb.SBEvent(), None, None) - obj.CreateTargetWithFileAndTargetTriple("a.out", "A-B-C") - obj.CreateTargetWithFileAndArch("b.out", "arm") - obj.CreateTarget("c.out") - obj.DeleteTarget(lldb.SBTarget()) - obj.GetTargetAtIndex(0xffffffff) - obj.FindTargetWithProcessID(0) - obj.FindTargetWithFileAndArch("a.out", "arm") - obj.GetNumTargets() - obj.GetSelectedTarget() - obj.GetNumPlatforms() - obj.GetPlatformAtIndex(0xffffffff) - obj.GetNumAvailablePlatforms() - obj.GetAvailablePlatformInfoAtIndex(0xffffffff) - obj.GetSourceManager() - obj.SetSelectedTarget(lldb.SBTarget()) - obj.SetCurrentPlatformSDKRoot("tmp/sdk-root") - try: - obj.DispatchInput(None) - except Exception: - pass - obj.DispatchInputInterrupt() - obj.DispatchInputEndOfFile() - obj.GetInstanceName() - obj.GetDescription(lldb.SBStream()) - obj.GetTerminalWidth() - obj.SetTerminalWidth(0xffffffff) - obj.GetID() - obj.GetPrompt() - obj.SetPrompt("Hi, Mom!") - obj.GetScriptLanguage() - obj.SetScriptLanguage(lldb.eScriptLanguageNone) - obj.SetScriptLanguage(lldb.eScriptLanguagePython) - obj.GetCloseInputOnEOF() - obj.SetCloseInputOnEOF(True) - obj.SetCloseInputOnEOF(False) - obj.Clear() - for target in obj: - s = str(target) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py deleted file mode 100644 index 9c0f8d8e6d82..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetCString() - obj.Fail() - obj.Success() - obj.GetError() - obj.GetType() - obj.SetError(5, lldb.eErrorTypeGeneric) - obj.SetErrorToErrno() - obj.SetErrorToGenericError() - obj.SetErrorString("xyz") - obj.SetErrorString(None) - obj.SetErrorStringWithFormat("%s!", "error") - obj.SetErrorStringWithFormat(None) - obj.SetErrorStringWithFormat("error") - obj.SetErrorStringWithFormat("%s %s", "warning", "danger") - obj.SetErrorStringWithFormat("%s %s %s", "danger", "will", "robinson") - obj.GetDescription(lldb.SBStream()) - obj.Clear() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py deleted file mode 100644 index 4c24c606fa21..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetDataFlavor() - obj.GetType() - broadcaster = obj.GetBroadcaster() - # Do fuzz testing on the broadcaster obj, it should not crash lldb. - import sb_broadcaster - sb_broadcaster.fuzz_obj(broadcaster) - obj.BroadcasterMatchesRef(broadcaster) - obj.GetDescription(lldb.SBStream()) - obj.Clear() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py deleted file mode 100644 index 33b4d69cd6ae..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.Exists() - obj.ResolveExecutableLocation() - obj.GetFilename() - obj.GetDirectory() - obj.GetPath(None, 0) - obj.GetDescription(lldb.SBStream()) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py deleted file mode 100644 index 4637fc428d8c..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetFrameID() - obj.GetPC() - obj.SetPC(0xffffffff) - obj.GetSP() - obj.GetFP() - obj.GetPCAddress() - obj.GetSymbolContext(0) - obj.GetModule() - obj.GetCompileUnit() - obj.GetFunction() - obj.GetSymbol() - obj.GetBlock() - obj.GetFunctionName() - obj.IsInlined() - obj.EvaluateExpression("x + y") - obj.EvaluateExpression("x + y", lldb.eDynamicCanRunTarget) - obj.GetFrameBlock() - obj.GetLineEntry() - obj.GetThread() - obj.Disassemble() - obj.GetVariables(True, True, True, True) - obj.GetVariables(True, True, True, False, lldb.eDynamicCanRunTarget) - obj.GetRegisters() - obj.FindVariable("my_var") - obj.FindVariable("my_var", lldb.eDynamicCanRunTarget) - obj.FindValue("your_var", lldb.eValueTypeVariableGlobal) - obj.FindValue( - "your_var", - lldb.eValueTypeVariableStatic, - lldb.eDynamicCanRunTarget) - obj.GetDescription(lldb.SBStream()) - obj.Clear() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py deleted file mode 100644 index bd9c887e50fd..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetName() - obj.GetMangledName() - obj.GetInstructions(lldb.SBTarget()) - sa = obj.GetStartAddress() - ea = obj.GetEndAddress() - # Do fuzz testing on the address obj, it should not crash lldb. - import sb_address - sb_address.fuzz_obj(sa) - sb_address.fuzz_obj(ea) - obj.GetPrologueByteSize - obj.GetDescription(lldb.SBStream()) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py deleted file mode 100644 index e0be4132fc09..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetAddress() - obj.GetByteSize() - obj.DoesBranch() - obj.Print(None) - obj.GetDescription(lldb.SBStream()) - obj.EmulateWithFrame(lldb.SBFrame(), 0) - obj.DumpEmulation("armv7") - obj.TestEmulation(lldb.SBStream(), "my-file") diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py deleted file mode 100644 index 8870bf5de472..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetSize() - obj.GetInstructionAtIndex(0xffffffff) - obj.AppendInstruction(lldb.SBInstruction()) - obj.Print(None) - obj.GetDescription(lldb.SBStream()) - obj.DumpEmulationForAllInstructions("armv7") - obj.Clear() - for inst in obj: - s = str(inst) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py deleted file mode 100644 index 9c89792791f7..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetStartAddress() - obj.GetEndAddress() - obj.GetFileSpec() - obj.GetLine() - obj.GetColumn() - obj.GetDescription(lldb.SBStream()) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py deleted file mode 100644 index 5f0ebdae73b5..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.AddEvent(lldb.SBEvent()) - obj.StartListeningForEvents(lldb.SBBroadcaster(), 0xffffffff) - obj.StopListeningForEvents(lldb.SBBroadcaster(), 0xffffffff) - event = lldb.SBEvent() - broadcaster = lldb.SBBroadcaster() - obj.WaitForEvent(5, event) - obj.WaitForEventForBroadcaster(5, broadcaster, event) - obj.WaitForEventForBroadcasterWithType(5, broadcaster, 0xffffffff, event) - obj.PeekAtNextEvent(event) - obj.PeekAtNextEventForBroadcaster(broadcaster, event) - obj.PeekAtNextEventForBroadcasterWithType(broadcaster, 0xffffffff, event) - obj.GetNextEvent(event) - obj.GetNextEventForBroadcaster(broadcaster, event) - obj.GetNextEventForBroadcasterWithType(broadcaster, 0xffffffff, event) - obj.HandleBroadcastEvent(event) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_module.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_module.py deleted file mode 100644 index 175550a5a0fc..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_module.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetFileSpec() - obj.GetPlatformFileSpec() - obj.SetPlatformFileSpec(lldb.SBFileSpec()) - obj.GetUUIDString() - obj.ResolveFileAddress(sys.maxsize) - obj.ResolveSymbolContextForAddress(lldb.SBAddress(), 0) - obj.GetDescription(lldb.SBStream()) - obj.GetNumSymbols() - obj.GetSymbolAtIndex(sys.maxsize) - sc_list = obj.FindFunctions("my_func") - sc_list = obj.FindFunctions("my_func", lldb.eFunctionNameTypeAny) - obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1) - for section in obj.section_iter(): - s = str(section) - for symbol in obj.symbol_in_section_iter(lldb.SBSection()): - s = str(symbol) - for symbol in obj: - s = str(symbol) - obj.GetAddressByteSize() - obj.GetByteOrder() - obj.GetTriple() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py deleted file mode 100644 index 5a3e1e6903cf..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetTarget() - obj.GetByteOrder() - obj.PutSTDIN("my data") - obj.GetSTDOUT(6) - obj.GetSTDERR(6) - event = lldb.SBEvent() - obj.ReportEventState(event, None) - obj.AppendEventStateReport(event, lldb.SBCommandReturnObject()) - error = lldb.SBError() - obj.RemoteAttachToProcessWithID(123, error) - obj.RemoteLaunch(None, None, None, None, None, None, 0, False, error) - obj.GetNumThreads() - obj.GetThreadAtIndex(0) - obj.GetThreadByID(0) - obj.GetSelectedThread() - obj.SetSelectedThread(lldb.SBThread()) - obj.SetSelectedThreadByID(0) - obj.GetState() - obj.GetExitStatus() - obj.GetExitDescription() - obj.GetProcessID() - obj.GetAddressByteSize() - obj.Destroy() - obj.Continue() - obj.Stop() - obj.Kill() - obj.Detach() - obj.Signal(7) - obj.ReadMemory(0x0000ffff, 10, error) - obj.WriteMemory(0x0000ffff, "hi data", error) - obj.ReadCStringFromMemory(0x0, 128, error) - obj.ReadUnsignedFromMemory(0xff, 4, error) - obj.ReadPointerFromMemory(0xff, error) - obj.GetBroadcaster() - obj.GetDescription(lldb.SBStream()) - obj.LoadImage(lldb.SBFileSpec(), error) - obj.UnloadImage(0) - obj.Clear() - obj.GetNumSupportedHardwareWatchpoints(error) - for thread in obj: - s = str(thread) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py deleted file mode 100644 index 020ad4e10664..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.IsValid() - obj.GetName() - obj.GetExecutableFile() - obj.GetProcessID() - obj.GetUserID() - obj.GetGroupID() - obj.UserIDIsValid() - obj.GroupIDIsValid() - obj.GetEffectiveUserID() - obj.GetEffectiveGroupID() - obj.EffectiveUserIDIsValid() - obj.EffectiveGroupIDIsValid() - obj.GetParentProcessID() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py deleted file mode 100644 index 5e25e94d017f..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.IsValid() - obj.GetName() - obj.FindSubSection("hello_section_name") - obj.GetNumSubSections() - obj.GetSubSectionAtIndex(600) - obj.GetFileAddress() - obj.GetByteSize() - obj.GetFileOffset() - obj.GetFileByteSize() - obj.GetSectionData(1000, 100) - obj.GetSectionType() - obj.GetDescription(lldb.SBStream()) - for subsec in obj: - s = str(subsec) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py deleted file mode 100644 index 44111addba59..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.AppendString("another string") - obj.AppendString(None) - obj.AppendList(None, 0) - obj.AppendList(lldb.SBStringList()) - obj.GetSize() - obj.GetStringAtIndex(0xffffffff) - obj.Clear() - for n in obj: - s = str(n) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py deleted file mode 100644 index d2d107a13c2a..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetName() - obj.GetMangledName() - obj.GetInstructions(lldb.SBTarget()) - obj.GetStartAddress() - obj.GetEndAddress() - obj.GetPrologueByteSize() - obj.GetType() - obj.GetDescription(lldb.SBStream()) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py deleted file mode 100644 index ac4392539db1..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetModule() - obj.GetCompileUnit() - obj.GetFunction() - obj.GetBlock() - obj.GetLineEntry() - obj.GetSymbol() - obj.GetDescription(lldb.SBStream()) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py deleted file mode 100644 index af7f17b69e7b..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py +++ /dev/null @@ -1,66 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetProcess() - listener = lldb.SBListener() - error = lldb.SBError() - obj.Launch(listener, None, None, None, None, None, None, 0, True, error) - obj.LaunchSimple(None, None, None) - obj.AttachToProcessWithID(listener, 123, error) - obj.AttachToProcessWithName(listener, 'lldb', False, error) - obj.ConnectRemote(listener, "connect://to/here", None, error) - obj.GetExecutable() - obj.GetNumModules() - obj.GetModuleAtIndex(0xffffffff) - obj.GetDebugger() - filespec = lldb.SBFileSpec() - obj.FindModule(filespec) - sc_list = obj.FindFunctions("the_func") - sc_list = obj.FindFunctions("the_func", lldb.eFunctionNameTypeAny) - obj.FindFirstType("dont_care") - obj.FindTypes("dont_care") - obj.FindFirstType(None) - obj.GetInstructions(lldb.SBAddress(), bytearray()) - obj.GetSourceManager() - obj.FindGlobalVariables("my_global_var", 1) - address = obj.ResolveLoadAddress(0xffff) - obj.ResolveSymbolContextForAddress(address, 0) - obj.BreakpointCreateByLocation("filename", 20) - obj.BreakpointCreateByLocation(filespec, 20) - obj.BreakpointCreateByName("func", None) - obj.BreakpointCreateByRegex("func.", None) - obj.BreakpointCreateByAddress(0xf0f0) - obj.GetNumBreakpoints() - obj.GetBreakpointAtIndex(0) - obj.BreakpointDelete(0) - obj.FindBreakpointByID(0) - obj.EnableAllBreakpoints() - obj.DisableAllBreakpoints() - obj.DeleteAllBreakpoints() - obj.GetNumWatchpoints() - obj.GetWatchpointAtIndex(0) - obj.DeleteWatchpoint(0) - obj.FindWatchpointByID(0) - obj.EnableAllWatchpoints() - obj.DisableAllWatchpoints() - obj.DeleteAllWatchpoints() - obj.GetAddressByteSize() - obj.GetByteOrder() - obj.GetTriple() - error = lldb.SBError() - obj.WatchAddress(123, 8, True, True, error) - obj.GetBroadcaster() - obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelBrief) - obj.Clear() - for module in obj.module_iter(): - s = str(module) - for bp in obj.breakpoint_iter(): - s = str(bp) - for wp in obj.watchpoint_iter(): - s = str(wp) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py deleted file mode 100644 index 088972532f74..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py +++ /dev/null @@ -1,38 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetStopReason() - obj.GetStopReasonDataCount() - obj.GetStopReasonDataAtIndex(100) - obj.GetStopDescription(256) - obj.GetThreadID() - obj.GetIndexID() - obj.GetName() - obj.GetQueueName() - obj.StepOver(lldb.eOnlyDuringStepping) - obj.StepInto(lldb.eOnlyDuringStepping) - obj.StepOut() - frame = lldb.SBFrame() - obj.StepOutOfFrame(frame) - obj.StepInstruction(True) - filespec = lldb.SBFileSpec() - obj.StepOverUntil(frame, filespec, 1234) - obj.RunToAddress(0xabcd) - obj.Suspend() - obj.Resume() - obj.IsSuspended() - obj.GetNumFrames() - obj.GetFrameAtIndex(200) - obj.GetSelectedFrame() - obj.SetSelectedFrame(999) - obj.GetProcess() - obj.GetDescription(lldb.SBStream()) - obj.Clear() - for frame in obj: - s = str(frame) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py deleted file mode 100644 index 6016a9004ec2..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetName() - obj.GetByteSize() - # obj.GetEncoding(5) - obj.GetNumberChildren(True) - member = lldb.SBTypeMember() - obj.GetChildAtIndex(True, 0, member) - obj.GetChildIndexForName(True, "_member_field") - obj.IsAPointerType() - obj.GetPointeeType() - obj.GetDescription(lldb.SBStream()) - obj.IsPointerType(None) - lldb.SBType.IsPointerType(None) - for child_type in obj: - s = str(child_type) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py deleted file mode 100644 index f283177425a7..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py +++ /dev/null @@ -1,68 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetError() - obj.GetID() - obj.GetName() - obj.GetTypeName() - obj.GetByteSize() - obj.IsInScope() - obj.GetFormat() - obj.SetFormat(lldb.eFormatBoolean) - obj.GetValue() - obj.GetValueType() - obj.GetValueDidChange() - obj.GetSummary() - obj.GetObjectDescription() - obj.GetLocation() - obj.SetValueFromCString("my_new_value") - obj.GetChildAtIndex(1) - obj.GetChildAtIndex(2, lldb.eNoDynamicValues, False) - obj.GetIndexOfChildWithName("my_first_child") - obj.GetChildMemberWithName("my_first_child") - obj.GetChildMemberWithName("my_first_child", lldb.eNoDynamicValues) - obj.GetNumChildren() - obj.GetOpaqueType() - obj.Dereference() - obj.TypeIsPointerType() - stream = lldb.SBStream() - obj.GetDescription(stream) - obj.GetExpressionPath(stream) - obj.GetExpressionPath(stream, True) - error = lldb.SBError() - obj.Watch(True, True, False, error) - obj.WatchPointee(True, False, True, error) - for child_val in obj: - s = str(child_val) - error = lldb.SBError() - obj.GetValueAsSigned(error, 0) - obj.GetValueAsUnsigned(error, 0) - obj.GetValueAsSigned(0) - obj.GetValueAsUnsigned(0) - obj.GetDynamicValue(lldb.eNoDynamicValues) - obj.GetStaticValue() - obj.IsDynamic() - invalid_type = lldb.SBType() - obj.CreateChildAtOffset("a", 12, invalid_type) - obj.Cast(invalid_type) - obj.CreateValueFromExpression("pt->x", "pt->x") - obj.CreateValueFromAddress("x", 0x123, invalid_type) - invalid_data = lldb.SBData() - obj.CreateValueFromData("x", invalid_data, invalid_type) - obj.GetValueForExpressionPath("[0]") - obj.AddressOf() - obj.GetLoadAddress() - obj.GetAddress() - obj.GetPointeeData(0, 1) - obj.GetData() - obj.GetTarget() - obj.GetProcess() - obj.GetThread() - obj.GetFrame() - obj.GetType() diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py deleted file mode 100644 index cbd9810c44ed..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.Append(lldb.SBValue()) - obj.GetSize() - obj.GetValueAtIndex(100) - obj.FindValueObjectByUID(200) - for val in obj: - s = str(val) diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py deleted file mode 100644 index b30d3bb8014d..000000000000 --- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -Fuzz tests an object after the default construction to make sure it does not crash lldb. -""" - -import sys -import lldb - - -def fuzz_obj(obj): - obj.GetID() - obj.IsValid() - obj.GetHardwareIndex() - obj.GetWatchAddress() - obj.GetWatchSize() - obj.SetEnabled(True) - obj.IsEnabled() - obj.GetHitCount() - obj.GetIgnoreCount() - obj.SetIgnoreCount(5) - obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose) - obj.SetCondition("shouldWeStop()") - obj.GetCondition() |
