summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up vestigial remnants of locking primitivesSaleem Abdulrasool2016-07-2834-1605/+404
| | | | | | | | | | | | | | | | This finally removes the use of the Mutex and Condition classes. This is an intricate patch as the Mutex and Condition classes were tied together. Furthermore, many places had slightly differing uses of time values. Convert timeout values to relative everywhere to permit the use of std::chrono::duration, which is required for the use of std::condition_variable's timeout. Adjust all Condition and related Mutex classes over to std::{,recursive_}mutex and std::condition_variable. This change primarily comes at the cost of breaking the TracingMutex which was based around the Mutex class. It would be possible to write a wrapper to provide similar functionality, but that is beyond the scope of this change. llvm-svn: 277011
* Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 ↵Luke Drummond2016-07-287-3/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backend Expression evaluation for function calls to certain public RenderScript API functions in libRSCPURef can segfault. `slang`, the compiler frontend for RenderScript embeds an ARM specific triple in IR that is shipped in the app, after generating IR that has some assumptions that an ARM device is the target. As the IR is then compiled on a device of unknown (at time the IR was generated at least) architecture, when calling RenderScript API function as part of debugger expressions, we have to perform a fixup pass that removes those assumptions right before the module is sent to be generated by the llvm backend. This issue is caused by multiple problems with the ARMv7-specific assumptions encoded in the LLVM IR. x86 large value returns use a hidden first argument (mapping to llvm::Attribute::StructRet), which can't be picked up by the JIT due to the mismatch between IR generated by the slang frontend and llvm backend. This means that code generated by bcc did not necessarily match the default SysV Linux/Android ABI used by the LLDB JIT - Original Authors: Luke Drummond (@ldrumm), Function declarations fixed by Aidan Dodds (@ADodds) Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D18059 llvm-svn: 276976
* Add some logging to the kernel dynamicloader plugin when we fail to readJason Molenda2016-07-281-0/+3
| | | | | | | a kext binary from memory. <rdar://problem/26158095> llvm-svn: 276954
* Fixed "void SBWatchpoint::SetEnabled (bool enabled)" to work properly and ↵Greg Clayton2016-07-272-6/+12
| | | | | | | | | added a test for it. https://llvm.org/bugs/show_bug.cgi?id=28729 <rdar://problem/27575225> llvm-svn: 276914
* Fix LLDBConfig.cmake to enable python enabled build for all 64 bit lldb targetsOmair Javaid2016-07-261-6/+0
| | | | | | Differential revision: https://reviews.llvm.org/D22771 llvm-svn: 276814
* The ARM single-step handling needs to look for breakpoint on the next ↵Jim Ingham2016-07-261-1/+2
| | | | | | | | instruction. <rdar://problem/27006685> llvm-svn: 276796
* Check both private & public states to decide if you need to halt before killing.Jim Ingham2016-07-261-1/+4
| | | | | | | | | | We were just checking the public state, but that meant if you were hung in a long running hand-called function, we wouldn't know to interrupt the process, and we would not succeed in killing it. <rdar://problem/24805082> llvm-svn: 276795
* reduce Green Dragon macOS build session filename lengthTodd Fiala2016-07-261-1/+1
| | | | | | | | | | | The Green Dragon builder for macOS started failing yesterday with session filenames that were too long. This change modifies the Xcode target that runs the test suite and specifies a shorter session filename format. rdar://27539818 llvm-svn: 276760
* Fix incorrect form test in SymbolFileDWARFPavel Labath2016-07-262-1/+2
| | | | | | | | | | | | | | | | | | Summary: We were checking whether an attribute is in block form by getting the block data pointer, which was not correct as the pointer be null even if the attribute is in block form. Other places in the file already use the correct test. To make this work, I've needed to add DW_FORM_exprlock to the list of "block" forms, which seems correct as that is how we are parsing it. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22756 llvm-svn: 276735
* Fix DataExtractor::PeekData for zero length peeksPavel Labath2016-07-262-4/+21
| | | | | | | | | | | | | | | | | | | | | | Summary: The function was returning the null pointer for peeks of size zero, which seems like a sensible thing to do, but is actually pretty easy to get bitten by that if you are extracting a variable length field which happens to be of zero length and then doing pointer arithmetic on that (which SymbolFileDWARF does, and ended up crashing in case of empty DW_AT_location). This changes the function to return a null pointer only when it gets queried for data which is outside of the range of the extractor, which is more c++-y, as one can still do reasonable things with pointers to data of size zero (think, end() iterators). I also add a test and fix some signedness warnings in the existing data extractor tests. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22755 llvm-svn: 276734
* Add support for an additional dictionary in the per-arch plistsJason Molenda2016-07-262-0/+113
| | | | | | | | | | | | | | | | | | | | | that may be embedded in the Contents/Resources subdir of a dSYM bundle. These allow for the specification of a build-time path to debug-time path remapping for source files. Files may be built in /BuildDirectory/sources/project-100 but when the debugger is run, they're actually found via ~sources/project-100 - this plist allows for that remapping through the DBGBuildSourcePath and DBGSourcePath keys. This patch adds support for a new DBGSourcePathRemapping dictionary in the plist where the keys are the build-time paths and the values are the debug-time paths that they should be remapped to. There are instances were we have multiple possible build-time paths that need to be included, so the dictionary was required. <rdar://problem/26725174> llvm-svn: 276729
* DynamicLoaderDarwinKernel will look in four addresses for the kernelJason Molenda2016-07-261-2/+3
| | | | | | | | load address on 64-bit devices; it only needs to look in three. <rdar://problem/27061405> llvm-svn: 276721
* Print a warning if the directory passed to --test-subdir doesn't end up existingEnrico Granata2016-07-251-0/+2
| | | | llvm-svn: 276709
* Remove some tab characters that snuck in to my mnost recent edits.Jason Molenda2016-07-222-14/+14
| | | | llvm-svn: 276485
* Breakup TestConcurrentEvents.py into separate test subdirs per test methodTodd Fiala2016-07-2272-526/+1339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change breaks up the monolithic TestConcurrentEvents.py into a separate subdir per test method. This allows them to run concurrently, reduces the chance of a timeout occurring during normal operation, and allows us to home in on any test methods that may be locking up. This is step one in the process of squashing timeouts in these test methods. The reason for breaking each test method into its own file is to make it very clear to us if there are a subset of the tests that do in fact lock up frequently. This will limit how much hunting we need to do to recreate it. The reason for putting each file in a separate subdirectory is so that our concurrent test runner can run multiple test files at the same time. The unit of serialization in the LLDB test suite is the test directory, so moving them into separate directories enables the test runner to do more at the same time. This change introduces usage of VPATH from gnu make. I use that to facilitate keeping a single copy of the main.cpp in the parent concurrent_events directory. Initially I had tried specifying the source file as ../main.cpp, but our current makefile rules get confused by that and then also build the output into the parent directory, which defeats the ability to run each of the test methods concurrently. In the event that not all systems support VPATH, I can do a bit of surgery on the Makefile rules and attempt to make it smarter with regards to relative paths to source files used in the build. llvm-svn: 276478
* Support loading files even when incorrect file name specified by the linkerTamas Berghammer2016-07-229-19/+118
| | | | | | | | | | | | | | | "Incorrect" file name seen on Android whene the main executable is called "app_process32" (or 64) but the linker specifies the package name (e.g. com.android.calculator2). Additionally it can be present in case of some linker bugs. This CL adds logic to try to fetch the correct file name from the proc file system based on the base address sepcified by the linker in case we are failed to load the module by name. Differential revision: http://reviews.llvm.org/D22219 llvm-svn: 276411
* Fixing layout of elf-core file related structuresPavel Labath2016-07-222-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The binary layout of prstatus and prpsinfo was wrong. Some of the member variables where not aligned properly and others where with a wrong type (e.g. the time related stuff in prstatus). I used the structs defined in bfd in binutils to see what the layout of the elf-core format in these section is. (https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/hosts/x86-64linux.h;h=4e420a1f2081dd3b51f5d6b7a8e4093580f5cdb5;hb=master) Note: those structures are only for x86 64 bit elf-core files This shouldn't have any impact on the functionality, because lldb actually uses only a few of the member variables of those structs and they are with a correct type and alignment. I found this while trying to add/fix the support for i386 core files (https://llvm.org/bugs/show_bug.cgi?id=26947) Reviewers: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22628 Author: Dimitar Vlahovski <dvlahovski@google.com> llvm-svn: 276406
* Fix a crash when an ELF section symbol have no nameTamas Berghammer2016-07-221-2/+4
| | | | llvm-svn: 276403
* Add support to get the shared cache information from the newJason Molenda2016-07-227-0/+110
| | | | | | | | | | | | | debugserver jGetSharedCacheInfo packet instead of reading the dyld internal data structures directly. This code is (currently) only used for ios native lldb's - I should really move this ObjectFileMachO::GetProcessSharedCacheUUID method somewhere else, it makes less and less sense being in the file reader. <rdar://problem/25251243> llvm-svn: 276369
* Stop printing double { characters on Dictionary StructuredData objectsJason Molenda2016-07-211-1/+1
| | | | | | | when Dumping, thanks to Devin to catching the edit mistake I made in r276079. llvm-svn: 276351
* Add check for non-null log instance in PlatformAndroid.Oleksiy Vyalov2016-07-211-1/+1
| | | | llvm-svn: 276303
* Unify process launching code on linuxPavel Labath2016-07-219-384/+265
| | | | | | | | | | | | | | | | | | | | | | | Summary: We've had two copies of code for launching processes: - one in NativeProcessLinux, used for launching debugged processes - one in ProcessLauncherAndroid, used on android for launching all other kinds of processes These have over time acquired support for various launch options, but neither supported all of them. I now replace them with a single implementation ProcessLauncherLinux, which supports all the options the individual versions supported and set it to be used to launch all processes on linux. This also works around the ETXTBSY issue on android when the process is started from the platform instance, as that used to go through the version which did not contain the workaround. Reviewers: tberghammer Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D22457 llvm-svn: 276288
* Add a new DynamicLoader plugin that uses SPI that are in developmentJason Molenda2016-07-2113-74/+970
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for the fall (northern hemisphere) 2016 Darwin platforms to learn about loaded images, instead of reading dyld internal data structures. These new SPI don't exist on older releases, and new packets are needed from debugserver to use them (those changes are already committed). I had to change the minimum deployment target for debugserver in the xcode project file to macOS 10.10 so that debugserver will use the [[NSProcessInfo processInfo] operatingSystemVersion] call in MachProcess::GetOSVersionNumbers to get the operarting system version # -- this API is only available in macOS 10.10 and newer ("OS X Yosemite", released Oct 2014). If we have many people building llvm.org lldb on older systems still, we can back off on this for the llvm.org sources. There should be no change in behavior with this commit, either to older darwin systems or newer darwin systems. For now the new DynamicLoader plugin is never activated - I'm forcing the old plugin to be used in DynamicLoaderDarwin::UseDYLDSPI. I'll remove that unconditional use of the old plugin soon, so the newer plugin is used on the newest Darwin platforms. <rdar://problem/25251243> llvm-svn: 276254
* Fix an issue where LLDB would detect an empty shared cache - which is ↵Enrico Granata2016-07-212-25/+43
| | | | | | | | | | legitimate albeit suboptimal - and warn about being unable to fetch ObjC class information, even though class data was actually properly loaded from the dynamic hashmap Only ever warn about missing ObjC runtime class data if one either can't run the expressions to obtain such data, or the total count of classes is below a threshold that makes things sound really suspicious Fixes rdar://27438500 llvm-svn: 276220
* Fix typo in test runnerFrancis Ricci2016-07-201-1/+1
| | | | llvm-svn: 276166
* If x/i is followed by x/g, the format should be reset to 'x'.Jim Ingham2016-07-201-4/+22
| | | | | | | | | Otherwise, you have to say "x/gx" to what you obviously intended to happen to happen. <rdar://problem/27415507> llvm-svn: 276132
* Add a default-value bool flag pretty_print to the StructuredData Dump methods.Jason Molenda2016-07-204-37/+63
| | | | | | | | | They will dump pretty-print (indentation, extra whitepsace) by default. I'll make a change to ProcessGDBRemote soon so it stops sending JSON strings to debugserver pretty-printed; it's unnecessary extra bytes being sent between the two. llvm-svn: 276079
* s/Cocoa/Foundation/Enrico Granata2016-07-192-2/+2
| | | | llvm-svn: 276065
* Fix an issue where the libc++ std::list formatter wasn't recognizing the new ↵Enrico Granata2016-07-191-2/+26
| | | | | | | | memory layout correctly rdar://problem/26999542 llvm-svn: 276061
* Don't check the value of the unset variables on iOSEnrico Granata2016-07-191-6/+5
| | | | llvm-svn: 276033
* Typo corrections identified by codespellEd Maste2016-07-1925-33/+33
| | | | | | | | | Submitted by giffunip@yahoo.com; I fixed a couple of nearby errors and incorrect changes in the patch. llvm.org/pr27634 llvm-svn: 275983
* Ignore clang-module-cache directories that may be createdJason Molenda2016-07-191-0/+2
| | | | | | in the testsuite directory while it runs. llvm-svn: 275944
* Add missing headers after header cleanup in r275882.Chaoren Lin2016-07-181-0/+2
| | | | llvm-svn: 275914
* make macOS 'launch in terminal' bring terminal to the front during launchTodd Fiala2016-07-181-0/+1
| | | | | | rdar://25235812 llvm-svn: 275885
* Revert "[test] Report error when inferior test processes exit with a ↵Pavel Labath2016-07-182-11/+19
| | | | | | | | | | | | non-zero code" This reverts r275782. The problem with the commit is that it reports an additional "exit (1)" error for every file containing a failing test, which is far more than I had intended to do. I'll need to come up with a more fine-grained way of achieving the result. llvm-svn: 275791
* [LLVM][MIPS] Revert support for FRE.Nitesh Jain2016-07-181-2/+4
| | | | | | | Reviewers: jaydeep Subscribers: bhushan, mohit.bhakkad, slthakur, llvm-commits llvm-svn: 275785
* [test] Report error when inferior test processes exit with a non-zero codePavel Labath2016-07-182-19/+11
| | | | | | | | | | | | | | | | | | | Summary: We've run into this problem when the test errored out so early (because it could not connect to the remote device), that the code in D20193 did not catch the error. This resulted in the test suite reporting success with 0 tests being run. This patch makes sure that any non-zero exit code from the inferior process gets reported as an error. Basically I expand the concept of "exceptional exits", which was previously being used for signals to cover these cases as well. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22404 llvm-svn: 275782
* Implement GetMemoryRegions() for Windows Minidumps and live processes.Howard Hellyer2016-07-182-14/+80
| | | | | | | | | | | | | | | | | Summary: This patch fills in the implementation of GetMemoryRegions() on the Windows live process and minidump implementations of lldb_private::Process (ProcessWindowsLive::GetMemoryRegionInfo and ProcessWinMiniDump::Impl::GetMemoryRegionInfo.) The GetMemoryRegions API was added under: http://reviews.llvm.org/D20565 The existing Windows implementations didn’t fill in the start and end addresses within MemoryRegionInfo. This patch fixes that and adds support for the new mapped flag on MemoryRegionInfo that says whether a memory range is mapped into the process address space or not. The behaviour of both live and core implementations should match the behaviour documented on Process::GetMemoryRegionInfo (in Process.h) which in turn should match the behaviour of the qMemoryRegionInfo query documented in lldb-gdb-remote.txt. Reviewers: clayborg, amccarth Subscribers: amccarth, lldb-commits Differential Revision: https://reviews.llvm.org/D22352 llvm-svn: 275778
* Refactor (with some rewriting) the DynamicLoaderMacOSX plugin intoJason Molenda2016-07-177-1270/+1537
| | | | | | | | | | | | | | | | | | | | | | | a base class and a derived class, with the derived class containing the methods specific to reading dyld's all_image_infos, dyld's method of specifying images that have been loaded or unloaded, the place where we put a breakpoint in dyld to get notified about newly loaded or unloaded images. This is in preparation for a second derived class which will use some alternate methods for getting this information; that will be a separate commit in the next few days. There's a couple of ivars that should probably be in the derived DyanmicLoaderMacOSX class instead of the base DynamicLoaderDarwin class (m_dyld_image_infos, m_dyld_image_infos_stop_id). I don't think I'll need to use these in the new derived class - I'll move them down to DynamicLoaderMacOSX if it works out that way; it'll simplify locking if I can do that. <rdar://problem/25251243> llvm-svn: 275733
* Initialize the "is_loaded" local in LoadModuleAtAddress inJason Molenda2016-07-171-1/+1
| | | | | | | case Process::GetFileLoadAddress fails to set it to a real value. (fixing "conditional use of garbage value" clang warning) llvm-svn: 275731
* Add missing break stmt to DW_CFA_GNU_args_size case.Jason Molenda2016-07-171-0/+1
| | | | llvm-svn: 275729
* Fixed the location of the Swift bindings in the Xcode build.Sean Callanan2016-07-161-1/+1
| | | | | | | | $BUILT_PRODUCTS_DIR is usually the same as $CONFIGURATION_BUILD_DIR, but differs when LLDB is being built BuildAndIntegration, in which case $BUILT_PRODUCTS_DIR is more accurate. llvm-svn: 275652
* Fixes for standalone build:Eugene Zelenko2016-07-151-0/+2
| | | | | | | | | * include CheckAtomic to set HAVE_CXX_ATOMICS64_WITHOUT_LIB properly (introduced in r274121) * hint Clang CMake files for LLVM CMake files location (inctroduced in ~ r274176) Differential revision: https://reviews.llvm.org/D22322 llvm-svn: 275641
* Fix TestDarwinNSLogOutput for windowsPavel Labath2016-07-151-1/+1
| | | | | | pexpect python package does not exist on windows llvm-svn: 275555
* [NPL] Simplify process launch codePavel Labath2016-07-152-180/+75
| | | | | | | | | | | | | | Summary: This removes one level of indirection, which was just packing and repacking launch args into different structures. NFC. Reviewers: tberghammer Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D22357 llvm-svn: 275544
* Remember to add the testcase I wrote for r274822.Jim Ingham2016-07-153-0/+102
| | | | llvm-svn: 275519
* adjust one of the NSLog output tests to only run on macOS 10.12+Todd Fiala2016-07-151-0/+7
| | | | | | | | The LLDB NSLog handling when Xcode intends to suppress NSLog output only works on Fall 2016 OS releases. Skip it on earlier OSes. llvm-svn: 275506
* LLDB help content has accumulated over time without a recent attempt toKate Stone2016-07-1441-931/+687
| | | | | | | | | review it for consistency, accuracy, and clarity. These changes attempt to address all of the above while keeping the text relatively terse. <rdar://problem/24868841> llvm-svn: 275485
* Editing multi-line content in a terminal environment involves a lot ofKate Stone2016-07-142-41/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trade-offs. When LLDB's multi-line editing support was first introduced for expressions / REPL contexts the behavior was as follows: * The Return key is treated as a line-break except at the end of the input buffer, where a completeness test is applied This worked well enough when writing code, and makes it trivial to insert new lines above code you've already typed. Just use cursor navigation to move up and type freely. Where it was awkward is that the gesture to insert a line break and end editing is conflated for most people. Sometimes you want Return to end the editing session and other times you want to insert a line break. This commit changes the behavior as follows: * The Return key is treated as the end of editing except at the end of the input buffer, where a completeness test is applied * The Meta+Return sequence is always treated as a line break. This is consistent with conventions in Facebook and elsewhere since Alt/Option+Return is often mapped to Meta+Return. The unfortunate exception is on macOS where this *can* be the case, but isn't by default. Sigh. Note that by design both before and after the patch pasting a Return character always introduces a line break. <rdar://problem/26886287> llvm-svn: 275482
* removed darwin_log.py file from previous check-inTodd Fiala2016-07-141-139/+0
| | | | | | This file was not intended to be part of the last check-in. llvm-svn: 275478
OpenPOWER on IntegriCloud