summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Minidump plugin: Adding ProcessMinidump, ThreadMinidump and register the ↵Dimitar Vlahovski2016-10-3120-8/+907
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin in SystemInitializerFull Summary: This plugin resembles the already existing Windows-only Minidump plugin. The WinMinidumpPlugin uses the Windows API for parsing Minidumps while this plugin is cross-platform because it includes a Minidump parser (which is already commited) It is able to produce a backtrace, to read the general puprose regiters, inspect local variables, show image list, do memory reads, etc. For now the only arches that this supports are x86_32 and x86_64. This is because I have only written register contexts for those. Others will come in next CLs. I copied the WinMinidump tests and adapted them a little bit for them to work with the new plugin (and they pass) I will add more tests, aiming for better code coverage. There is still functionality to be added, see TODOs in code. Reviewers: labath, zturner Subscribers: beanz, mgorny, modocache, lldb-commits, amccarth Differential Revision: https://reviews.llvm.org/D25905 llvm-svn: 285587
* Minidump plugin: Adding x86_32 register context converterDimitar Vlahovski2016-10-318-42/+322
| | | | | | | | | | | | | | | | | Summary: This, like the x86_64 case, reads the register values from the minidump file, and emits a binary buffer that is ordered using the offsets from the RegisterInfoInterface argument. That way we can reuse an existing register context. Added unit tests. Reviewers: labath, zturner Subscribers: beanz, mgorny, modocache, amccarth, lldb-commits Differential Revision: https://reviews.llvm.org/D25832 llvm-svn: 285584
* Use the right dwarf attributes for parsing location list entries (fixup for ↵Pavel Labath2016-10-311-2/+2
| | | | | | | | | | | | | r285441) Note that the parsing code here is still incorrect wrt. the new draft of the dwarf 5 spec (seconds arguments to DW_LLE_startx_length should be uleb128, not u32). Once we have compilers actually emitting dwarf conformant with the new spec, we'll need to revisit this and figure out the proper behavior there. This should unbreak the linux bot. llvm-svn: 285562
* [Test Suite] Pull generateSource into lldbtestChris Bieneman2016-10-3112-58/+48
| | | | | | | | | | | | | | | Summary: Convert tests using LLDB headers to use generateSource to put the right include paths in place regardless of whether or not you're building a framework. This also abstracted generateSource out of TestPublicAPIHeaders.py into lldbtest.py. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25887 llvm-svn: 285542
* [Test Suite] Properly respect --framework optionChris Bieneman2016-10-313-12/+43
| | | | | | | | | | | | | | | Summary: dotest.py has a framework option that is not respected. This patch makes the framework path properly configurable via the --framework option. This patch also adds a function to the lldbtest.Base class named "hasDarwinFramework" which allows us to not rely on the host platform to determine if a framework is present. If running on Darwin, and not building a framework, this will follow the *nix code paths which are appropriate for Darwin. Reviewers: tfiala Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25886 llvm-svn: 285541
* Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbolsTodd Fiala2016-10-292-6/+9
| | | | | | | | | | | | | | | | | | | LLDB_EXPORT_ALL_SYMBOLS used to instruct the build to export all the symbols in liblldb on CMake builds. This change limits the CMake define to only add in the lldb_private namespace to the symbols that normally get exported, such that we export all the symbols in the public lldb namespace and the lldb_private namespace. This is a fix for: https://llvm.org/bugs/show_bug.cgi?id=30822 Reviewers: labath, beanz Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26093 llvm-svn: 285484
* Rename DWARF 5 constants to adapt to change in LLVMAdrian Prantl2016-10-281-3/+3
| | | | llvm-svn: 285441
* Rename DWARF 5 constants to adapt to change in LLVMAdrian Prantl2016-10-281-4/+4
| | | | llvm-svn: 285424
* Add a couple of fun unit tests for FileSpec::EqualPavel Labath2016-10-281-9/+82
| | | | | | | Most of them fail right now and are commented out. The main problem is handling of backslashes on windows, but also the posix path code has a couple of issues. llvm-svn: 285393
* Check that we got back an object from MakeFunctionCallerJason Molenda2016-10-274-4/+4
| | | | | | | | before we call through it. <rdar://problem/28979705> llvm-svn: 285369
* Revert "[Test Suite] Pull generateSource into lldbtest"Chris Bieneman2016-10-2712-48/+58
| | | | | | | | This reverts commit r285357. I committed this patch accidentally out of order. Will recommit when the change this depends on is landed. llvm-svn: 285361
* [Test Suite] Pull generateSource into lldbtestChris Bieneman2016-10-2712-58/+48
| | | | | | | | | | | | | | | Summary: Convert tests using LLDB headers to use generateSource to put the right include paths in place regardless of whether or not you're building a framework. This also abstracted generateSource out of TestPublicAPIHeaders.py into lldbtest.py. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25887 llvm-svn: 285357
* [CMake] Rename lldb-launcher to darwin-debugChris Bieneman2016-10-273-43/+2
| | | | | | | | | | | | Summary: This tool is only built on Darwin, and the name darwin-debug matches the Xcode project. We should have this in sync unless there is a good reason not to. Reviewers: zturner, tfiala, labath Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25745 llvm-svn: 285356
* Add support for "type lookup" to find C and C++ typesEnrico Granata2016-10-275-4/+104
| | | | | | | | This is an important first step in closing the functionality gap between "type lookup" and "images lookup -t" rdar://28971388 llvm-svn: 285332
* Fix an issue where frame variable -s <varname> would not show the scope even ↵Enrico Granata2016-10-265-36/+68
| | | | | | | | though the user asked for it Part of rdar://28434047 llvm-svn: 285226
* Actually use = delete to mark constructors and operators we want to not ↵Enrico Granata2016-10-261-2/+2
| | | | | | | | exist. Just declaring them as private works, but it can confuse certain tools as it doesn't actually declare intent, and the C++11 way is more expressive anyway, so this is pure win rdar://28960209 llvm-svn: 285216
* Don't set a software stepping breakpoint at 0 on arm or mips.Pavel Labath2016-10-262-6/+5
| | | | | | | | | | | | | | | | | | Summary: Check whether the setting the breakpoint failed during instruction emulation. If it did, the next pc is likely in unmapped memory, and the inferior will crash anyway after the next instruction. Do not return an error in this case, but just continue stepping. Reenabled the crash during step test for android/linux. Reviewers: labath Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D25926 Author: Jason Majors <jmajors@google.com> llvm-svn: 285187
* Enable the use of the new dyld SPI on the currentJason Molenda2016-10-261-5/+0
| | | | | | generation macosx/ios/tvos/watchos. llvm-svn: 285172
* 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-253-33/+62
| | | | | | | | commands the continue the process. This closes https://reviews.llvm.org/D25875. llvm-svn: 285114
* Fixing up the project file for the removal of LibStdcppSmartPointer.cpp.Jim Ingham2016-10-251-4/+0
| | | | llvm-svn: 285113
* Revert "Improve the libstdc++ smart pointer formatters"Pavel Labath2016-10-255-249/+108
| | | | | | | This reverts commit r284828, as it causes an infinite loop in TestPrintStackTraces (funnily enough, only when logging is enabled). llvm-svn: 285068
* remove xfail from TestObjCNewSyntax.py test_expr_gmodules()Todd Fiala2016-10-241-4/+0
| | | | | | | Fixes: rdar://27792848 llvm-svn: 285032
* Use shorter names in TestConcurrentEvents testsPavel Labath2016-10-2435-35/+35
| | | | | | | | | Otherwise, they tend to generate filename too long errors. They already contain the same test name in the directory, file, and class names, so no information is really lost here. llvm-svn: 284987
* Fix arm64 sub-register definitionsPavel Labath2016-10-241-221/+221
| | | | | | | | | | | The "value regs" field was filled incorrectly. It is supposed to list the registers that *this* register is a sub-register of, not the other way around. This manifested itself in "register read" showing only the smaller sub-registers (and a bunch of tests not passing). I am not sure if the "invalidates" field is correct either, but it's usage seems to be inconsistent, so I'll leave that as-is for now. llvm-svn: 284981
* Reformat RegisterInfos_arm64 into a table. NFCPavel Labath2016-10-241-1986/+184
| | | | llvm-svn: 284976
* Add the new arm64 sub-register definitions to NativeRegisterContextLinuxPavel Labath2016-10-243-3/+148
| | | | | | | | It's quite sad that we have to edit so many files just to add a register. I am going to investigate how to merge these definitions somehow, but for now this should at least get arm64 linux working again. llvm-svn: 284970
* Add some additional logging to Jason Molenda2016-10-211-5/+20
| | | | | | | | | DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress to debug corefiles that may not be correctly formed. <rdar://problem/28884846> llvm-svn: 284900
* [Test Suite] Allow overriding codesign identityChris Bieneman2016-10-214-2/+13
| | | | | | | | | | | | Summary: Not everyone names their code sign identity "lldb_codesign", so it is nice to allow this to be overridden. Reviewers: zturner, tfiala Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25714 llvm-svn: 284893
* [CMake] Fix standalone buildChris Bieneman2016-10-211-2/+4
| | | | | | not and FileCheck targets may not be defined in standalone builds. llvm-svn: 284854
* Add the new stdcpp formatters to the Xcode project.Jim Ingham2016-10-211-0/+12
| | | | llvm-svn: 284851
* I hadn't fixed all the instances of the old marker for scripted format ↵Enrico Granata2016-10-211-3/+3
| | | | | | strings; do so now llvm-svn: 284847
* Fix incorrect header order introduced in rL284830Tamas Berghammer2016-10-212-6/+6
| | | | llvm-svn: 284831
* Add data formatter for libstdc++ unique_ptrTamas Berghammer2016-10-217-0/+271
| | | | | | Differential revision: https://reviews.llvm.org/D25734 llvm-svn: 284830
* Add data formatter for libstdc++ tupleTamas Berghammer2016-10-217-0/+185
| | | | | | Differential revision: https://reviews.llvm.org/D25733 llvm-svn: 284829
* Improve the libstdc++ smart pointer formattersTamas Berghammer2016-10-215-108/+249
| | | | | | | | | | * Display the strong/weak count in the summary * Display the pointed object as a synthetic member * Create synthetic children for weak/strong count Differential revision: https://reviews.llvm.org/D25726 llvm-svn: 284828
* 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-213-54/+28
| | | | | | | | | | | | | | | | | 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
* Guard GetEscapedHostname against a nullptr hostname.Jason Molenda2016-10-211-0/+2
| | | | | | | | | This can happen if you debug an iOS corefile on a mac, where PlatformPOSIX::GetHostname ends up not providing a hostname because we're working with a platform of remote-ios. llvm-svn: 284799
* Fix a race condition between "ephemeral watchpoint disable/enable" and ↵Jim Ingham2016-10-213-28/+54
| | | | | | | | | | 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
* Add an API to remove an action from the Process PreResumeActions.Jim Ingham2016-10-202-0/+15
| | | | llvm-svn: 284792
* Remove an unnecessary and incorrect check for num locations of a breakpointJim Ingham2016-10-201-8/+0
| | | | | | | by grubbing the break list output. If you pass a number of locations into the run_break_* functions, they will check that this is right for you. llvm-svn: 284791
* frame.script became script.frame a while ago; fix up the docsEnrico Granata2016-10-201-4/+4
| | | | llvm-svn: 284788
* This debugging message has been left in the code for years, until one day it ↵Enrico Granata2016-10-201-2/+1
| | | | | | | | | | randomly hit on some corrupted memory It is misleading to users in its current form, and only interesting to me - remove it rdar://28812568 llvm-svn: 284787
* Re-landing a cleaned up implementation of r284550Chris Bieneman2016-10-201-18/+24
| | | | | | | | | | This time it should actually work. The previous implementaiton was not getting the linker or compiler flag set correctly in all the right situations. By moving the check down and basing it of whether or not CXX is set I we can have the logic to add the flags exist only once for the linker and once for the compiler instead of duplicating it. llvm-svn: 284756
* Minidump plugin: redesign the x86_64 register contextDimitar Vlahovski2016-10-202-154/+173
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I misunderstood the format of the register context layout. I thought it was a dynamically changing structure, and that it's size depended on context_flags. It turned out that it always has the same fixed layout and size, and the context_flags says which fields of the struct have valid values. This required a minor redesign of the register context class. The layout inconsistency, however, was not a "problem" before (e.g. the plugin was working) because there also was a bug with checking context_flags - the code was parsing the entire struct regardless of context_flags. This bug is also fixed in this commit. Reviewers: labath, zturner Subscribers: lldb-commits, amccarth Differential Revision: https://reviews.llvm.org/D25677 llvm-svn: 284741
* Re-generate the python and cpp reference documentationTamas Berghammer2016-10-201455-34659/+137054
| | | | | | | | They haven't been updated since July 2013 so they missed a lot of new function added to the SB API since. Bug: llvm.org/pr30603 llvm-svn: 284725
* Fix ARM/AArch64 Step-Over watchpoint issue remove provision for duplicate ↵Omair Javaid2016-10-205-105/+190
| | | | | | | | | | | 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
* Added a decorator for the macOS version and switched over testcases that ↵Sean Callanan2016-10-207-13/+17
| | | | | | used platform.release llvm-svn: 284674
* Add lldb register definitions for w0-w28, s0-s31, and d0-d31 toJason Molenda2016-10-194-70/+1573
| | | | | | | | | | | | | | | | | | | | | | | | RegisterInfos_arm64.h. These register definitions include the offset into the register context, which will vary depending on the endianness of the arm64 target system (e.g. s8 is at offset 0 in v8 on little-endian, it is at offset 12 on big-endian) and I've only added the little-endian definitions to the table. If we want to add a big-endian arm64 target, we'll need a separate table which uses the big-endian offsets for these registers. I changed the name of the register table from g_register_infos_arm64 to g_register_infos_arm64_le to make it explicit that this is the little-endian version of that table, and updated users of the table to use the new name. I added support for the "w", "s", and "d" registers to RegisterContextDarwin_arm64 but it was more an example than anything useful -- this plugin is only used when working with core files and darwin core files do not (today) include the floating point register context, so it only added the support for the "w" pseudo registers. When we're connected to a real arm64 device, we use the ProcessGDBRemote code. llvm-svn: 284666
OpenPOWER on IntegriCloud