summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Process::StopForDetachOrDestroy should actually return an error if it can't ↵Jim Ingham2016-06-281-1/+1
| | | | | | | | | | stop the process. <rdar://problem/26990309> llvm-svn: 274032
* fixits are apparently called fix-its.Jim Ingham2016-06-284-6/+6
| | | | | | <rdar://problem/26998596> llvm-svn: 273979
* Fixup the "shadow" example command to use the function that takes an ↵Greg Clayton2016-06-281-28/+26
| | | | | | | | | | | execution context now that the @lldb.command decorator does the right thing for the command function that takes 5 arguments. A few fixes: - Check the process state to make sure it is stopped - Grab the frame from the "exe_ctx" so this will work during breakpoint callbacks - Print out the SBDeclaration objects of the variables that shadow each other so we can see the source locations of which variable declarations are shodowing each other. llvm-svn: 273963
* fix invalid assumption about the executable module in Target::Install()Todd Fiala2016-06-272-1/+2
| | | | | | | | | | | | | | | Target::Install() was assuming the module at index 0 was the executable. This is often true, but not guaranteed to be the case. The TestInferiorChanged.py test highlighted this when run against iOS. After the binary is replaced in the middle of the test, it becomes the last module in the list. The rest of the Target::Install() logic then clobbers the executable file by using whatever happens to be the first module in the target module list. This change also marks the TestInferiorChanged.py test as a no-debug-info test. llvm-svn: 273960
* Change PlatformDarwinKernel::GetSharedModule to be a little moreJason Molenda2016-06-271-3/+16
| | | | | | | | | | | | explicit in how it adds the kernel binary, to guard against the case where a kernel corefile might incorrectly include the kernel's UUID in it (so calling ::GetSharedModule may end up returning the global module cache's copy of the core file instead of adding the kerenl binary). <rdar://problem/26988816> llvm-svn: 273954
* Improve watchpoint error reporting specially for arm/aarch64 targetsOmair Javaid2016-06-273-13/+13
| | | | | | Differential revision: http://reviews.llvm.org/D21164 llvm-svn: 273869
* Allow unaligned byte/word selection watchpoints for arm- linux/android targets.Omair Javaid2016-06-273-3/+45
| | | | | | Differential revision: http://reviews.llvm.org/D21516 llvm-svn: 273863
* Made templates that have Enumeration values as arguments work correctly.Greg Clayton2016-06-2420-44/+158
| | | | | | | | | | We were checking for integer types only before this. So I added the ability for CompilerType objects to check for integer and enum types. Then I searched for places that were using the CompilerType::IsIntegerType(...) function. Many of these places also wanted to be checking for enumeration types as well, so I have fixed those places. These are in the ABI plug-ins where we are figuring out which arguments would go in where in regisers/stack when making a function call, or determining where the return value would live. The real fix for this is to use clang to compiler a CGFunctionInfo and then modify the code to be able to take the IR and a calling convention and have the backend answer the questions correctly for us so we don't need to create a really bad copy of the ABI in each plug-in, but that is beyond the scope of this bug fix. Also added a test case to ensure this doesn't regress in the future. llvm-svn: 273750
* Add .i files for SBMemoryRegionInfo and SBMemoryRegionInfoList and also hook ↵Greg Clayton2016-06-246-0/+131
| | | | | | | | up the new calls in SBProcess that give out SBMemoryRegionInfo and SBMemoryRegionInfoList objects. Also make sure the right headers and .i files are included so SWIG can hook everything up. llvm-svn: 273749
* The Objective-C Class type should not be treated as a potential dynamic ↵Enrico Granata2016-06-241-0/+8
| | | | | | | | type, since it actually doesn't resolve to the type of the class it points to Fixes rdar://26535584 llvm-svn: 273721
* Don't run TestImageListMultiArchitecture during remote test suiteFrancis Ricci2016-06-241-0/+1
| | | | | | | | | | Reviewers: zturner, clayborg, tfiala Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D21648 llvm-svn: 273720
* Added a test case for bitfield ivars. It currently fails.Sean Callanan2016-06-242-0/+56
| | | | | | <rdar://problem/17990991> llvm-svn: 273718
* Fix an issue where LLDB would show the key and value of a single entry ↵Enrico Granata2016-06-244-2/+84
| | | | | | | | NSDictionary in the wrong order Fixes rdar://26478641 llvm-svn: 273695
* Silence a -Wc++11-narrowing warningDavid Majnemer2016-06-241-1/+1
| | | | llvm-svn: 273649
* Update LLDB for r273647David Majnemer2016-06-241-4/+2
| | | | llvm-svn: 273648
* Fix an issue where the @lldb.command marker would not work with the new ↵Enrico Granata2016-06-244-6/+36
| | | | | | | | | | | 5-argument version of the Python command function This: a) teaches PythonCallable to look inside a callable object b) teaches PythonCallable to discover whether a callable method is bound c) teaches lldb.command to dispatch to either the older 4 argument version or the newer 5 argument version llvm-svn: 273640
* Handle variadic Objective-C methods from DWARF correctly.Sean Callanan2016-06-245-4/+41
| | | | | | <rdar://problem/22039804> llvm-svn: 273632
* Don't run the top-level expression test case with -gmodules.Sean Callanan2016-06-231-1/+1
| | | | | | <rdar://problem/26563587> llvm-svn: 273622
* Added a new python example which installs a command called "shadow". Greg Clayton2016-06-231-0/+59
| | | | | | This shows how to grab individual blocks from stack frames and get only the variables from those blocks. It then will iterate over all of the parent blocks and look for shadowed variables. llvm-svn: 273604
* fix Xcode build for r273547Todd Fiala2016-06-231-0/+8
| | | | llvm-svn: 273582
* Add MemoryRegionInfo to SB APIHoward Hellyer2016-06-2313-0/+587
| | | | | | | | | | | | | | | | | | | Summary: This adds new SB API calls and classes to allow a user of the SB API to obtain a full list of memory regions accessible within the process. Adding this to the API makes it possible use the API for tasks like scanning memory for blocks allocated with a header and footer to track down memory leaks, otherwise just inspecting every address is impractical especially for 64 bit processes. These changes only add the API itself and a base implementation of GetMemoryRegions() to lldb_private::Process::GetMemoryRegions. I will submit separate patches to fill in lldb_private::Process::GetMemoryRegionInfoList and GetMemoryRegionInfo for individual platforms. The original discussion about this is here: http://lists.llvm.org/pipermail/lldb-dev/2016-May/010203.html Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20565 llvm-svn: 273547
* Test commit to verify access, fix typo.Howard Hellyer2016-06-231-1/+1
| | | | llvm-svn: 273546
* [LLDB][MIPS] Fix Emulation of Compact branch and ADDIU instructionsSagar Thakur2016-06-232-32/+33
| | | | | | | | | | | | | | Patch by Nitesh Jain. This patch contains 2 changes: - Corrected target address calculation of compact branch instructions to reflect changes in disassembler (http://reviews.llvm.org/D17540). - Added emulation for (missing) 'Addiu' instruction. Reviewers :jaydeep, bhushan, clayborg Differential: http://reviews.llvm.org/D21064 llvm-svn: 273535
* Revert r273524, it may have been the cause of a linux testbot failureJason Molenda2016-06-2321-32/+32
| | | | | | | | for TestNamespaceLookup.py; didn't see anything obviously wrong so I'll need to look at this more closely before re-committing. (passed OK on macOS ;) llvm-svn: 273531
* Do some minor renames of "Mac OS X" to "macOS".Jason Molenda2016-06-2321-32/+32
| | | | | | | | | There's uses of "macosx" that will be more tricky to change, like in triples (e.g. "x86_64-apple-macosx10.11") - for now I'm just updating source comments and strings printed for humans. llvm-svn: 273524
* Don't omit `this' from expression args if it couldn't be read, but warn loudly.Sean Callanan2016-06-221-5/+4
| | | | | | <rdar://problem/26935520> llvm-svn: 273445
* add code coverage support to Xcode buildTodd Fiala2016-06-211-3/+31
| | | | | | | | | | | | | | This change adds a new Xcode variable, LLDB_ENABLE_COVERAGE. If set to 1, then the Xcode build will produce a clang coverage-style build of LLDB. This can be done with a commandline invocation such as: xcodebuild -scheme desktop -configuration Debug build LLDB_ENABLE_COVERAGE=1 Alternatively, the variable can be locally modified from within Xcode and built with the Xcode IDE. llvm-svn: 273332
* Fix the use of lldb::eSymbolContextVariable.Greg Clayton2016-06-212-2/+3
| | | | | | | | | | In Address.cpp, we were asking for the lldb::eSymbolContextVariable to be resolved, yet we weren't using the variable. This code gets called when disassembling and can cause the manual creation of all global variables variables which can take minutes. Removing eSymbolContextVariable allows disassembly to not create these long pauses. In Module.cpp, if someone only specified the lldb::eSymbolContextVariable flag, we would not look into a module's debug info, now we will. <rdar://problem/26907449> llvm-svn: 273307
* Fix the "Release" build on MacOSX for debugserver. Extra bad include paths ↵Greg Clayton2016-06-211-1/+0
| | | | | | were making things not build due to header file issues with stdio.h. llvm-svn: 273306
* Change the "debugserver-mini" target (a version of debugserverJason Molenda2016-06-213-22/+54
| | | | | | | | | | | | | | | | | | which doesn't like against all the extra UI frameworks on ios) so it now generates a binary called "debugserver-nonui" and puts it in /usr/local/bin instead of /Developer/usr/bin. Add some cruft to RNBDefs.h to get the version number (provided by Xcode at build time) with either the name "debugserver" or "debugserver_nonui" as appropriate. Add the "debugserver-mini" target to the top level "ios" target in lldb xcode project file, so this nonui debugserver will be built along with the normal lldb / debugserver. <rdar://problem/24730789> llvm-svn: 273236
* Fix typo in eOpenOptionDontFollowSymlinksFrancis Ricci2016-06-213-3/+3
| | | | | | | | | | | | Summary: Fix capitalization Reviewers: labath, sas, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D21422 llvm-svn: 273225
* Test that lldb calls the right 'printf' even when a 'printf' method exists.Sean Callanan2016-06-202-0/+25
| | | | | | This test is currently failing. We have a bug for it, as noted. llvm-svn: 273211
* Allow installing watchpoints at less than 8-byte alligned addresses for ↵Omair Javaid2016-06-166-4/+232
| | | | | | | | | | | | AArch64 targets This patch allows LLDB for AArch64 to watch all bytes, words or double words individually on non 8-byte alligned addresses. This patch also adds tests to verify this functionality. Differential revision: http://reviews.llvm.org/D21280 llvm-svn: 272916
* xfail TestWithModuleDebugging.py on macOSTodd Fiala2016-06-161-0/+1
| | | | | | | Tracked by: https://llvm.org/bugs/show_bug.cgi?id=28156 llvm-svn: 272902
* Set TERM env var for Xcode gtestsTodd Fiala2016-06-151-1/+1
| | | | | | | | | | | | Not sure what changed, but something outside our code is failing one of the EditLine gtests on OS X CI (and locally) before the gtest ever gets to run. This fails the first EditLine gtest. This change exports the TERM as "vt100" before running the lldb-gtest binary, fixing the issue. llvm-svn: 272844
* Allow runtimes to execute custom LLVM ModulePasses over the expression IRLuke Drummond2016-06-153-1/+58
| | | | | | | | | | | | | | | | During expression evaluation, the ClangExpressionParser preforms a number of hard-coded fixups on the expression's IR before the module is assembled and dispatched to be run in a ThreadPlan. This patch allows the runtimes to register LLVM passes to be run over the generated IR, that they may perform language or architecture-specfic fixups or analyses over the generated expression. This makes expression evaluation for plugins more flexible and allows language-specific fixes to reside in their own module, rather than littering the expression evaluator itself with language-specific fixes. llvm-svn: 272800
* Add results.xml for macOS lldb unittestsTim Hammerquist2016-06-151-1/+1
| | | | | | | | | | | | | http://reviews.llvm.org/D21211 If gtest tests of lldb fail, there are no test results for Jenkins to consume. This will make the results of the gtest failure available to Jenkins. This is to address the failure visible in: http://lab.llvm.org:8080/green/job/lldb_build_test/19196/ llvm-svn: 272751
* Remove Platform usages from NativeProcessLinuxPavel Labath2016-06-142-145/+33
| | | | | | | | | | | | | | | | Summary: This removes the last usage of the Platform plugin in NPL. It was being used for determining the architecture of the debugged process. I replace the call that went through the Platform plugin with a lower level call on the ObjectFile directly. Reviewers: tberghammer Subscribers: uweigand, nitesh.jain, omjavaid, lldb-commits Differential Revision: http://reviews.llvm.org/D21324 llvm-svn: 272686
* [lldb] Fixed race conditions on private state thread exitCameron Desrochers2016-06-142-28/+34
| | | | | | | | | | This patch fixes various races between the time the private state thread is signaled to exit and the time it actually exits (during which it no longer responds to events). Previously, this was consistently causing 2-second timeout delays on process detach/stop for us. This also prevents crashes that were caused by the thread controlling its own owning pointer while the controller was using it (copying the thread wrapper is not enough to mitigate this, since the internal thread object was getting reset anyway). Again, we were seeing this consistently. Differential Revision: http://reviews.llvm.org/D21296 llvm-svn: 272682
* Add support to PlatformRemoteiOS, PlatformRemoteAppleWatch, andJason Molenda2016-06-143-0/+210
| | | | | | | | | | | | | | | | | | | | PlatformRemoteAppleTV to check the target.exec-search-paths directories for files after looking in the SDK. An additional wrinkle is that the remote file path may be something like ".../UIFoundation.framework/UIFoundation" and in target.exec-search-paths we will have "UIFoundation.framework". Looking for just the filename of the path is not sufficient - we need to also look for it by the parent directories because this may be a darwin bundle/framework like the UIFoundation example. We really need to make a PlatformRemoteAppleDevice and have PlatformRemoteiOS, PlatformRemoteAppleWatch, and PlatformRemoteAppleTV inherit from it. These three classes are 98% identical code. <rdar://problem/25976619> llvm-svn: 272635
* Add missing #include for linux.Greg Clayton2016-06-101-0/+1
| | | | | | <rdar://problem/25501013> llvm-svn: 272445
* On MacOSX, the threads can appear out of order at times depending on the ↵Greg Clayton2016-06-103-2/+24
| | | | | | | | order in which the kernel returns thread IDs to debugserver. To avoid thread lists changing order between stops, ProcessGDBRemote now makes sure the thread list stays sorted by thread index ID. <rdar://problem/25501013> llvm-svn: 272444
* Fixed C++ template integer parameter types to work correctly when the ↵Greg Clayton2016-06-104-1/+95
| | | | | | | | | | | | integer type is signed. Prior to this we would display the typename for "TestObj<-1>" as "TestObj<4294967295>" when we showed the type. Expression parsing could also fail because we would fail to find the mangled name when evaluating expressions. The issue was we were losing the signed'ness of the template integer parameter in DWARFASTParserClang.cpp. <rdar://problem/25577041> llvm-svn: 272434
* Fixed a few places that were building a regex from an identifier without ↵Greg Clayton2016-06-102-2/+2
| | | | | | | | escaping the identifier text. <rdar://problem/26090553> llvm-svn: 272423
* SBThread also had some places where it got the ExecutionContext w/o Jim Ingham2016-06-101-9/+27
| | | | | | taking the API lock. llvm-svn: 272407
* Make all the SBFrame API's take the target lock.Jim Ingham2016-06-101-14/+43
| | | | | | | | | | For some reason, the conversion to taking the target lock when acquiring the ExecutionContext was only done for some of the functions here. That was allowing lock inversion in some complex uses. <rdar://problem/26705635> llvm-svn: 272354
* Fix "frame variable" to show all variables defined in functions and any ↵Greg Clayton2016-06-091-5/+6
| | | | | | | | | | | | | | | | | | | | contained lexical blocks, even if they are static variables. For code like: int g_global = 234; int g_static = 345; int main(int argc, char **argv) { int a = 22333; static int g_int = 123; return g_global + g_static + g_int + a; } If we stop at the "return" statement, we expect to see "argc", "argv", "a" and "g_int" when we type "frame variable" since "g_int" is a locally defined static variable, but we don't expect to see "g_global" or "g_static" unless we add the -g option to "frame variable". llvm-svn: 272348
* Enable some tests on linuxPavel Labath2016-06-097-9/+5
| | | | | | | | | This enables a couple of tests which have been shown to run reliably on the linux x86 buildbot. If you see a failure after this commit, feel free to add the xfail back, but please make it as specific as possible (i.e., try to make it not cover i386/x86_64 with clang-3.5, clang-3.9 or gcc-4.9). llvm-svn: 272326
* Fixed an issue in the ProcessMachCore where segments are not always ↵Greg Clayton2016-06-091-13/+42
| | | | | | | | | | | | | | | | | | | | | | contiguous in mach-o core files. We have core files that have segments like: Address Size File off File size ---------- ---------- ---------- ---------- LC_SEGMENT 0x000f6000 0x00001000 0x1d509ee8 0x00001000 --- --- 0 0x00000000 __TEXT LC_SEGMENT 0x0f600000 0x00100000 0x1d50aee8 0x00100000 --- --- 0 0x00000000 __TEXT LC_SEGMENT 0x000f7000 0x00001000 0x1d60aee8 0x00001000 --- --- 0 0x00000000 __TEXT Any if the user executes the following command: (lldb) mem read 0xf6ff0 We would attempt to read 32 bytes from 0xf6ff0 but would only get 16 unless we loop through consecutive memory ranges that are contiguous in the address space, but not in the file data. This fixes the ProcessMachCore::DoReadMemory() to do the right thing. <rdar://problem/19729287> llvm-svn: 272322
* Fixed a problem in IRMemoryMap where the flag to zero out memory was ignored.Sean Callanan2016-06-091-0/+7
| | | | llvm-svn: 272320
OpenPOWER on IntegriCloud