summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* XFAIL TestReturnValue for linux i386 clang 3.5-3.6Tamas Berghammer2015-12-021-0/+1
| | | | | | | The test failing most likely because clang 3.5 and 3.6 uses an incorrect ABI for returning small structs from a function. llvm-svn: 254507
* Fix "process load/unload" on androidTamas Berghammer2015-12-021-11/+13
| | | | | | | | | | | On android the symbols exposed by libdl (dlopen, dlclose, dlerror) prefixed by "__dl_". This change moves the handling of process load/unload to the platform object and override it for android to handle the special prefix. Differential revision: http://reviews.llvm.org/D11465 llvm-svn: 254504
* PTRACE ABI to read FXSAVE area for 32-bit inferiorAbhishek Aggarwal2015-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Problem occurs when: -- 32-bit inferiors run on x86_32 machine and the architecture doesn't have AVX feature -- This causes FPRType to be set to eFPRTypeFXSAVE -- PTRACE_GETFPREGS was being used to read FXSAVE area -- For 32-bit inferiors running on x86_32 machine, PTRACE_GETFPREGS reads FSAVE area and not FXSAVE area - Changed ptrace API to PTRACE_GETREGSET for 32-bit inferiors -- This reads FPR data in FXSAVE format. -- For 64-bit inferiors, no change has been made. - Modified XFAIL for TestReturnValue.py -- Earlier, this test was passing for Linux OS -- Now, it passes for Android OS as well Change-Id: Ieed72bc969b79516fc7b263b32493aa1e7a1a2ac Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, lldb-commits, tberghammer, labath Subscribers: jevinskie, labath, tberghammer, danalbert Differential Revision: http://reviews.llvm.org/D15042 llvm-svn: 254499
* Revert "Fix race during process interruption"Pavel Labath2015-12-011-3/+1
| | | | | | The android buildbot gets quite flaky after this change. I'm reverting it while I investigate. llvm-svn: 254430
* Fix race during process interruptionPavel Labath2015-12-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following situation was occuring in TestAttachResume: - we did a "continue" from a breakpoint (which involves a private start-stop to step over the breakpoint) - after receiving the stop-reply from the step-over, we issue a "detach" (which requires a process interrupt) - at this moment, the public state is "running", private state is "about-to-be-stopped" (the stopped event was broadcast, but it was not received yet) - StopForDestroyOrDetach (public thread) notes the public state is running, sends an interrupt request to the private thread - private thread gets the eBroadcastBitInterrupt (before the eStateStopped message), and asks the process plugin to stop (via Halt()) - process plugin says it has nothing to do as the process is already stopped - private thread shrugs and carries on. receives the stop event, restores the breakpoint and resumes the process. - after a while, the public thread times out and says it failed to stop the process This patch does the following: - splits Halt() into two functions, private and public, their usage depends on the context - public Halt(): sends eBroadcastBitInterrupt to the private thread and waits for the Stop event - HaltPrivate(): asks the plugin to stop and makes a note that the halt was requested. When the next stop event comes it sets the interrupt flag on it. - removes HijackPrivateProcessEvents(), as the only user (old Halt()) has gone away - removes the m_currently_handling_event hack, as the new Halt() does not need it - adds a use_run_lock parameter to public Halt() and WaitForProcessToStop(). This was needed because RunThreadPlan uses Halt() while holding the run lock and we don't want Halt() to take it away from him. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14989 llvm-svn: 254403
* Fix TestRegisters.py on armTamas Berghammer2015-11-261-1/+1
| | | | | | | Previously it tried to write a bit in the FPSCR register marked as do not modify what failed on some device. llvm-svn: 254166
* Remove some xfail-s fixed by r253026Tamas Berghammer2015-11-261-1/+0
| | | | | | | | These tests were fixed by r253026 but they was failing on the linux build bot because of a system setup problem. Remove xfail from them after we fixed the build bot. llvm-svn: 254163
* Make some of the tests in TestRegisters.py arm compatibleTamas Berghammer2015-11-262-117/+101
| | | | | | Differential revision: http://reviews.llvm.org/D15010 llvm-svn: 254153
* Remove expectedFailureFreeBSD decorator from now-passing testsEd Maste2015-11-243-3/+0
| | | | | | | | | These pass on my FreeBSD stable/10 desktop and my (not-yet-connected) FreeBSD 11-CURRENT buildbot llvm.org/pr20548 llvm-svn: 254001
* Remove expectedFailureFreeBSD from passing ThreadExitTestCase::test_with_dwarfEd Maste2015-11-241-1/+0
| | | | | | | | | This passes on my FreeBSD stable/10 desktop and my new FreeBSD 11-current buildbot (which is not yet hooked up to the buildmaster). llvm.org/pr18190 llvm-svn: 254000
* Add expectedFailureFreeBSD decorators for new Python fd leakEd Maste2015-11-241-0/+3
| | | | | | llvm.org/pr25624 llvm-svn: 253998
* Enable saving of mini dumps with lldb process save-core.Adrian McCarthy2015-11-203-0/+85
| | | | | | | | Also adds SB API to save a core and tests that use it. Differential Revision: http://reviews.llvm.org/D14793 llvm-svn: 253734
* Use the system clang, since this support should now be in; does not un-xfail ↵Enrico Granata2015-11-202-12/+2
| | | | | | the test yet llvm-svn: 253697
* Revert "FOO"Adrian McCarthy2015-11-203-85/+0
| | | | | | | | Accidentally commited before I was done. This reverts commit 2ec2da4ee52780582d5e9c88b2e982a688fbdbe1. llvm-svn: 253685
* FOOAdrian McCarthy2015-11-203-0/+85
| | | | llvm-svn: 253684
* Cleanup work required to get the ASAN tests to run in the new test suite ↵Enrico Granata2015-11-193-3/+5
| | | | | | infrastructure; the tests are now xfailed on Darwin pending investigation llvm-svn: 253604
* [TestExitDuringStep] Adjust after a recent type map change.Siva Chandra2015-11-181-1/+2
| | | | | | | | | | Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14784 llvm-svn: 253505
* Fix some issues with swig & string conversion.Zachary Turner2015-11-181-2/+8
| | | | | | | | | | | | | | | | | | | | This patch fixes two issues: 1) Popen needs to be used with universal_newlines=True by default. This elicits automatic decoding from bytes -> string in Py3, and has no negative effects in other Py versions. 2) The swig typemaps for converting between string and (char*, int) did not work correctly when the length of the string was 0, indicating an error. In this case we would try to construct a string from uninitialized data. 3) Ironically, the bug mentioned in #2 led to a test passing on Windows that was actually broken, because the test was written such that the assertion was never even getting checked, so it passed by default. So we additionally fix this test to also fail if the method errors. By fixing this test it's now broken on Windows, so we also xfail it. llvm-svn: 253487
* [LLDB][MIPS] Fix TestDisassembleBreakpoint.py for MIPSSagar Thakur2015-11-181-2/+6
| | | | | | | | | | | Patch by Nitesh Jain Summary: The break is opcode for breakpoint instruction. Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan Reviewers: clayborg, ovyalov, jaydeep Differential: http://reviews.llvm.org/D14634 llvm-svn: 253445
* [MIPS][LLDB]Fix TestBreakpointCondition.py for MIPSSagar Thakur2015-11-181-3/+6
| | | | | | | | | | | | | Patch by Nitesh Jain Summary: The self.getArchitecture() returns the architecture based on the value of -A flag passed to dotest.py script. There are many possible values for MIPS to this option (like mips32r2, mips32r6, mips64, mips64r2,.... ). This patch uses re.match(mips,arch) to check if architecture string starts with mips. Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep Reviewers: clayborg, ovyalov Differential: http://reviews.llvm.org/D14493 llvm-svn: 253444
* Add the ability (through the SB API & command line) to specify an addressJim Ingham2015-11-173-0/+105
| | | | | | | | breakpoint as "file address" so that the address breakpoint will track that module even if it gets loaded in a different place. Also fixed the Address breakpoint resolver so that it handles this tracking correctly. llvm-svn: 253308
* Re-Apply "Add a "not_in()" function you can apply to the list type arguments ↵Ying Chen2015-11-161-1/+1
| | | | | | | | | | | | | | | | | to expectedFailureAll ..." with fix Summary: - Re-Commit r253106 - Initialize self.debug_info in Base::setUp() - Fix argument order when calling check_list_or_lambda for compiler Reviewers: jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14673 llvm-svn: 253272
* Revert "Add a "not_in()" function you can apply to the list type arguments ↵Pavel Labath2015-11-161-1/+1
| | | | | | | | to expectedFailureAll to reverse" This reverts commit r253106. llvm-svn: 253197
* Uniquify all the type X delete commands via one common base classEnrico Granata2015-11-141-1/+1
| | | | | | This removes a lot of code, which is A Good Thing(TM) llvm-svn: 253140
* Add a "not_in()" function you can apply to the list type arguments to ↵Jim Ingham2015-11-141-1/+1
| | | | | | | | expectedFailureAll to reverse the sense of the test. llvm-svn: 253106
* Change the test to use the instruction list to get the consecutive addresses ↵Jim Ingham2015-11-131-18/+9
| | | | | | | | to break on. Rerunning was being foiled by ASLR. llvm-svn: 253094
* Re-add XFAILs to two testsPavel Labath2015-11-131-0/+1
| | | | | | | these decorators were two of many removed in r253026. Unlike others, these tests still seem to be failing... llvm-svn: 253034
* Fix to solve Bug 23139 & Bug 23560Abhishek Aggarwal2015-11-135-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Reason of both bugs: 1. For the very first frame, Unwinder doesn't check the validity of Full UnwindPlan before creating StackFrame from it: When 'process launch' command is run after setting a breakpoint in inferior, the Unwinder runs and saves only Frame 0 (the frame in which breakpoint was set) in thread's StackFrameList i.e. m_curr_frames_sp. However, it doesn't check the validity of the Full UnwindPlan for this frame by unwinding 2 more frames further. 2. Unwinder doesn't update the CFA value of Cursor when Full UnwindPlan fails and FallBack UnwindPlan succeeds in providing valid CFA values for frames: Sometimes during unwinding of stack frames, the Full UnwindPlan inside the RegisterContextLLDB object may fail to provide valid CFA values for these frames. Then the Fallback UnwindPlan is used to unwind the frames. If the Fallback UnwindPlan succeeds, then it provides a valid new CFA value. The RegisterContextLLDB::m_cfa field of Cursor object is updated during the Fallback UnwindPlan execution. However, UnwindLLDB misses the implementation to update the 'cfa' field of this Cursor with this valid new CFA value. - This patch fixes both these issues. - Remove XFAIL in test files corresponding to these 2 Bugs Change-Id: I932ea407545ceee2d628f946ecc61a4806d4cc86 Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jingham, lldb-commits, jasonmolenda Subscribers: lldb-commits, ovyalov, tberghammer Differential Revision: http://reviews.llvm.org/D14226 llvm-svn: 253026
* Implement RegisterContext for Mini Dumps.Adrian McCarthy2015-11-121-0/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D14591 llvm-svn: 252950
* Mark TestCompletion.py test_symbol_name_dwarf XFAIL on Darwin.Todd Fiala2015-11-111-0/+1
| | | | | | | | | | This test fails most of the time when run under heavy load. The dsym variant doesn't seem to be failing. Tracking XFAIL marker with: https://llvm.org/bugs/show_bug.cgi?id=25485 llvm-svn: 252702
* Mark TestTerminal.py as XFAIL on OS X.Todd Fiala2015-11-111-0/+1
| | | | | | | See the following tracking bug: https://llvm.org/bugs/show_bug.cgi?id=25484 llvm-svn: 252699
* Avoid sending bare '*' and '}' in an lldb-server packetTim Northover2015-11-092-0/+32
| | | | | | | | | | They get treated as special RLE encoding symbols and packets get corrupted. Most other packet types already know about this apparently, but QEnvironment missed these two. Should fix PR25300. llvm-svn: 252521
* Make the language specifier to "break set" actually filter the names by ↵Jim Ingham2015-11-065-0/+112
| | | | | | | | | | | | | their language. So for instance: break set -l c++ -r Name will only break on C++ symbols that match Name, not ObjC or plain C symbols. This also works for "break set -n" and there are SB API's to pass this as well. llvm-svn: 252356
* Python 3 - Use the exec function, not the exec statement.Zachary Turner2015-11-061-1/+3
| | | | | | exec statement is gone in Python 3, this version works in both. llvm-svn: 252347
* Teach LLDB how to directly launch processes on the iOS simulatorEnrico Granata2015-11-054-0/+11
| | | | | | | | This allows for command-line debugging of iOS simulator binaries (as long as UI is not required, or a full UI simulator has previously been otherwise launched), as well as execution of the LLDB test suite on the iOS simulator This is known to compile on OSX 10.11 GM - feedback from people on other platforms and/or older versions of OSX as to the buildability of this code is greatly appreciated llvm-svn: 252112
* Fix an issue where LLDB would truncate summaries for string types without ↵Enrico Granata2015-11-041-1/+20
| | | | | | producing any evidence thereof llvm-svn: 252018
* Remove `use_lldb_suite` from the package, and don't import it anymore.Zachary Turner2015-11-03164-164/+164
| | | | | | | | | | | | | | | | This module was originally intended to be imported by top-level scripts to be able to find the LLDB packages and third party libraries. Packages themselves shouldn't need to import it, because by the time it gets into the package, the top-level script should have already done this. Indeed, it was just adding the same values to sys.path multiple times, so this patch is essentially no functional change. To make sure it doesn't get re-introduced, we also delete the `use_lldb_suite` module from `lldbsuite/test`, although the original copy still remains in `lldb/test` llvm-svn: 251963
* Python 3 - Don't use `commands` module anymore.Zachary Turner2015-11-032-4/+4
| | | | | | | | | | The `commands` module was deprecated in 2.7 and removed in 3.x. As a workaround, we introduce a new module `seven` in lldbsuite.support, and write helper functions in there that delegate to the commands module if it is available, and re-implement their functionality for cases where it is not available. llvm-svn: 251959
* Fix flakyness in TestWatchLocationWithWatchSetPavel Labath2015-11-031-2/+4
| | | | | | Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that. llvm-svn: 251954
* Skip TestBacktraceAll on android-armTamas Berghammer2015-11-031-1/+4
| | | | | | | The android compiler can't compile the inferior because of an issue in the standard library. llvm-svn: 251951
* Leave TestAttachResume as flakey on linuxPavel Labath2015-11-031-0/+1
| | | | | | there must be (at least) one more race hidden there... llvm-svn: 251950
* Fix race during process detachPavel Labath2015-11-031-1/+0
| | | | | | | | | | | | | | | | Summary: The code which was preventing the usage of the OS plugin while detach is in progress also prevented us to update the thread list correctly. This resulted in an empty thread list, which confused the detaching logic. Change the condition do only do what it says (disable the usage of the OS plugin). Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14201 llvm-svn: 251932
* Changes for Bug 25251Ravitheja Addepally2015-11-033-0/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The solution to bug 24074,rL249673 needed to parse the function information from the Dwarf in order to set the SymbolContext. For that, GetFunction was called for the parent in GetTypeForDIE, which parses the ChildParameters and in the flow, GetTypeForDIE was called for one of the sibling die and so an infinite loop was triggered by calling GetFunction repeatedly for the same function. The changes in this revision modify the GetTypeForDIE to only resolve the function context in the Type Lookup flow and so prevent the infinite loop. A testcase has also been added to check for regression in the future and a test vector had been added to the testcase of 24074. Reviewers: jingham, tberghammer, clayborg Differential Revision: http://reviews.llvm.org/D14202 llvm-svn: 251917
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-03166-324/+340
| | | | | | | | | | | | | | | | | | | | For convenience, we had added the folder that dotest.py was in to sys.path, so that we could easily write things like `import lldbutil` from anywhere and any test. This introduces a subtle problem when using Python's package system, because when unittest2 imports a particular test suite, the test suite is detached from the package. Thus, writing "import lldbutil" from dotest imports it as part of the package, and writing the same line from a test does a fresh import since the importing module was not part of the same package. The real way to fix this is to use absolute imports everywhere. Instead of writing "import lldbutil", we need to write "import lldbsuite.test.util". This patch fixes up that and all other similar cases, and additionally removes the script directory from sys.path to ensure that this can't happen again. llvm-svn: 251886
* Add a --offset option to memory read that allows one to specify, given a ↵Enrico Granata2015-10-292-0/+10
| | | | | | type, how many sizeof(type) bytes to speak before starting to read memory llvm-svn: 251668
* Fix flakyness in TestChangeProcessGroupPavel Labath2015-10-291-3/+8
| | | | | | | | | | | The test was verifying that the pid of the child is not equal to its process group by searching for text substrings. This failed in the rare cases when the pid actually *was* a substring of the process group (even though they were not equal). Change the test to use SB API and do proper numeric comparisons. llvm-svn: 251626
* Leave TestAttachResume as flakey on linuxPavel Labath2015-10-291-0/+1
| | | | | | there must be (at least) one more race hidden there... llvm-svn: 251590
* Mark TestHelloWorld and TestInferiorAssert.py as XFAIL due llvm.org/pr25338.Oleksiy Vyalov2015-10-281-0/+4
| | | | llvm-svn: 251542
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-28552-0/+28036
This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
OpenPOWER on IntegriCloud