summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify NativeProcessProtocol::GetArchitecture/GetByteOrderPavel Labath2017-11-0913-87/+26
| | | | | | | | | | | | | | | | | | | Summary: These functions used to return bool to signify whether they were able to retrieve the data. This is redundant because the ArchSpec and ByteOrder already have their own "invalid" states, *and* because both of the current implementations (linux, netbsd) can always provide a valid result. This allows us to simplify bits of the code handling these values. Reviewers: eugene, krytarowski Subscribers: javed.absar, lldb-commits Differential Revision: https://reviews.llvm.org/D39733 llvm-svn: 317779
* Xfail TestConcurrentTwoWatchpointsOneSignal on armPavel Labath2017-11-081-0/+1
| | | | | | | r317561 exposed an interesting bug (pr35228) in handling of simultaneous watchpoint hits. Disabling the test until we can get that fixed. llvm-svn: 317683
* Log: delimit thread name in log messagePavel Labath2017-11-081-2/+1
| | | | | | | | | | The thread name was not followed by a space, which meant it was glued to the log message. I also align the name as we do that with other log fields. I align it to 16 chars instead of llvm::max_thread_name(), as that can be 64 on darwin, which is rather long. If anybody feels differently about that, we can change it. llvm-svn: 317679
* Make TestTopLevelExprs more robust in face of linker GCPavel Labath2017-11-082-21/+12
| | | | | | | | | | | | | | | | | | Summary: This test was failing in various configurations on linux in a fairly unpredictible way. The success depended on whether the c++ abi library was linked in statically or not and how well was the linker able to strip parts of it. This introduces additional code to the "dummmy" test executable, which ensures that all parts of the library needed to evaluate the expressions are always present. Reviewers: clayborg Subscribers: srhines, tatyana-krasnukha, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D39727 llvm-svn: 317678
* Update tuple/list/deque data formatters to work with newest libc++Pavel Labath2017-11-073-10/+29
| | | | | | | | | | | | | | Summary: A couple of members of these data structures have been renamed in recent months. This makes sure they still work with the latest libc++ version. Reviewers: jingham, EricWF Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39602 llvm-svn: 317624
* Fix an issue in r317563 causing a clang assertTamas Berghammer2017-11-071-3/+3
| | | | llvm-svn: 317574
* Support scoped enums in the DWARF AST parserTamas Berghammer2017-11-075-9/+14
| | | | | | | | Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D39545 llvm-svn: 317563
* test: Clean up finalize_build_dictionaryPavel Labath2017-11-071-2/+1
| | | | | | | We only support API>=16 now, so we don't need to check the API level of the android device. llvm-svn: 317562
* "Fix" concurrent events test for armPavel Labath2017-11-0722-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The test incremented an atomic varible to trigger the watchpoint event. On arm64 this compiled to a ldaxr/stlxr loop, with the watchpoint being triggered in the middle of the loop. Hitting the watchpoint resets the exclusive monitor, and forces the process to loop one more time, hitting the watchpoint again, etc. While it would be nice if the debugger was able to resume from this situation, this is not trivial, and is not what this test is about. Therefore, I propose to change this to a simple store to a normal variable (which should still trip the watchpoint everywhere, but without atomic loops) and file a bug to investigate the possibilities of handling the watchpoints in atomic loops in a more reasonable way. Reviewers: clayborg Subscribers: aemerson, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D39680 llvm-svn: 317561
* Disable tests in lang/c/shared_lib on WindowsStephane Sezer2017-11-071-0/+3
| | | | | | | | | | | | | | Summary: These fail because `-fPIC` is not supported on Windows. Reviewers: zturner, jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39692 llvm-svn: 317529
* Add a dependency from check-lldb on lldStephane Sezer2017-11-061-0/+9
| | | | | | | | | | | | Summary: This is required when using the in-tree clang for building tests, because -fuse-ld=lld is used by default. Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D39689 llvm-svn: 317501
* Extend android xfail in TestTopLevelExprsPavel Labath2017-11-061-1/+1
| | | | | | | The test fails on API level 19 as well. I'm going to assume that it fails on every API level below 23. llvm-svn: 317474
* Improve the posix core file triple detectionTamas Berghammer2017-11-042-5/+11
| | | | | | | | | | | | | | | | | | | | | | | Summary: Posix core files sometime don't contain enough information to correctly detect the OS. If that is the case we should use the OS from the target instead as it will contain usable information in more cases and if the target and the core contain different OS-es then we are already in a pretty bad state so moving from an unknown OS to a known (but possibly incorrect) OS will do no harm. We already had similar code in place for MIPS. This change tries to make it more generic by using ArchSpec::MergeFrom and extends it to all architectures but some MIPS specific issue prevent us from getting rid of special casing MIPS. Reviewers: clayborg, nitesh.jain Subscribers: aemerson, sdardis, arichardson, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D36046 llvm-svn: 317411
* Remove ProcessGdbRemote::m_flagsPavel Labath2017-11-032-7/+1
| | | | | | The member is completely unused. Discussed on lldb-dev. llvm-svn: 317377
* Add float/vector registers for ppc64lePavel Labath2017-11-038-17/+1099
| | | | | | | | | | | | | | | Summary: Add read and write functions for VSX, VMX and float registers and fix watchpoint size Reviewers: clayborg Reviewed By: clayborg Subscribers: eugene, labath, clayborg, nemanjai, kbarton, JDevlieghere, anajuliapc, gut, lbianc, lldb-commits Differential Revision: https://reviews.llvm.org/D39487 Patch by: Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br> llvm-svn: 317329
* Add type to FileSpec::PathSyntax enum.Don Hinton2017-11-031-1/+1
| | | | | | | | | | | | Summary: Add type to FileSpec::PathSyntax enum to decrease size for FileSpec on systems with 32 bit pointers. Thanks to @zturner for pointing this out. Differential Revision: https://reviews.llvm.org/D39574 llvm-svn: 317327
* Xfail test_stack_info_in_minidump testPavel Labath2017-11-031-0/+1
| | | | | | | The test has been failing since we enabled the i386 ABI plugin on windows. See pr35193 for details. llvm-svn: 317326
* Fix classifications on two concurrent event testsPavel Labath2017-11-032-1/+1
| | | | | | | I have classified one as a watchpoint test even though it wasn't and vice versa. Fix that. llvm-svn: 317319
* Remove getCategories mechanism of specifying test categoriesPavel Labath2017-11-0216-57/+36
| | | | | | | | | | | | | | | | | | Summary: This mechanism was mostly redundant with the file-based .categories mechanism, and it was interfering with it, as any test which implemented a getCategories method would not inherit the filesystem categories. This patch removes it. The existing categories are preserved either by adding a .categories file, or using the @add_test_categories decorator. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39515 llvm-svn: 317277
* Remove android watchpoint xfailsPavel Labath2017-11-0222-69/+0
| | | | | | | | Now that the wathpoint tests have their own category, we can easily skip them on devices which don't have watchpoint support. Therefore, we don't need an android xfail on each of these tests. llvm-svn: 317276
* Fix some warnings found by ToT clangPavel Labath2017-11-0210-14/+5
| | | | | | | | These fall into two categories: - unused variables - (uint8_t *)NULL + X -- changed to reinterpret_cast(X) llvm-svn: 317270
* Run clang-format on lldb.cppStephane Sezer2017-11-021-4/+2
| | | | llvm-svn: 317219
* Use LLVM version stringStephane Sezer2017-11-021-5/+1
| | | | | | | | | | | | | | | | | | | | Summary: macOS builds of LLDB use the bundle version from `tools/driver/lldb-Info.plist`. That file hasn't been updated since the 4.0 release so the version we print provides no value. I also think that even if it were up to date, that number has no meaning and displaying the version from the LLVM tree is more valuable. I know that Apple folks have some form of override for the clang version to match the Xcode version, so it'd make sense for them to do the same for LLDB. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39429 llvm-svn: 317218
* Revert r317182 for https://reviews.llvm.org/D39128Jason Molenda2017-11-0212-573/+20
| | | | | | | we're still failing on android. I'll ask Larry to ask Pavel for any tips he might be able to give. llvm-svn: 317183
* Commit Lawrence D'Anna's patch to changeJason Molenda2017-11-0212-20/+573
| | | | | | | | | | | | | | | SetOututFileHandle to work with IOBase. I did make one change after checking with Larry -- I renamed SBDebugger::Flush to FlushDebuggerOutputHandles and added a short docstring to the .i file to make it a little clearer under which context programs may need to use this API. Differential Revision: https://reviews.llvm.org/D39128 <rdar://problem/34870417> llvm-svn: 317182
* Ahhhh roll back that commit, I didn't see that Lawrence had filedJason Molenda2017-11-0210-308/+21
| | | | | | | a separate phabracator with the revised change. This was his first atttempt which broke on the bots the second time too. llvm-svn: 317181
* Commit Lawrence D'Anna's patch to changeJason Molenda2017-11-0210-21/+308
| | | | | | | | | | | | | | SetOututFileHandle to work with IOBase. I did make one change after checking with Larry -- I renamed SBDebugger::Flush to FlushDebuggerOutputHandles and added a short docstring to the .i file to make it a little clearer under which context programs may need to use this API. Differential Revision: https://reviews.llvm.org/D38829 llvm-svn: 317180
* [Core] Comparison for unsigned >= 0 is redundant. NFCI.Davide Italiano2017-11-011-1/+1
| | | | llvm-svn: 317145
* [XML] Simplify lambda removing unused capture. NFCI.Davide Italiano2017-11-011-1/+1
| | | | llvm-svn: 317144
* [Interpreter] Remove unused variable usage. NFCI.Davide Italiano2017-11-011-2/+1
| | | | llvm-svn: 317143
* dotest: consistently call finalize_build_dictionary in debug info variantsPavel Labath2017-11-011-0/+2
| | | | | | | | | dwarf&dwo versions were doing it, but gmodules and dsym weren't. All this function does right now is pass OS=Android to make when targeting android. This enables us to run dotest without manually passing --env OS=Android. llvm-svn: 317130
* add LibCxxTuple.cpp, LibCxxQueue.cpp to xcode project file.Jason Molenda2017-11-011-0/+8
| | | | llvm-svn: 317129
* Add data formatter for libc++ std::queuePavel Labath2017-11-017-0/+134
| | | | | | | | | | | | | | Summary: std::queue is just a fancy wrapper around another container, so all we need to do is to delegate to the it. Reviewers: jingham, EricWF Subscribers: srhines, mgorny, lldb-commits, eugene Differential Revision: https://reviews.llvm.org/D35666 llvm-svn: 317099
* Add data formatter for libc++ std::tuplePavel Labath2017-11-017-0/+159
| | | | | | | | | | Reviewers: jingham, EricWF Subscribers: srhines, eugene, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D35615 llvm-svn: 317095
* Remove uint32_t assignment operator from StatusPavel Labath2017-11-012-23/+0
| | | | | | | | | | | | | | | | Summary: It is not presently used, and it's quite dangerous to use -- it assumes the integer is an osx kern_return_t, but very few of the integers we have lying around are mach kernel error codes. The error can still be used to a mach error using a slightly longer (but more explicit) syntax. Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D35305 llvm-svn: 317093
* Remove Sean Callanan from the CODE_OWNERS, he won't have timeJason Molenda2017-11-011-4/+1
| | | | | | | to participate in lldb going forward. Jim Ingham is adopting the areas he was responsible for. llvm-svn: 317067
* Modernize the example cmdtemplate.py.Jim Ingham2017-10-311-85/+95
| | | | | | | | This version relies on a newer and more convenient way to use a class to implement a command. It has been in place since early 2015, so it should be pretty safe to use. llvm-svn: 317043
* Add a "watchpoint" test category and annotate tests appropriatelyPavel Labath2017-10-3124-1/+26
| | | | | | | | | | | Most of the watchpoint tests are organized into subtrees, so we can use the file-based .categories approach to annotate them. The exception are the concurrent_events tests, which needed to be annotated on a per-test basis. The motivation behind this is to provide an easy way to disable watchpoint tests on systems where the watchpoint functionality is not present/unreliable. llvm-svn: 317004
* Fix LLVM_LINK_LLVM_DYLIB build (pr35053)Pavel Labath2017-10-319-108/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r316368 broke this build when it introduced a reference to a pthread function to the Utility module. This caused cmake to generate an incorrect link line (wrong order of libs) because it did not see the dependency from Utility to the system libraries. Instead these libraries were being manually added to each final target. This changes moves the dependency management from the individual targets to the lldbUtility module, which is consistent with how llvm does it. The final targets will pick up these libraries as they will be a part of the link interface of the module. Technically, some of these dependencies could go into the host module, as that's where most of the os-specific code is, but I did not try to investigate which ones. Reviewers: zturner, sylvestre.ledru Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D39246 llvm-svn: 316997
* Increase AdbClient read timeoutPavel Labath2017-10-311-1/+1
| | | | | | | | The previous value was not sufficient for Pixel 2 phones. One would have hoped that the newer phones are faster, but that does not seem to be the case here. llvm-svn: 316993
* Add data formatter for libc++'s forward_listPavel Labath2017-10-316-85/+249
| | | | | | | | | | | | | | | Summary: This adds a data formatter for the implementation of forward_list in libc++. I've refactored the existing std::list data formatter a bit to enable more sharing of code (mainly the loop detection stuff). Reviewers: jingham, EricWF Subscribers: srhines, eugene, lldb-commits Differential Revision: https://reviews.llvm.org/D35556 llvm-svn: 316992
* Fix mac build broken in r316987Pavel Labath2017-10-311-1/+1
| | | | | | Forgot one occurence of ArchSpec::SetTriple in mac-specific code. llvm-svn: 316990
* Invert ArchSpec<->Platform dependencyPavel Labath2017-10-3118-128/+144
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: ArchSpec::SetTriple was taking a Platform as an argument, and used it to fill in missing pieces of the specified triple. I invert the dependency by moving this code to other classes. For this purpose, I've created three new functions. - HostInfo::GetAugmentedArchSpec: fills in the triple using the host platform (this used to be implemented by passing a null platform pointer). By putting this code in the Host module, we can provide a way to anyone who does not have a platform instance (lldb-server) an easy way to get Host data. - Platform::GetAugmentedArchSpec: if you have a platform instance, you can call this to let it fill in the triple. - static Platform::GetAugmentedArchSpec: implements the "if platform == 0 then use_host() else use_platform()" part. Reviewers: zturner, jingham, clayborg Subscribers: mgorny, javed.absar, lldb-commits Differential Revision: https://reviews.llvm.org/D39387 llvm-svn: 316987
* Android.rules: build with "unified android headers"Pavel Labath2017-10-311-3/+5
| | | | | | | | | Unified headers will be the only way to build applications in NDK r16, and it also works with NDK r15. This also bumps the minimum supported android version to 16. llvm-svn: 316985
* Split makefile for TestTopLevelExprsPavel Labath2017-10-312-6/+13
| | | | | | | | | | | | this test was using a single makefile to build two executables. This setup, although not supported by Makefile.rules, happened to work in most configurations, except when building with the android ndk r16. Here I move the building of the second executable to a separate makefile, which is the solution other tests use for multiple targets. llvm-svn: 316982
* Remove a stray space.Jim Ingham2017-10-301-1/+1
| | | | llvm-svn: 316954
* Fix windows build broken in r316915Pavel Labath2017-10-301-1/+0
| | | | | | I accidentally left a linux-specific include in generic code. llvm-svn: 316919
* MainLoop: work around an android libc bugPavel Labath2017-10-302-11/+27
| | | | | | | | | | | | | Versions of android before kitkat implemented pselect non-atomically, which caused flakyness, as we were relying on it atomically setting the signal mask to implement waiting for signals. This patch implements a direct call to the the pselect kernel syscall, which does not suffer from this problem. The code itself is not very pretty, but fortunately the uglyness is contained in the android version of the MainLoop::RunImpl::Poll function. llvm-svn: 316915
* [CMake] Build clang as dependency when using in-tree clang for tests.Davide Italiano2017-10-272-0/+12
| | | | | | | Discussed with Zachary Turner and Pavel Labath on lldb-dev. Let's hope this doesn't break anything :) llvm-svn: 316800
* Add specific ppc64le hardware watchpoint handlerPavel Labath2017-10-274-12/+320
| | | | | | | | | | | | | | | Summary: Add hardware watchpoint funcionality for ppc64le Reviewers: clayborg, zturner Reviewed By: clayborg Subscribers: eugene, clayborg, zturner, lbianc, gut, nemanjai, alexandreyy, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D38897 Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br> llvm-svn: 316772
OpenPOWER on IntegriCloud