summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Reapply "Rewrite gdb-remote's SendContinuePacketAndWaitForResponse"Pavel Labath2016-08-0916-895/+1214
| | | | | | | | | | | | Resumbitting the commit after fixing the following problems: - broken unit tests on windows: incorrect gtest usage on my part (TEST vs. TEST_F) - the new code did not correctly handle the case where we went to interrupt the process, but it stopped due to a different reason - the interrupt request would remain queued and would interfere with the following "continue". I also added a unit test for this case. This reapplies r277156 and r277139. llvm-svn: 278118
* Garbage collection is not around anymore, we can remove our support for it.Greg Clayton2016-08-081-17/+1
| | | | llvm-svn: 278064
* Fix more RegisterInfo initialization issues and quiet hundreds of warnings.Greg Clayton2016-08-0811-727/+727
| | | | llvm-svn: 278063
* Fix printf warnings.Greg Clayton2016-08-081-2/+2
| | | | llvm-svn: 278061
* Fix RegisterInfo initializers to have all the required initializers after ↵Greg Clayton2016-08-088-229/+229
| | | | | | recent changes. This quiets a few hundred warnings on MacOSX. llvm-svn: 278060
* Fix uninitialized field warnings in GDBRemoteRegisterContextPavel Labath2016-08-081-109/+111
| | | | | | | also take the opportunity to replace NULL with nullptr and add clang-format guards to prevent it from messing up the nice table there. llvm-svn: 278005
* Clean up linux/Ptrace.hPavel Labath2016-08-081-18/+9
| | | | | | | | This removes references to PT_XXX macros from the file, as they were not used anyway. It also changes the macro used to check for the definition of __ptrace_request, as there are other C libraries which do not define this type. llvm-svn: 278001
* Remove Android.hPavel Labath2016-08-088-48/+16
| | | | | | | It only contained a reimplementation of std::to_string, which I have replaced with usages of pre-existing llvm::to_string (also, injecting members into the std namespace is evil). llvm-svn: 278000
* Remove SYS_tgkill from Android.hPavel Labath2016-08-083-4/+1
| | | | | | instead, use __NR_tgkill directly, which seems to be the preferred form in the codebase anyway. llvm-svn: 277999
* Remove _isatty from Android.hPavel Labath2016-08-082-2/+1
| | | | | | it is just #defined to isatty anyway, which lldb already knows how to use. llvm-svn: 277997
* The lack of classes in the hash table is not an error - it's very ↵Enrico Granata2016-08-061-1/+1
| | | | | | legitimately possible for a process to define no ObjC classes of its own. Discovered by debugging /bin/ls llvm-svn: 277897
* Fix Windows build - add return statement in ↵Oleksiy Vyalov2016-08-061-1/+1
| | | | | | SBThread::StepUsingScriptedThreadPlan. llvm-svn: 277895
* Mention the scripted thread plans in the python reference.Jim Ingham2016-08-051-0/+112
| | | | llvm-svn: 277890
* Mention is_stale in the scripted step doc.Jim Ingham2016-08-051-7/+29
| | | | llvm-svn: 277884
* Add a few more needed bits to the scripted thread plans.Jim Ingham2016-08-0511-4/+94
| | | | llvm-svn: 277879
* Tweaks to the reporting of "missing dyld shared cached" that make it easier ↵Enrico Granata2016-08-052-23/+69
| | | | | | to grab logs when such issues occur, make the logs more helpful, and also tweaks to the user messaging to make it easier to pinpoint an investigation avenue early on llvm-svn: 277844
* [asan] Remove unused include (NFC)Vedant Kumar2016-08-051-1/+0
| | | | llvm-svn: 277837
* Change the indexing done for kernel/kext directories to be recursive.Jason Molenda2016-08-052-498/+257
| | | | | | | | | | | | | | Also re-write how most of the directory indexing is done - as it has grown over the years, it has become a bit of a mess and was overdue for a cleanup. Most importantly, this allows you to specify a directory with the platform.plugin.darwin-kernel.kext-directories setting and now lldb will search for kexts and kernels in those directories recursively. <rdar://problem/20754467> llvm-svn: 277789
* Errors compiling breakpoint conditions will cause the breakpoint not to be hitJim Ingham2016-08-032-2/+47
| | | | | | | | | This was a shadowed variable error from the big Expression Parser plugin-ification. I also added a test case for this. <rdar://problem/27682376> llvm-svn: 277662
* Add the new OCaml support files to the Xcode project file.Jim Ingham2016-08-031-2/+28
| | | | llvm-svn: 277660
* [RenderScript] Always create a new allocation ID in CaptureAllocationInit hookLuke Drummond2016-08-032-12/+39
| | | | | | | | | | | | | | | | Due to internal reuse of buffers in the RenderScript runtime by the system allocator, comparing pointers is not a safe way to check whether an allocation is tracked by lldb. This change updates the lldb RenderScript internal hook callback to properly identify and remove old allocations that had have an address that is currently being tracked. This change also removes the need for `lldb_private::renderscript::LookupAllocation` to take a `create` flag, as this is now always the case. Original Author: <dean@codeplay.com> Subscribers: lldb-commits llvm-svn: 277613
* Fix an unused variable warning in release builds.Luke Drummond2016-08-031-1/+1
| | | | | | | | | | | | ``num_params`` was unused in RenderScript ABI fixup pass ``cloneToStructRetFnTy`` and was only used in an `assert()` that the number of function parameters for the cloned function was correct. Now we actually use this variable, rather than recomputing it, and avoid the unused variable warning when building without asserts enabled. Subscribers: lldb-commits llvm-svn: 277608
* Fix the BUILD_SHARED_LIBS=ON build, was getting the following error while ↵Ismail Donmez2016-08-031-0/+1
| | | | | | | | linking liblldb.so: ../include/llvm/Target/TargetOptions.h:104: error: undefined reference to 'llvm::TargetRecip::TargetRecip()' llvm-svn: 277585
* [Concepts] Add TODO and requires-clause placeholder; NFCHubert Tong2016-08-021-1/+3
| | | | llvm-svn: 277495
* Revert rL277429: Correct makefile.rules to use toolchain specific AR and OBJCOPYOmair Javaid2016-08-021-17/+18
| | | | | | | | | | This commit is causing problems on gcc-* compiler with version number sufix. Requires a new solution will post a follow up patch. Differential revision: https://reviews.llvm.org/D20386 llvm-svn: 277453
* Support for OCaml native debuggingTamas Berghammer2016-08-0214-0/+1600
| | | | | | | | | | | | | This introduces basic support for debugging OCaml binaries. Use of the native compiler with DWARF emission support (see https://github.com/ocaml/ocaml/pull/574) is required. Available variables are considered as 64 bits unsigned integers, their interpretation will be left to a OCaml-made debugging layer. Differential revision: https://reviews.llvm.org/D22132 llvm-svn: 277443
* Correct makefile.rules to use toolchain specific AR and OBJCOPYOmair Javaid2016-08-021-18/+17
| | | | | | Differential revision: https://reviews.llvm.org/D20386 llvm-svn: 277429
* [LLVM][MIPS] Add (D)SUBU, (D)ADDU, LUI instructions emulation . Fix ↵Nitesh Jain2016-08-024-41/+301
| | | | | | | | | | | | emulation for (D)ADDIU, SD/SW and LW/LD instructions Reviewers: clayborg, jaydeep, bhushan Subscribers: mohit.bhakkad, slthakur, sdardis, lldb-commits Differential Revision: https://reviews.llvm.org/D20357 llvm-svn: 277426
* [asan] Remove unused #include (NFC)Vedant Kumar2016-08-011-1/+0
| | | | llvm-svn: 277359
* [lldb] Delete dead, infinitely-recursive code (NFC)Vedant Kumar2016-08-012-12/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D22985 llvm-svn: 277351
* [lldb][tsan] Perform one map lookup instead of two (NFC)Vedant Kumar2016-08-011-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D22983 llvm-svn: 277350
* [lldb][tsan] Avoid a string copy (NFC)Vedant Kumar2016-08-011-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D22984 llvm-svn: 277347
* [lldb] Ignore various test artifacts (NFCI)Vedant Kumar2016-08-011-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D22988 llvm-svn: 277346
* [LLVM][MIPS] Fix FPU Size Based on Dynamic FR.Nitesh Jain2016-08-0122-229/+401
| | | | | | | | | | Reviewers: jingham, clayborg Subscribers: jaydeep, bhushan, mohit.bhakkad, slthakur, lldb-commits, emaste, nemanjai, labath, sdardis Differential Revision: https://reviews.llvm.org/D20357 llvm-svn: 277343
* Some code that is sanity checking stepping out back out from one inlinedJim Ingham2016-07-291-0/+6
| | | | | | | | | frame to another was triggering an early stop when stepping back out to a real frame. Check that we're doing this only for inlined frames. <rdar://problem/26482931> llvm-svn: 277185
* Revert "updated Xcode project r277139"Todd Fiala2016-07-291-12/+0
| | | | | | | | | | This undoes my last commit. It collided with Pavel undoing his change that my previous commit was adjusting for in the Xcode file. This reverts commit f6f29cb7d7c56f96f21d9c115ecc66d652639df3. llvm-svn: 277157
* updated Xcode project r277139Todd Fiala2016-07-291-0/+12
| | | | llvm-svn: 277156
* Revert "Rewrite gdb-remote's SendContinuePacketAndWaitForResponse"Pavel Labath2016-07-2915-1168/+895
| | | | | | | | This reverts commit r277139, because: - broken unittest on windows (likely typo on my part) - seems to break TestCallThatRestart (needs investigation) llvm-svn: 277154
* Add/fix support for i386 elf core filesDimitar Vlahovski2016-07-296-28/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There were places in the code, assuming(hardcoding) offsets and types that were only valid for the x86_64 elf core file format. The NT_PRSTATUS and NT_PRPSINFO structures are with the 64 bit layout. I have reused them and parse i386 files manually, and fill them in the same struct. Also added some error handling during parsing that checks if the available bytes in the buffer are enough to fill the structures. The i386 core file test case now passes. For reference on the structures layout, I generally used the source of binutils (bfd, readelf) Bug: https://llvm.org/bugs/show_bug.cgi?id=26947 Reviewers: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22917 llvm-svn: 277140
* Rewrite gdb-remote's SendContinuePacketAndWaitForResponsePavel Labath2016-07-2915-895/+1168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SendContinuePacketAndWaitForResponse was huge function with very complex interactions with several other functions (SendAsyncSignal, SendInterrupt, SendPacket). This meant that making any changes to how packet sending functions and threads interact was very difficult and error-prone. This change does not add any functionality yet, it merely paves the way for future changes. In a follow-up, I plan to add the ability to have multiple query packets in flight (i.e., request,request,response,response instead of the usual request,response sequences) and use that to speed up qModuleInfo packet processing. Here, I introduce two special kinds of locks: ContinueLock, which is used by the continue thread, and Lock, which is used by everyone else. ContinueLock (atomically) sends a continue packet, and blocks any other async threads from accessing the connection. Other threads create an instance of the Lock object when they want to access the connection. This object, while in scope prevents the continue from being send. Optionally, it can also interrupt the process to gain access to the connection for async processing. Most of the syncrhonization logic is encapsulated within these two classes. Some of it still had to bleed over into the SendContinuePacketAndWaitForResponse, but the function is still much more manageable than before -- partly because of most of the work is done in the ContinueLock class, and partly because I have factored out a lot of the packet processing code separate functions (this also makes the functionality more easily testable). Most importantly, there is none of syncrhonization code in the async thread users -- as far as they are concerned, they just need to declare a Lock object, and they are good to go (SendPacketAndWaitForResponse is now a very thin wrapper around the NoLock version of the function, whereas previously it had over 100 lines of synchronization code). This will make my follow up changes there easy. I have written a number of unit tests for the new code and I have ran the test suite on linux and osx with no regressions. Subscribers: tberghammer Differential Revision: https://reviews.llvm.org/D22629 llvm-svn: 277139
* Fixup r277011 - wrong use of infinite timeoutPavel Labath2016-07-291-1/+1
| | | | | | | The commit accidentally switched a timed wait on a condition variable into an infinite timeout. Change that back. Android tests were timeing out without this. llvm-svn: 277133
* Improve code of loading plugins that provide cmndsAbhishek Aggarwal2016-07-292-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Modified code that enables writing new user-defined commands and use them through LLDB CLI. Modifications are: -- Define the 'syntax' for each user-defined command --- Added an argument in SBCommandInterpreter::AddCommand() and SBCommand::AddCommand() API --- Allow passing syntax for each user-defined command --- Earlier, only 'help' could be defined and passed for commands -- Passed 'number of arguments' entered on CLI for user-defined commands --- Added an argument (number of options) in SBCommandPluginInterface::DoExecute() API to know the number of arguments passed for commands -- In CommandPluginInterfaceImplementation class: --- Make the data member m_backend a shared_ptr --- Avoids memory leaks of dynamically allocated SBCommandPluginInterface instances created in lldb::PluginInitialize() API Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jingham, granata.enrico, clayborg Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D22863 llvm-svn: 277125
* PlatformDarwinKernel maintains a list of kexts and kernelsJason Molenda2016-07-292-12/+148
| | | | | | | | | | | | | | | | | | | | | | | that it finds on the local computer in "well known" locations when we start up the darwin-kernel platform. It did not distinguish between kexts/kernels with dSYMs from others - when it needed a kernel/kext with a given UUID, it would grab the first one it finds. This change separates these into two vectors -- a collection of kexts and kernels with dSYMs next t othem, and a collection of kexts and kernels without dSYMs. When we have a bundle ID and uuid to search for, we first try the collections with dSYMs, and if that fails, then we try the collections that did not have dSYMs next to them. Often times we'll have a situation where a kext will be installed in multiple locations on a system, but only one of them will have a dSYM next to it, where the dev just copied it to a local directory. This fixes that problem, giving precedence to those binaries with debug information. llvm-svn: 277123
* Fix -break-insert not working when using absolute paths (MI)Ilia K2016-07-294-2/+27
| | | | | | | | | | | | | | Summary: When trying to parse the -break-insert arguments as a named location, the string parsing was not configured to allow directory paths. This patch adds a constructor to allow the parsing of string as directory path along with the other parameters. This fixes https://llvm.org/bugs/show_bug.cgi?id=28709 Patch from malaperle@gmail.com Reviewers: clayborg, ki.stfu Subscribers: lldb-commits, ki.stfu Differential Revision: https://reviews.llvm.org/D22902 llvm-svn: 277117
* Move the code which knows how to get information about the sharedJason Molenda2016-07-296-63/+188
| | | | | | | | | | cache from ObjectFileMachO (very wrong place) to the DynamicLoader plugins (better place). Not much change to the code itself, although the old ObjectFileMachO method would try both the new dyld SPI and reading the dyld_all_image_infos structure. In the new methods, I've separated those into the appropriate DynamicLoader plugins. llvm-svn: 277088
* Small refinement on the memory segment support in core files thatJason Molenda2016-07-281-0/+17
| | | | | | | | | | | Greg added in r272276 -- when working with a non-user-process mach-o core file, force the permissions to readable + executable, else the unwinder can stop backtracing early if it gets a pc value in a segment that it thinks is non-executable. <rdar://problem/27138456> <rdar://problem/27462904> llvm-svn: 277065
* Remove a duplicated block in cmake.Stephane Sezer2016-07-281-13/+0
| | | | | | | | | | | | | | Summary: This is supposed to find the python lib dir and seems like it's just been copied twice by mistake. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22891 llvm-svn: 277060
* Cleanup some format string warningsLuke Drummond2016-07-281-13/+9
| | | | | | | | | | Clean up format string warnings in ValueObjectSyntheticFilter.cpp to explictly cast "%p" params to void *` Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22923 llvm-svn: 277016
* Host: correct use of std::condition_variable::wait_forSaleem Abdulrasool2016-07-281-1/+1
| | | | | | | | std::condition::wait_for takes a std::unique_lock<T>. The previous commit accidentally left a reference to `m_mutex` instead of `lock`. Update that. Should restore the android lldb builder to green. llvm-svn: 277013
* Fixed up Xcode build for r276976 and r277011.Todd Fiala2016-07-283-29/+31
| | | | | | | Also, fixed up typos in RenderScript code that could not possibly compile. llvm-svn: 277012
OpenPOWER on IntegriCloud