summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/unwind
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2811-427/+0
| | | | | | | | | | | 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
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-273-3/+3
| | | | llvm-svn: 251444
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-233-7/+13
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-223-22/+7
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* Merge dwarf and dsym testsTamas Berghammer2015-09-302-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Fix a bunch of portability issues in test executables.Zachary Turner2015-08-251-0/+1
| | | | llvm-svn: 245983
* Improve conditional opcode handling in emulation based unwindingTamas Berghammer2015-07-171-1/+0
| | | | | | | | | | Don't chane the CFI information when a conditional instruction is emulated (eg.: popeq {r0, pc}) because the CFI for the next instruction should be the same as the CFI for the current instruction. Differential revision: http://reviews.llvm.org/D11258 llvm-svn: 242519
* Ignore "push/pop {sp}" in emulation based unwindingTamas Berghammer2015-06-302-2/+15
| | | | | | | | | | | These instructions confusing the unwind code because in case of a push it assumes that the original valu of a register is pushed to the stack what is not neccessarily true in case of SP. The same is true for the pop (in the opposite way). Differential revision: http://reviews.llvm.org/D10806 llvm-svn: 241051
* Add branch emulation to aarch64 instruction emulatorTamas Berghammer2015-06-261-0/+12
| | | | | | | | | The emulation of the branches are required by the new stack unwinding logic to reinstantiate the prologue at the right place. Differential revision: http://reviews.llvm.org/D10702 llvm-svn: 240769
* Add new test for stress testing stack unwindingTamas Berghammer2015-06-184-0/+172
| | | | | | | | This test case generates new tests from the source files dropped into its directory. For stress testing stack unwinding it steps through the code line by line and then tests unwinding from each instruction. llvm-svn: 240030
* Fix test expectation in TestNoreturnUnwindTamas Berghammer2015-04-231-3/+2
| | | | | | | | | | The test case lookinhg for the abort function in the stack trace. Previously it lookd for a function which ends with "abort" but on some system there are multiple such functions (e.g.: on android abort calls __libc_android_abort) what made the test fail. This CL change the behaviour to look for the abort function based on a fix list of names. llvm-svn: 235584
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-302-3/+3
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* Fix check in TestNoreturnUnwindTamas Berghammer2015-03-301-1/+1
| | | | llvm-svn: 233546
* xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot ↵Ying Chen2015-03-251-0/+1
| | | | | | | | | | | | | | | | | | green Summary: -Refer to bug https://buganizer.corp.google.com/issues/19893563 -Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145 Test Plan: Run tests with different compiler and archs locally Reviewers: sivachandra, ovyalov, chaoren, vharron Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8573 llvm-svn: 233157
* Skip symlinks to the original file when searching for debug infoPavel Labath2015-02-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: Symbols::LocateExecutableSymbolFile tries to locate the file in containing the debug info in a splitdebug configuration. It tries to skip over the original file in its search path, but it was easily fooled by symlinks. This changes the function to use llvm::sys::fs::equivalent, which can correctly compare symlinks. As a side effect, I had to fix one test because the address for the "abort" function resolves on my system to "__GI_abort" now. With the debug info, the libc on my system contains two symbols associated with the address of the abort function, and lldb prefers __GI_abort, possibly because the debug info is associated with it. It would be nice at some point to have it prefer the public symbol name. Reviewers: emaste, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7836 llvm-svn: 230476
* Restrict SigtrampUnwind test to Darwin onlyEd Maste2015-01-301-0/+1
| | | | | | | It needs OS-specific knowledge and has not yet been adapted to other systems. llvm-svn: 227579
* Hoist the RegisterNumber class out of RegisterContextLLDB and makeJason Molenda2015-01-103-0/+126
| | | | | | | | | | | | | | | it more generally available. Add checks to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite() so that it won't try to augment an UnwindPlan that already describes the function epilogue. Add a test case for backtracing out of _sigtramp on Darwin systems. This could probably be adapted to test the same thing on linux/bsd but the function names of sigtramp and kill are probably platform specific and I'm not sure what they should be. llvm-svn: 225578
* Fix new noreturn test on !darwin platformsEd Maste2014-11-101-2/+3
| | | | | | | | r221575 introduced a NoreturnUnwind test that did not skip the dsym test on non-darwin platforms, and had the @dwarf_test case as an exact copy of the dsym case (including the test name, test_with_dsym). llvm-svn: 221611
* Fix a corner case with the handling of noreturn functions.Jason Molenda2014-11-083-0/+131
If a noreturn function was the last function in a section, we wouldn't correctly back up the saved-pc value into the correct section leading to us showing the wrong function in the backtrace. Also add a backtrace test with an attempt to elicit this particular layout. It happens to work out with clang -Os but other compilers may not quite get the same layout I'm getting at that opt setting. We'll still be exercising the basic noreturn handling in the unwinder even if we don't get one function at the very end of a section. <rdar://problem/16051613> llvm-svn: 221575
OpenPOWER on IntegriCloud