summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB][MIPS] Fix TestMultipleHits for MIPSNitesh Jain2016-12-091-2/+2
| | | | | | | | | | Reviewers: clayborg, labath, zturner Subscribers: jaydeep, bhushan, slthakur, lldb-commits Differential Revision: https://reviews.llvm.org/D27085 llvm-svn: 289210
* Enable WatchpointPythonCommandTestCase-test_continue_in_watchpoint_commandPavel Labath2016-11-241-2/+0
| | | | | | | | This test passes consistently on linux, so I am removing the overall XFAIL. If it fails on your configuration, please put a targeted xfail instead (i'll add them my self if I get any breakage emails). llvm-svn: 287881
* Fix SBWatchpoint::SetEnabled to send an event.Jim Ingham2016-11-021-1/+0
| | | | | | | We really shouldn't be sending events for SB API's, dunno when we started doing that. We don't do it for other things. But first restore the status quo. llvm-svn: 285781
* Xfail this while I figure out why the event isn't getting sent.Jim Ingham2016-11-011-0/+1
| | | | llvm-svn: 285761
* Switch SBWatchpoint::SetEnabled over to using ↵Jim Ingham2016-11-012-5/+19
| | | | | | | | | | | | | Process::{Enable,Disable}Watchpoint. We don't have a good story for what happens to watchpoints when you don't have a process, or if your process exits. Clearing that up will instruct how to fix this for real. Also added a test to make sure disable->enable works as well. This resolves llvm.org/pr30789. llvm-svn: 285742
* SBWatchpoint::Disable doesn't actually work. Add a test that shows this.Jim Ingham2016-10-263-0/+92
| | | | | | Next to fix it! llvm-svn: 285153
* Fix a race condition between the "ephemeral watchpoint disabling" and ↵Jim Ingham2016-10-251-6/+1
| | | | | | | | commands the continue the process. This closes https://reviews.llvm.org/D25875. llvm-svn: 285114
* Add TestMultipleHits.pyPavel Labath2016-10-213-0/+92
| | | | | | | | This tests that lldb handles the situation when a single instruction triggers multiple watchpoint hits. It currently fails on arm due to what appears to be a lldb-server bug (pr30758). llvm-svn: 284819
* Revert "Fix a race condition between "ephemeral watchpoint disable/enable" ↵Pavel Labath2016-10-211-1/+6
| | | | | | | | | | | | | | | | | and continue in commands." This reverts commit r284795, as it breaks watchpoint handling on arm (and presumable all architectures that report watchpoint hits without executing the tripping instruction). There seems to be something fundamentally wrong with this patch: it uses process_sp->AddPreResumeAction to re-enable the watchpoint, but the whole point of the step-over-watchpoint logic (which AFAIK is the only user of this class) is to disable the watchpoint *after* we resume to do the single step. I have no idea how to fix this except by reverting the offending patch. llvm-svn: 284817
* Fix a race condition between "ephemeral watchpoint disable/enable" and ↵Jim Ingham2016-10-211-6/+1
| | | | | | | | | | continue in commands. Also, watchpoint commands, like breakpoint commands, need to run in async mode. This was causing intermittent failures in TestWatchpointCommandPython.py, which is now solid. llvm-svn: 284795
* Fix ARM/AArch64 Step-Over watchpoint issue remove provision for duplicate ↵Omair Javaid2016-10-203-0/+131
| | | | | | | | | | | watchpoints This patch fixes ARM/AArch64 watchpoint bug which was taking inferior out of control while stepping over watchpoints. Also adds a test case that tests above problem. Differential revision: https://reviews.llvm.org/D25057 llvm-svn: 284706
* Add the radar number on our end.Jim Ingham2016-10-101-1/+1
| | | | llvm-svn: 283813
* Fixup the xfail situation on Windows.Zachary Turner2016-10-051-1/+0
| | | | | | Xfails added and/or removed to reflect the current state of Windows. llvm-svn: 283380
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0615-366/+683
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Fixed "void SBWatchpoint::SetEnabled (bool enabled)" to work properly and ↵Greg Clayton2016-07-271-5/+11
| | | | | | | | | added a test for it. https://llvm.org/bugs/show_bug.cgi?id=28729 <rdar://problem/27575225> llvm-svn: 276914
* Correct watchpoint size test failure on certain devicesOmair Javaid2016-06-301-3/+3
| | | | | | | I overlooked the possibility of certain targets translating increment statement into a read and write. In this case we replace increment statement with an assignment. llvm-svn: 274215
* Allow installing watchpoints at less than 8-byte alligned addresses for ↵Omair Javaid2016-06-163-0/+188
| | | | | | | | | | | | AArch64 targets This patch allows LLDB for AArch64 to watch all bytes, words or double words individually on non 8-byte alligned addresses. This patch also adds tests to verify this functionality. Differential revision: http://reviews.llvm.org/D21280 llvm-svn: 272916
* Add a test for the failure described by pr28055. Mark it as xfail.Jim Ingham2016-06-082-0/+68
| | | | llvm-svn: 272189
* Mark some aarch64-linux specific xfails marking bug entriesOmair Javaid2016-05-251-1/+1
| | | | | | | | TestBSDArchives.py and TestWatchLocation.py fail due to unicode error and bug has already been reported for arm and macOSx. TestConstVariables.py fails because lldb cant figure out frame variable type when used in expr. llvm-svn: 270780
* xfail TestWatchLocation.py for arm-linux targetsOmair Javaid2016-05-171-0/+1
| | | | | | | | TestWatchLocation.py fails on arm-linux target due to unicode error in lldb testsuite. This is a known issue and same test fails on OS X with similar reason. I have reported a bug and marked this test as xfail for arm-linux targets. llvm-svn: 269860
* Clean up test results on Windows.Zachary Turner2016-05-131-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-114-0/+5
| | | | | | | | 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
* Fixes for platforms that default to unsigned charUlrich Weigand2016-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes several test case failure on s390x caused by the fact that on this platform, the default "char" type is unsigned. - In ClangASTContext::GetBuiltinTypeForEncodingAndBitSize we should return an explicit *signed* char type for encoding eEncodingSint and bit size 8, instead of the default platform char type (which may be unsigned). This fix matches existing code in ClangASTContext::GetIntTypeFromBitSize, and fixes the TestClangASTContext.TestBuiltinTypeForEncodingAndBitSize unit test case. - The test/expression_command/char/TestExprsChar.py test case is known to fail on platforms defaulting to unsigned char (pr23069), and just needs to be xfailed on s390x like on arm. - The test/functionalities/watchpoint/watchpoint_on_vectors/main.c test case defines a vector of "char" and implicitly assumes to be signed. Use an explicit "signed char" instead. Differential Revision: http://reviews.llvm.org/D18979 llvm-svn: 266309
* Support Linux on SystemZ as platformUlrich Weigand2016-04-144-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix flakyness in TestWatchpointMultipleThreadsPavel Labath2016-04-042-7/+2
| | | | | | | This addresses the same problem as r264846 (the test not expecting the situation when two thread hit the watchpoint simultaneously), but for a different test. llvm-svn: 265294
* Fix flakyness in TestWatchpointMultipleThreadsPavel Labath2016-03-302-13/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: the inferior in the test deliberately does not lock a mutex when accessing the watched variable. The reason for that is unclear as, based on the logs, the original intention of the test was to check whether watchpoints get propagated to newly created threads, which should work fine even with a mutex. Furthermore, in the unlikely event (which I have still observed happening from time to time) that two threads do manage the execute the "critical section" simultaneously, the test will fail, as it is expecting the watchpoint "hit count" to be 1, but in this case it will be 2. Given this, I have simply chose to lock the mutex always, so that we have more predictible behavior. Watchpoints being hit simultaneously is still (and correctly!) tested by TestConcurrentEvents. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18558 llvm-svn: 264846
* Remove expectedFailureLinux decorator.Zachary Turner2016-02-102-2/+2
| | | | llvm-svn: 260422
* [LLDB][MIPS] Generalise MIPS arch namesMohit K. Bhakkad2016-02-102-2/+2
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: zturner, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D16840 llvm-svn: 260362
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-0811-17/+17
| | | | | | | | | | | | | | | 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-0410-10/+20
| | | | llvm-svn: 259838
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-041-1/+2
| | | | | | | | | | | | 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
* skip TestWatchLocation on OS XTodd Fiala2016-02-021-0/+1
| | | | | | | | Skipping this test while I investigate. It started failing with r259379. (It is generating an error due to unicode decode issues.) llvm-svn: 259526
* Mark arm/aarch64 specific xfails with expectedFailureLinux decoratorOmair Javaid2016-01-202-2/+2
| | | | | | | | | | | | | This patch marks some known failures and puts on expectedFailureLinux decorator to have testsuite xfail them. Affected tests are: test/functionalities/watchpoint/step_over_watchpoint.py test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py test/tools/lldb-server/TestGdbRemoteSingleStep.py test/tools/lldb-server/TestGdbRemote_vCont.py llvm-svn: 258315
* Xfail some Arm-Linux specific failuresOmair Javaid2016-01-112-0/+2
| | | | | | | | | | Updated expectedFailureLinux decorator to reflect architecture Marked some triaged failures as xfails on arm with updated expectedFailureLinux decorator Differential revision: http://reviews.llvm.org/D15893 llvm-svn: 257405
* Merge ENABLE_THREADS and ENABLE_STD_THREADS markersTamas Berghammer2015-12-153-3/+3
| | | | | | | | | | | | Both of these markers are used in the test suit for annotating when a test needs multi threaded support. Previously they had slightly different meening but they converged to the point where they are used interchangably. This CL removes the ENABLE_STD_THREADS one to simplify the test suite and avoid some confusion. Differential revision: http://reviews.llvm.org/D15498 llvm-svn: 255641
* [LLDB][MIPS] Marking some expected failuresMohit K. Bhakkad2015-12-072-11/+17
| | | | | | | | Reviewers: clayborg, zturner. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, tberghammer,lldb-commits. Differential Revision: http://reviews.llvm.org/D14944 llvm-svn: 254892
* Remove `use_lldb_suite` from the package, and don't import it anymore.Zachary Turner2015-11-0313-13/+13
| | | | | | | | | | | | | | | | 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
* 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
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-0313-26/+26
| | | | | | | | | | | | | | | | | | | | 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
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2835-0/+1953
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