summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
Commit message (Collapse)AuthorAgeFilesLines
* Switch SBBreakpointLocation to use a weak_ptrPavel Labath2017-03-011-0/+3
| | | | llvm-svn: 296594
* Switch SBWatchpoint to use a weak_ptr to the underlying objectPavel Labath2017-02-281-0/+3
| | | | llvm-svn: 296470
* Switch SBBreakpoint to storing a weak_ptr of the internal breakpoint objectPavel Labath2017-02-271-0/+23
| | | | | | | | | | | | | | | | | Summary: There is nothing we can do with the breakpoint once the associated target becomes deleted. This will make sure we don't hold on to more resources than we need in this case. In particular, this fixes the case TestStepOverBreakpoint on windows, where a lingering SBBreakpoint object causes us to nor unmap the executable file from memory. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30249 llvm-svn: 296328
* Fix TestNameLookup for GCCPavel Labath2017-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: GCC emits also symbols for the __PRETTY_FUNCTION__ virtual variable, which we accidentaly pick up when looking for functions for with "unique_function_name" in the name. This makes the target.FindFunctions call fail, as that symbol is not a function. I also strenghten the test a bit to make sure we actually find all the functions we are interested in. I've put a check that we find at least 6 functions, but maybe this should be *exactly* 6 ? Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29932 llvm-svn: 295170
* XFAIL TestNameLookup for GCCPavel Labath2017-02-141-1/+2
| | | | | | | I think I have a fix for this, but it needs review. This should keep the bots happy until then. llvm-svn: 295047
* Fix buildbots.Greg Clayton2017-02-131-1/+1
| | | | llvm-svn: 294991
* FindFunctions now works again with mangled names.Greg Clayton2017-02-133-0/+124
| | | | | | <rdar://problem/28147057> llvm-svn: 294990
* Improve asserts in TestWatchpointIgnoreCountPavel Labath2017-02-101-9/+7
| | | | | | | | This test is flaky on the windows->android bot. Change assertTrue to assertEqual in the hope better error messages will direct us to the problem. llvm-svn: 294737
* Fix SBData::SetData() so that it always sets the address byte size correctly ↵Greg Clayton2017-01-251-0/+20
| | | | | | and added a test. llvm-svn: 293102
* Fix dereferencing of pointers to empty classesTamas Berghammer2017-01-073-0/+81
| | | | llvm-svn: 291350
* [LLDB][MIPS] All tests get errors in dotest after this test.Nitesh Jain2016-10-101-0/+1
| | | | | Subscribers: jaydeep, bhushan, slthakur, llvm-commits llvm-svn: 283739
* xfail TestSBTypeTypeClass.py on macOS i386Todd Fiala2016-10-061-1/+5
| | | | | | | Tracked by: rdar://28656677 llvm-svn: 283484
* Fixup the xfail situation on Windows.Zachary Turner2016-10-051-0/+1
| | | | | | Xfails added and/or removed to reflect the current state of Windows. llvm-svn: 283380
* Revert "XFAIL TestSBData for gcc-4.9 i386"Pavel Labath2016-10-021-1/+0
| | | | | | Test fixed. llvm-svn: 283069
* XFAIL TestSBData for gcc-4.9 i386Pavel Labath2016-09-301-0/+1
| | | | | | test broken in r282659. llvm-svn: 282849
* use assertEquals in TestSBTypeClassMembersTodd Fiala2016-09-281-26/+33
| | | | | | | | This change replaces the self.assertTrue() calls with self.assertEquals() so that test failures get more context on failure values. llvm-svn: 282628
* Fix TestSymbolContextTwoFiles on Android after rL281595Tamas Berghammer2016-09-151-1/+1
| | | | llvm-svn: 281601
* Add support for DW_AT_ranges_base attributeTamas Berghammer2016-09-154-19/+71
| | | | | | | | | | | | | It is a new attribute emitted by clang as a GNU extension and will be part of Dwarf5. The purpose of the attribute is to specify a compile unit level base value for all DW_AT_ranges to reduce the number of relocations have to be done by the linker. Fixes (at least partially): https://llvm.org/pr28826 Differential revision: https://reviews.llvm.org/D24514 llvm-svn: 281595
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0676-1036/+2071
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Skip TestDisassembleRawData when remoteFrancis Ricci2016-07-011-0/+1
| | | | | | | | | | | | | | | Summary: As this test will create a new target, it will cause all following tests to fail when running in platform mode, if the new target does not match the existing architecture (for example, x86 vs x86_64). Reviewers: zturner, spyffe, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D21906 llvm-svn: 274364
* Revert "Make lldbinline.py regenerate the Makefile each time it builds."Pavel Labath2016-06-071-9/+0
| | | | | | This reverts commit r272024 as it is not windows-compatible. llvm-svn: 272062
* Make lldbinline.py regenerate the Makefile each time it builds.Sean Callanan2016-06-071-0/+9
| | | | | | | | | | | | | If a lldbinline test's source file changed language, then the Makefile wasn't updated. This was a problem if the Makefile was checked into the repository. Now lldbinline.py always regenerates the Makefile and asserts if the newly-generated version is not the same as the one already there. This ensures that the repository will never be out of date without a buildbot failing. http://reviews.llvm.org/D21032 llvm-svn: 272024
* Clean up test results on Windows.Zachary Turner2016-05-132-0/+2
| | | | | | | | | Remove XFAIL from some tests that now pass. Add XFAIL to some tests that now fail. Fix a crasher where a null pointer check isn't guarded. Properly handle all types of errors in SymbolFilePDB. llvm-svn: 269454
* Xfail failing watchpoint tests on aarch64-linuxOmair Javaid2016-05-111-0/+1
| | | | | | | | Some watchpoint tests fail on aarch64-linux as it lacks support for intalling watchpoints which are not alligned at 8bytes boundary. Marking them as xfail for now. llvm-svn: 269187
* Mark TestPrintStackTraces as flaky on linuxPavel Labath2016-05-091-0/+1
| | | | | | PR27687 llvm-svn: 268934
* Fix TestEvents.py on OS XTodd Fiala2016-05-051-3/+6
| | | | | | | | | | | | | | | | | | | | | This change addresses a hang/segfault in TestEvents.py. The threads that run the listener loops now do an SBListener.Clear() before they wrap up their work. This prevents the test from trying to clean up the SBListener too late. There is a separate issue here which is that we should prevent this clean-up time lock-up, but that is out of scope for this particular change. I'd like to get these tests back and running the normal flow rather than skipping them. This addresses: llvm.org/pr25924 (at least, the OS X side, although I suspect this will also address Linux) http://reviews.llvm.org/D19983 reviewed by: Jim Ingham llvm-svn: 268653
* Fix DW_AT_specification handling in DWO filesPavel Labath2016-05-055-0/+70
| | | | | | | | | | | | | | | Summary: We were trying to get a DWARFDIE from a CompileUnit belonging to a DWO file. However, this function does not understand the die encoding used by the DWO files. Instead use GetDIE on the SymbolFileDWARF, which is overriden in DWO to do the right thing. Reviewers: clayborg, tberghammer Subscribers: lldb-commits, ovyalov Differential Revision: http://reviews.llvm.org/D19927 llvm-svn: 268615
* Remote flaky decorator from TestSignalsAPI on linuxPavel Labath2016-04-281-1/+0
| | | | | | | The test seems to pass now, and the test does not seem to be doing anything unusual, so I don't expect it to cause problems. llvm-svn: 267867
* Fix TestGetVariables.py.Chaoren Lin2016-04-252-2/+3
| | | | | | | | | | Reviewers: sivachandra, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19511 llvm-svn: 267492
* Fix StackFrame::GetVariables(...) function that was broken by 261858 when ↵Greg Clayton2016-04-253-0/+223
| | | | | | | | lambda functions were added to Block::AppendBlockVariables(). The Stackframe::GetVariables(...) function should get all variables regardless if they are in scope. This wasn't caught by the test suite so I added a test for it. llvm-svn: 267478
* Fix test cases for big-endian systemsUlrich Weigand2016-04-142-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of test cases were failing on big-endian systems simply due to byte order assumptions in the tests themselves, and no underlying bug in LLDB. These two test cases: tools/lldb-server/lldbgdbserverutils.py python_api/process/TestProcessAPI.py actually check for big-endian target byte order, but contain Python errors in the corresponding code paths. These test cases: functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py functionalities/data-formatter/synthcapping/TestSyntheticCapping.py lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py python_api/sbdata/TestSBData.py (first change) could be fixed to check for big-endian target byte order and update the expected result strings accordingly. For the two synthetic tests, I've also updated the source to make sure the fake_a value is always nonzero on both big- and little-endian platforms. These test case: python_api/sbdata/TestSBData.py (second change) functionalities/memory/cache/TestMemoryCache.py simply accessed memory with the wrong size, which wasn't noticed on LE but fails on BE. Differential Revision: http://reviews.llvm.org/D18985 llvm-svn: 266315
* Support Linux on SystemZ as platformUlrich Weigand2016-04-144-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Linux on SystemZ: - A new ArchSpec value of eCore_s390x_generic - A new directory Plugins/ABI/SysV-s390x providing an ABI implementation - Register context support - Native Linux support including watchpoint support - ELF core file support - Misc. support throughout the code base (e.g. breakpoint opcodes) - Test case updates to support the platform This should provide complete support for debugging the SystemZ platform. Not yet supported are optional features like transaction support (zEC12) or SIMD vector support (z13). There is no instruction emulation, since our ABI requires that all code provide correct DWARF CFI at all PC locations in .eh_frame to support unwinding (i.e. -fasynchronous-unwind-tables is on by default). The implementation follows existing platforms in a mostly straightforward manner. A couple of things that are different: - We do not use PTRACE_PEEKUSER / PTRACE_POKEUSER to access single registers, since some registers (access register) reside at offsets in the user area that are multiples of 4, but the PTRACE_PEEKUSER interface only allows accessing aligned 8-byte blocks in the user area. Instead, we use a s390 specific ptrace interface PTRACE_PEEKUSR_AREA / PTRACE_POKEUSR_AREA that allows accessing a whole block of the user area in one go, so in effect allowing to treat parts of the user area as register sets. - SystemZ hardware does not provide any means to implement read watchpoints, only write watchpoints. In fact, we can only support a *single* write watchpoint (but this can span a range of arbitrary size). In LLDB this means we support only a single watchpoint. I've set all test cases that require read watchpoints (or multiple watchpoints) to expected failure on the platform. [ Note that there were two test cases that install a read/write watchpoint even though they nowhere rely on the "read" property. I've changed those to simply use plain write watchpoints. ] Differential Revision: http://reviews.llvm.org/D18978 llvm-svn: 266308
* Mark TestPrintStackTraces as flaky on android armPavel Labath2016-04-111-0/+1
| | | | llvm-svn: 265959
* Extend XFlaky in TestProcessIO to linux as wellPavel Labath2016-03-141-5/+5
| | | | | | The test sometimes fails on local linux as well. The cause is the same. llvm-svn: 263421
* Remove the skip if Darwin since I fixed the crash.Jim Ingham2016-03-111-1/+0
| | | | llvm-svn: 263283
* skip newly segfaulting test on OS X public CITodd Fiala2016-03-111-0/+1
| | | | llvm-svn: 263205
* Remove expectedFailureFreeBSD decoratorEd Maste2016-02-191-1/+1
| | | | | | | | All invocations are updated to use the generic expectedFailureAll. Differential Revision: http://reviews.llvm.org/D17455 llvm-svn: 261355
* Remove expectedFailureLinux decorator.Zachary Turner2016-02-101-2/+2
| | | | llvm-svn: 260422
* Change lldb.value.__int__() so that it takes into account the signedness of ↵Enrico Granata2016-02-102-0/+13
| | | | | | | | | | the value being cast to return a Python number with the proper value The explicit APIs on SBValue obviously remain if one wants to be explicit in intent, or override this guess, but since __int__() has to pick one, an educated guess is definitely better than than always going to signed regardless Fixes rdar://24556976 llvm-svn: 260349
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-0817-18/+18
| | | | | | | | | | | | | | | expectedFailureWindows is equivalent to using the general expectedFailureAll decorator with oslist="windows". Additionally, by moving towards these common decorators we can solve the issue of having to support decorators that can be called with or without arguments. Once all decorators are always called with arguments, and this is enforced by design (because you can't specify the condition you're decorating for without passing an argument) the implementation of the decorators can become much simpler Differential Revision: http://reviews.llvm.org/D16936 llvm-svn: 260134
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-0437-44/+99
| | | | llvm-svn: 259838
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-046-4/+12
| | | | | | | | | | | | This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
* Mark TestProcessIO as flaky on androidPavel Labath2016-02-041-1/+5
| | | | | | | previously, I have marked only one test as flaky, but now I noticed another test failing with the same error. I am going to assume all of them are flaky. llvm-svn: 259775
* Mark TestProcessIO.test_stdin_redirection as flaky on androidPavel Labath2016-02-021-0/+1
| | | | | | bug #26437 llvm-svn: 259513
* Fix misnamed variable in TestProcessAPI.pyZachary Turner2016-02-011-2/+2
| | | | llvm-svn: 259378
* Remove XFAIL Windows from a test that was fixed by r258758.Zachary Turner2016-01-261-1/+0
| | | | llvm-svn: 258761
* Fix some issues with bytes and strings in Python 3.Zachary Turner2016-01-251-8/+4
| | | | | | | | | | | | | | | | | | SBProcess::ReadMemory and other related functions such as WriteMemory are returning Python string() objects. This means that in Python 3 that are returning Unicode objects. In reality they should be returning bytes objects which is the same as a string in Python 2, but different in Python 3. This patch updates the generated SWIG code to return Python bytes objects for all memory related functions. One quirk of this patch is that the C++ signature of ReadCStringFromMemory has it writing c-string data into a void*. This confuses our swig typemaps which expect that a void* means byte data. So I hacked up a custom typemap which maps this specific function to treat the void* as string data instead of byte data. llvm-svn: 258743
* [LLDB][MIPS] Fix TestPrintStackTraces.pySagar Thakur2016-01-251-0/+4
| | | | | | | | | | | Patch by Nitesh Jain. Summary: The thread_start function in libc doesn't contain any epilogue and prologue instructions. Hence unwinding fail when we are stopped in thread_start. Reviewers: ovyalov, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep Differential: reviews.llvm.org/D16136 llvm-svn: 258685
* Remove assumptions that thread 0 is always the main thread.Zachary Turner2016-01-214-13/+16
| | | | | | | | | | | | | | | | | Starting with Windows 10, the Windows loader is itself multi-threaded, meaning that the loader spins up a few threads to do process initialization before it executes main. Windows delivers these notifications asynchronously and they can come out of order, so we can't be sure that the first thread we get a notification about is actually the zero'th thread. This patch fixes this by requesting the thread stopped at the breakpoint that was specified, rather than getting thread 0 and verifying that it is stopped at a breakpoint. Differential Revision: http://reviews.llvm.org/D16247 llvm-svn: 258432
* Fix for Bug 25338Ravitheja Addepally2016-01-191-2/+0
| | | | | | | | | | | | | | | | Summary: The issue arises because LLDB is not able to read the vdso library correctly. The fix adds memory allocation callbacks to allocate sufficient memory in case the requested offsets don't fit in the memory buffer allocated for the ELF. Reviewers: lldb-commits, clayborg, deepak2427, ovyalov, labath, tberghammer Differential Revision: http://reviews.llvm.org/D16107 llvm-svn: 258122
OpenPOWER on IntegriCloud