summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[platform process list] add a flag for showing the processes of all ↵Walter Erquinigo2019-10-122-60/+2
| | | | | | | | users" This reverts commit 90d0de4999354a5223f08ad714222b0a5dca3cad. llvm-svn: 374625
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-122-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: > llvm-svn: 374584 llvm-svn: 374622
* Revert "[platform process list] add a flag for showing the processes of all ↵Walter Erquinigo2019-10-122-56/+2
| | | | | | | | users" This reverts commit 08781f4c53a177662c029d3da9c407ba65ae6747. llvm-svn: 374621
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-122-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: > llvm-svn: 374584 llvm-svn: 374620
* Temporarily Revert [platform process list] add a flag for showing the ↵Adrian Prantl2019-10-122-65/+2
| | | | | | | | | | processes of all users as it breaks the bots. This reverts r374609 (git commit 696d3cf8ad6f3a0b3019c87526d561bb77ad538e) llvm-svn: 374616
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-112-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: > llvm-svn: 374584 llvm-svn: 374609
* Revert "[platform process list] add a flag for showing the processes of all ↵Walter Erquinigo2019-10-112-61/+2
| | | | | | | | | | | | | | | | | | | users" Summary: This reverts commit e4ac611cd787f3f0e727a394e96fb1a5c3b19ccb. There's a failure according to http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2538/testReport/junit/lldb-api/functionalities_gdb_remote_client/TestPlatformClient_py/ Reviewers: labath, aadsm, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68883 llvm-svn: 374603
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-112-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: llvm-svn: 374584
* IOHandler: fall back on File::Read if a FILE* isn't available.Lawrence D'Anna2019-10-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: IOHandler needs to read lines of input from a lldb::File. The way it currently does this using, FILE*, which is something we want to avoid now. I'd prefer to just replace the FILE* code with calls to File::Read, but it contains an awkward and delicate workaround specific to ctrl-C handling on windows, and it's not clear if or how that workaround would translate to lldb::File. So in this patch, we use use the FILE* if it's available, and only fall back on File::Read if that's the only option. I think this is a reasonable approach here for two reasons. First is that interactive terminal support is the one area where FILE* can't be avoided. We need them for libedit and curses anyway, and using them here as well is consistent with that pattern. The second reason is that the comments express a hope that the underlying windows bug that's being worked around will be fixed one day, so hopefully when that happens, that whole path can be deleted. Reviewers: JDevlieghere, jasonmolenda, labath, lanza Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68622 llvm-svn: 374576
* [lldb] Mark import-std-module/empty-module as libc++ testRaphael Isemann2019-10-111-0/+4
| | | | | | Same as with the import-std-module/sysroot test before. llvm-svn: 374574
* [lldb] Add import-std-module/sysroot to the libc++ test category.Raphael Isemann2019-10-111-0/+4
| | | | | | | | We essentially test libc++ in a sysroot here so let's make sure that we actually only run this test on platforms where libc++ testing is enabled. llvm-svn: 374572
* [lldb] Fix crash in CxxModuleHandler when std module is emptyRaphael Isemann2019-10-116-0/+78
| | | | | | | | | | | | | | | | | | | | We currently don't handle the error in the Expected we get when searching for an equal local DeclContext. Usually this can't happen as this would require that we have a STL container and we can find libc++'s std module, but when we load the module in the expression parser the module doesn't even contain the 'std' namespace. The only way I see to test this is by having a fake 'std' module that requires a special define to actually provide its contents, while it will just be empty (that is, it doesn't even contain the 'std' namespace) without that define. LLDB currently doesn't know about that define in the expression parser, so it will load the wrong 'empty' module which should trigger this error. Also removed the 'auto' for that variable as the function name doesn't make it obvious that this is an expected and not just a optional/ptr (which is how this slipped in from the start). llvm-svn: 374525
* [Make] Remove spurious line breakJonas Devlieghere2019-10-101-1/+1
| | | | | | This test is disabled upstream and therefore this went unnoticed. llvm-svn: 374462
* TestMTCSimple: Make Makefile portable.Frederic Riss2019-10-101-1/+6
| | | | | | r374262 left out the Makefile changes needed to cross compile this test. llvm-svn: 374451
* update TestRunCommandInterpreterAPI to use SBFileLawrence D'Anna2019-10-101-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If you look at what this test is doing, it's actually quite mysterious why it works at all. It sets the input file inside a "with open". As soon as the with block ends, that file will be closed. And yet somehow LLDB reads commands from it anyway. What's actually happening is that the file descriptor gets dup'd when something inside LLDB calls File::GetStream(). I think it's fair to say that what this test is doing is illegal and it has no right to expect it to work. This patch updates the test with two cases. One uses the SBFile api, and actually transfers ownership of the original file descriptor to the debugger. The other just uses the old FILE* API, but in a sane way. I also set NO_DEBUG_INFO_TESTCASE, because this test doesn't use any debug info and doesn't need to run three times. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: aprantl, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68738 llvm-svn: 374424
* update SBDebugger::SetInputFile() etc to work on native FilesLawrence D'Anna2019-10-101-6/+0
| | | | | | | | | | | | | | | | | | | Summary: This patch adds FileSP versions of SetInputFile(), SetOutputFile, and SetErrorFile(). SWIG will convert native python file objects into FileSP. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: clayborg, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68734 llvm-svn: 374422
* TestFileHandle.py: fix for Python 3.6Lawrence D'Anna2019-10-101-2/+2
| | | | | | | | | | | | | | | | | | | Summary: Python 3.6 stringifies exceptions as `ExceptionClass("foo",)` instead of `ExceptionClass("foo")`. This patch makes the test assertions a little more flexible so the test passes anyway. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68745 llvm-svn: 374417
* Remove merge marker :-)Adrian Prantl2019-10-101-4/+0
| | | | llvm-svn: 374414
* Die, TABS, die, die, die, die...Jim Ingham2019-10-101-3/+7
| | | | | | Not sure how tabs got into this file, but they don't belong there. llvm-svn: 374412
* Remove CC autodetection from Makefile.rulesAdrian Prantl2019-10-101-9/+2
| | | | | | | | | | | Auto-detecting CC in Makefile.rules is no longer useful. Ever since out-of-tree builds we are better off just running lldb-dotest which sets it directly. This also makes it harder to accidentally unset CC in a Makefile. Differential Revision: https://reviews.llvm.org/D68731 llvm-svn: 374402
* Speed up accelerator table lookupsAdrian Prantl2019-10-1011-0/+92
| | | | | | | | | | | | | | | | | | | When debugging a large program like clang and doing "frame variable *this", the ValueObject pretty printer is doing hundreds of scoped FindTypes lookups. The ones that take longest are the ones where the DWARFDeclContext ends in something like ::Iterator which produces many false positives that need to be filtered out *after* extracting the DIEs. This patch demonstrates a way to filter out false positives at the accerator table lookup step. With this patch lldb clang-10 -o "b EmitFunctionStart" -o r -o "f 2" -o "fr v *this" -b -- ... goes (in user time) from 5.6s -> 4.8s or (in wall clock) from 6.9s -> 6.0s. Differential Revision: https://reviews.llvm.org/D68678 llvm-svn: 374401
* Implement serializing scripted breakpoints and their extra args.Jim Ingham2019-10-103-1/+106
| | | | | | Differential Revision: https://reviews.llvm.org/D68750 llvm-svn: 374394
* [test] Use a different module cache for Shell and API tests.Jonas Devlieghere2019-10-106-17/+37
| | | | | | | | | | | | | | Before the test reorganization, everything was part of a single test suite with a single module cache. Now that things are properly separated this is no longer the case. Only the shell tests inherited the logic to properly configure and wipe the module caches. This patch adds that logic back for the API tests. While doing so, I noticed that we were configuring a Clang module cache in CMake, but weren't actually using it from dotest.py. I included a fix for that in this patch as well. Differential revision: https://reviews.llvm.org/D68755 llvm-svn: 374386
* [test] Pass DSYMUTIL and SDKROOT as part of the Make invocation.Jonas Devlieghere2019-10-101-5/+36
| | | | | | | | | | Pass the DSYMUTIL and SDKROOT variables on the command line instead of the environment. This makes it easier to reproduce the make invocation during development. Differential revision: https://reviews.llvm.org/D68812 llvm-svn: 374385
* Increase timeout in gdbclientutils.py to decrease chance of test failing ↵Adrian Prantl2019-10-101-1/+1
| | | | | | under ASAN. llvm-svn: 374371
* [lldb] Make sure import-std-module/sysroot actually passes for the right reasonsRaphael Isemann2019-10-106-9/+16
| | | | | | | | | | | | This test was previously passing because myabs was actually emitted into the debug information and we called that. The test itself was broken as it didn't use the libc++ directory structure (the /v1/ directory was just called /include/). This patch gives myabs a default argument which we can't get from debug information and inlines the function to make sure we can't call it from LLDB without loading the C++ module. llvm-svn: 374335
* TestFileHandle.py: relax exception type checksPavel Labath2019-10-101-3/+3
| | | | | | | | | | | | the exceptions returned differ between swig4 (TypeError) and swig<=3 (NotImplementedError). Just check for the base Exception class instead. Theoretically we could switch on the swig version and expect the precise type directly, but checking the exact type does not seem that important. Thanks to Raphael for helping me figure this out. llvm-svn: 374322
* s/@expectedFailure/@expectedFailureAll in TestFileHandlePavel Labath2019-10-101-12/+11
| | | | | | | | | The test isn't using @expectedFailure correctly, which causes weird errors, at least with python2, at least with linux. Possibly that function shouldn't even be public as it's main use is as a backed for other decorators. llvm-svn: 374299
* TestMTCSimple.py: allow the test to run on Darwin embedded platformsFrederic Riss2019-10-093-13/+20
| | | | | | | The test needed some updates to run using a different UI toolkit and with a different libMTC, but it should run fine on a device. llvm-svn: 374262
* TestIndirectSymbols: Modernize the MakefileFrederic Riss2019-10-092-36/+14
| | | | | | | | This old test used a completely hand-rolled Makefile. Modernize so that it's able to cross-compile. And XFAIL the test as it fails on embedded targets... llvm-svn: 374256
* Makefile.rules: add missing CODESIGN callFrederic Riss2019-10-091-0/+3
| | | | | | | When building an executable and a shared library at the same time (yes, Makefile.rules is setup to do this!) the executable was not codesigned. llvm-svn: 374251
* Fix a crasher due to an assert when two files have the same UUID but ↵Greg Clayton2019-10-092-11/+50
| | | | | | | | | | | | | | | | different paths. Summary: The PlaceholderObjectFile has an assert in SetLoadAddress that fires if "m_base == value" is not true. To avoid this, we create check that the base address matches, and if it doesn't we clear the module that was found using the UUID so that we create a new PlaceholderObjectFile. Added a test to cover this issue. Reviewers: labath, aadsm, dvlahovski Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68106 llvm-svn: 374242
* SBFile support in SBCommandReturnObjectLawrence D'Anna2019-10-091-2/+2
| | | | | | | | | | | | | | | | | | Summary: This patch add SBFile interfaces to SBCommandReturnObject, and removes the internal callers of its FILE* interfaces. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68434 llvm-svn: 374238
* SBFile: add a bunch of tests that should eventually work.Lawrence D'Anna2019-10-091-4/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It's really annoying and confusing to have to keep referring back to earlier versions of this SBFile work to find the tests that need to be added for each patch, and not duplicate them with new tests. This patch just imports all my tests. A bunch of them don't work yet, so they are marked to be skipped. They'll be unmarked as I fix them. One of these tests will actually trip an assert in the SWIG code now instead of just failing, so I'm fixing that here too. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68433 llvm-svn: 374237
* TestHelloWorld: Make compatible with remote testingFrederic Riss2019-10-091-10/+14
| | | | | | The synchronization token handling was not remote-friendly. llvm-svn: 374234
* allow arbitrary python streams to be converted to SBFileLawrence D'Anna2019-10-091-17/+301
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds SWIG typemaps that can convert arbitrary python file objects into lldb_private::File. A SBFile may be initialized from a python file using the constructor. There are also alternate, tagged constructors that allow python files to be borrowed, and for the caller to control whether or not the python I/O methods will be called even when a file descriptor is available.I Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: zturner, amccarth, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68188 llvm-svn: 374225
* Skip Apple simulator test for all remote testing scenarios.Frederic Riss2019-10-091-3/+3
| | | | | | | The test makes no sense to run remotely, period. The architecture of the target is not the discriminant here. llvm-svn: 374217
* [test] Skip entry value test when clang < 10.0.0Vedant Kumar2019-10-091-0/+1
| | | | | | | | clang-9 emitted the wrong opcode for entry values on Darwin. rdar://56119661 llvm-svn: 374212
* Add test coverage to printing of enums and fix display of unsigned valuesFrederic Riss2019-10-082-29/+57
| | | | | | | | | | | | | | | TestCPP11EnumTypes.py should have covered all our bases when it comes to typed enums, but it missed the regression introduced in r374066. The reason it didn't catch it is somewhat funny: the test was copied over from another test that recompiled a source file with a different base type every time, but neither the test source nor the python code was adapted for testing enums. As a result, this test was just running 8 times the exact same checks on the exact same binary. This commit fixes the coverage and addresses the issue revealed by the new tests. llvm-svn: 374108
* Revert "[platform process list] add a flag for showing the processes of all ↵Shafik Yaghmour2019-10-082-64/+2
| | | | | | | | | | | users" This reverts commit 080f35fb875f52c924ee37ed4d56a51fe7056afa. Conflicts: packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py llvm-svn: 374077
* [Testsuite] Get rid of most of the recursive shared library MakefilesFrederic Riss2019-10-0828-221/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the secondary Makefiles we have are just a couple variable definitions and then an include of Makefile.rules. This patch removes most of the secondary Makefiles and replaces them with a direct invocation of Makefile.rules in the main Makefile. The specificities of each sub-build are listed right there on the recursive $(MAKE) call. All the variables that matter are being passed automagically by make as they have been passed on the command line. The only things you need to specify are the variables customizating the Makefile.rules logic for each image. This patch also removes most of the clean logic from those Makefiles and from Makefile.rules. The clean rule is not required anymore now that we run the testsuite in a separate build directory that is wiped with each run. The patch leaves a very crude version of clean in Makefile.rules which removes everything inside of $(BUILDDIR). It does this only when the $(BUILDDIR) looks like a sub-directory of our standard testsuite build directory to be extra safe. Reviewers: aprantl, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68558 llvm-svn: 374076
* Add pretty printing of Clang "bitfield" enumsFrederic Riss2019-10-082-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Using enumerators as flags is standard practice. This patch adds support to LLDB to display such enum values symbolically, eg: (E) e1 = A | B If enumerators don't cover the whole value, the remaining bits are displayed as hexadecimal: (E) e4 = A | 0x10 Detecting whether an enum is used as a bitfield or not is complicated. This patch implements a heuristic that assumes that such enumerators will either have only 1 bit set or will be a combination of previous values. This patch doesn't change the way we currently display enums which the above heuristic would not consider as bitfields. Reviewers: jingham, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67520 llvm-svn: 374067
* test fix: TestLoadUsingPaths should use realpathLawrence D'Anna2019-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: TestLoadUsingPaths will fail if the build directory has symlinks in its path, because the real paths reported by the debugger won't match the symlink-laden paths it's expecting. This can be solved just by using os.path.realpath on the base path for the test. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68618 llvm-svn: 374007
* DWIMy filterspecs for dotest.pyLawrence D'Anna2019-10-082-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: dotest.py currently requires a filterspec to be of the form `TestCase.test_method`. This patch makes it more flexible, so you can pass `TestModule.TestCase.test_method` or `TestModule.TestCase` or `TestCase.test_method` or just `test_method`. This makes it more convenient to just copy a test name out of the terminal after running a bunch of tests and use it as a filterspec. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere Subscribers: jingham, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68545 llvm-svn: 373997
* [gdb-remote] process properly effective uidWalter Erquinigo2019-10-071-2/+6
| | | | | | | | | | | | | | | | | | Summary: Someone wrote SetEffectiveSetEffectiveGroupID instead of SetEffectiveUserID. After this fix, the android process list can show user names, e.g. ``` PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS ====== ====== ========== ========== ========== ========== ============================== ============================ 529 1 root 0 root 0 /sbin/ueventd ``` Reviewers: labath,clayborg,aadsm,xiaobai Subscribers: llvm-svn: 373953
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-072-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: llvm-svn: 373931
* [test] Run TestLaunchWithShellExpand with /bin/sh on POSIX.Jonas Devlieghere2019-10-041-0/+4
| | | | | | | Now that we do shell expansion on POSIX with the user's shel, this test can potentially fail. This should ensure that we always use /bin/sh. llvm-svn: 373804
* [lldb] [testsuite] Mark TestSBCommandReturnObject as failing on WindowsJan Kratochvil2019-10-041-0/+3
| | | | | | | | | | | | | | | | | | | Filed: testsuite: TestSBCommandReturnObject: object has no attribute 'dylibPath' https://bugs.llvm.org/show_bug.cgi?id=43570 http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9530/steps/test/logs/stdio AttributeError: 'TestSBCommandReturnObject' object has no attribute 'dylibPath' Fix crash on SBCommandReturnObject & assignment https://reviews.llvm.org/D67589 env = {self.dylibPath: self.getLLDBLibraryEnvVal()} I do not know how to link with liblldb on Windows so marking it as failing on Windows. llvm-svn: 373787
* [lldb] Fix crash on SBCommandReturnObject & assignmentJan Kratochvil2019-10-043-0/+69
| | | | | | | | | | | | | | | | | I was writing an SB API client and it was crashing on: bool DoExecute(SBDebugger dbg, char **command, SBCommandReturnObject &result) { result = subcommand(dbg, "help"); That is because SBCommandReturnObject &result gets initialized inside LLDB by: bool DoExecute(Args &command, CommandReturnObject &result) override { // std::unique_ptr gets initialized here from `&result`!!! SBCommandReturnObject sb_return(&result); DoExecute(...); sb_return.Release(); Differential revision: https://reviews.llvm.org/D67589 llvm-svn: 373775
* [lldb][modern-type-lookup] No longer import temporary declarations into the ↵Raphael Isemann2019-10-042-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | persistent AST Summary: As we figured out in D67803, importing declarations from a temporary ASTContext that were originally from a persistent ASTContext causes a bunch of duplicated declarations where we end up having declarations in the target AST that have no associated ASTImporter that can complete them. I haven't figured out how/if we can solve this in the current way we do things in LLDB, but in the modern-type-lookup this is solvable as we have a saner architecture with the ExternalASTMerger. As we can (hopefully) make modern-type-lookup the default mode in the future, I would say we try fixing this issue here. As we don't use the hack that was reinstated in D67803 during modern-type-lookup, the test case for this is essentially just printing any kind of container in `std::` as we would otherwise run into the issue that required a hack like D67803. What this patch is doing in essence is that instead of importing a declaration from a temporary ASTContext, we instead check if the declaration originally came from a persistent ASTContext (e.g. the debug information) and we directly import from there. The ExternalASTMerger is already connected with ASTImporters to these different sources, so this patch is essentially just two parts: 1. Mark our temporary ASTContext/ImporterSource as temporary when we import from the expression AST. 2. If the ExternalASTMerger sees we import from the expression AST, instead of trying to import these temporary declarations, check if we can instead import from the persistent ASTContext that is already connected. This ensures that all records from the persistent source actually come from the persistent source and are minimally imported in a way that allows them to be completed later on in the target AST. The next step is to run the ASTImporter for these temporary expressions with the MinimalImport mode disabled, but that's a follow up patch. This patch fixes most test failures with modern-type-lookup enabled by default (down to 73 failing tests, which includes the 22 import-std-module tests which need special treatment). Reviewers: shafik, martong Reviewed By: martong Subscribers: aprantl, rnkovacs, christof, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68326 llvm-svn: 373711
OpenPOWER on IntegriCloud