summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* 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
* fix command-line LLDB so NSLog messages show upTodd Fiala2016-07-148-0/+390
| | | | | | | | | | | Changes to the underlying logging infrastructure in Fall 2016 Darwin OSes were no longer showing up NSLog messages in command-line LLDB. This change restores that functionality, and adds test cases to verify the new behavior. rdar://26732492 llvm-svn: 275472
* Add support for Objective-C class properties.Greg Clayton2016-07-143-7/+43
| | | | | | | | Added test cases to exiting tests to cover the new functionality. <rdar://problem/24311282> llvm-svn: 275459
* Upgrade all the .arcconfigs to https.Benjamin Kramer2016-07-141-1/+1
| | | | llvm-svn: 275409
* mark newly failing tests as XFAILPavel Labath2016-07-142-2/+6
| | | | llvm-svn: 275394
* [test] [linux] define PR_SET_PTRACER constants if the system does not ↵Pavel Labath2016-07-141-3/+8
| | | | | | | | | | provide them Android API <= 16 header do not have these symbols defined, but the kernel does support the relevant calls. And in general, since these calls are on a best-effort basis, it won't hurt even if we try to run in on a really ancient kernel. llvm-svn: 275393
* Fix -break-enable/-break-disable commands (MI)Ilia K2016-07-142-23/+48
| | | | | | | | | | | | | * Previously -break-enable mistakenly set BP's enabled flag to false. * These commands print fake =breakpoint-modified messages, what's not needed anymore because that events are come in normal way. * Add tests for -break-enable/-break-disable commands Initial patch from xuefangliang@hotmail.com. The test case was improved by me. Differential Revision: http://reviews.llvm.org/D21757 llvm-svn: 275381
* Added test for setting breakpoints by basename and fullname.Greg Clayton2016-07-131-0/+67
| | | | | | <rdar://problem/24599697> llvm-svn: 275336
* Fix a check in the objc trampoline handlerStephane Sezer2016-07-131-1/+1
| | | | | | | | | | | | | | | | Summary: The function FunctionCaller::WriteFunctionArguments returns false on errors, so they should check for the false return value. Change by Walter Erquinigo <a20012251@gmail.com> Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22278 llvm-svn: 275287
* Remove comment that isn't needed anymore.Greg Clayton2016-07-131-47/+0
| | | | | | <rdar://problem/24599697> llvm-svn: 275285
* Centralize the way symbol and functions are looked up by making a ↵Greg Clayton2016-07-135-273/+311
| | | | | | | | | | | | | | Module::LookupInfo class that does all of the heavy lifting. Background: symbols and functions can be looked up by full mangled name and by basename. SymbolFile and ObjectFile are expected to be able to do the lookups based on full mangled name or by basename, so when the user types something that is incomplete, we must be able to look it up efficiently. For example the user types "a::b::c" as a symbol to set a breakpoint on, we will break this down into a 'lookup "c"' and then weed out N matches down to just the ones that match "a::b::c". Previously this was done manaully in many functions by calling Module::PrepareForFunctionNameLookup(...) and then doing the lookup and manually pruning the results down afterward with duplicated code. Now all places use Module::LookupInfo to do the work in one place. This allowed me to fix the name lookups to look for "func" with eFunctionNameTypeFull as the "name_type_mask", and correctly weed the results: "func", "func()", "func(int)", "a::func()", "b::func()", and "a::b::func()" down to just "func", "func()", "func(int)". Previously we would have set 6 breakpoints, now we correctly set just 3. This also extends to the expression parser when it looks up names for functions it needs to not get multiple results so we can call the correct function. <rdar://problem/24599697> llvm-svn: 275281
* Add "support" for DW_CFA_GNU_args_size to the unwinderPavel Labath2016-07-131-0/+20
| | | | | | | | | | | | | | | | | | | Summary: This adds the knowledge of the DW_CFA_GNU_args_size instruction to the eh_frame parsing code. Right now it is ignored as I am unsure how is it supposed to be handled, but now we are at least able to parse the rest of the FDE containing this instruction. I also add a fix for a bug which was exposed by this instruction. Namely, a mismatched sequence of remember/restore instructions in the input could cause us to pop an empty stack and crash. Now we just log the error and ignore the offending instruction. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22266 llvm-svn: 275260
* Revert r275223, which committed the wrong thing.Sean Callanan2016-07-121-3/+0
| | | | llvm-svn: 275237
* Remove assert since it was crashing the mutli process driver tests. Made the ↵Greg Clayton2016-07-121-5/+16
| | | | | | code behave correctly when indexes are out of range or the collection is empty and is "log enable lldb unwind" is enabled, log an error message. llvm-svn: 275226
* This doesn't compiler on Darwin. Skipping it.Greg Clayton2016-07-121-0/+1
| | | | llvm-svn: 275225
* Mark TagDecls as having external visible storage, like ContainerDecls.Sean Callanan2016-07-121-0/+3
| | | | | | | | | The lookup tables can get out of date during the lifetime of the object so we need to preserve LLDB's ability to answer questions about TagDecls' contents. <rdar://problem/20751935> llvm-svn: 275223
* Tweaks to the NSIndexPath formatter to enhance stabilityEnrico Granata2016-07-121-89/+118
| | | | | | rdar://problem/25767901 llvm-svn: 275199
* Add logging to Linux Host::GetProcessAndStatInfo.Oleksiy Vyalov2016-07-121-4/+16
| | | | llvm-svn: 275198
* Increase "process load" timeoutPavel Labath2016-07-121-0/+1
| | | | | | | | | | Loading a dynamic library can take quite a long time, since it triggers a number of shared-library-event stops for dependent libraries. This is especially true for remote targets due to communication latency. Increase the default 500ms timeout to account for that. Committing as obvious. llvm-svn: 275185
* [NPL] Increase ETXTBSY workaround sleepPavel Labath2016-07-121-1/+1
| | | | | | 10ms does not seem to be enough all the time, go to 50. llvm-svn: 275175
* [test] Fix category-based skippingPavel Labath2016-07-121-2/+0
| | | | | | | | | | | | | | | Summary: LLDBTestResult.hardMarkAsSkipped marked the whole class as skipped when the first class in the test failed the category check. This meant that subsequent tests in the same class did not run even if they were passing the category filter. Fix that. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22213 llvm-svn: 275173
* Fix a race on process exitPavel Labath2016-07-121-8/+0
| | | | | | | | | | | | | | | | | | | | | Summary: Process::SetExitStatus was popping the process io handler and resetting m_process_input_reader shared pointer, which is not a safe thing to do as the function is called asynchronously and other threads may be accessing the member variable. (E.g. if the process terminates really quickly, the private state thread might only be in the process of pushing the handler on the stack. Sometimes, this leads to deadlock, as the shared pointer's state gets corrupted by the concurrent access. Since the IOHandler will be popped anyway in Process:HandleProcessStateChangedEvent when the exited event gets processed, doing the same in SetExitStatus seems to be unnecessary. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22209 llvm-svn: 275165
* Dwarf parser: don't lookup void typedefs in the DWOPavel Labath2016-07-121-1/+1
| | | | | | | | | | | | | | Summary: void typedefs do not have a DW_AT_type attribute, so we end up with an empty encoding_uid variable. These don't need to be looked up and trying to look that will assert in a debug build. Reviewers: clayborg Subscribers: lldb-commits, tberghammer Differential Revision: http://reviews.llvm.org/D22218 llvm-svn: 275164
* Add some safety checks to Platform::GetRemoteSharedModule so if itJason Molenda2016-07-121-2/+18
| | | | | | | | | is passed a ModuleSpec with a UUID, it won't accept a file it finds with a matching FileSpec & ArchSpec, but with a different UUID. <rdar://problem/27258864> llvm-svn: 275151
* Add LLVM build config for BuildAndIntegration.Stephane Sezer2016-07-121-0/+4
| | | | | | | | | | Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22234 llvm-svn: 275140
* Make ThreadPlanStepInstruction's constructor public.Stephane Sezer2016-07-121-5/+6
| | | | | | | | | | | | | | | | Summary: Some thread plans have public contructors, some others have protected constructors with friend classes. Not sure how these were determined, but this thread plan is going to be required to implement trampoline step-through on Windows. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22230 llvm-svn: 275139
* Apply local patches when building llvm on Mac.Stephane Sezer2016-07-121-0/+8
| | | | | | | | | | | | | | | Summary: This is already done when building for linux with the CMake build system. This functionality disappeared recently when some of the build scripts used by the xcode build system changed. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22233 llvm-svn: 275134
* Fixed a threading race condition where we could crash after calling ↵Greg Clayton2016-07-111-2/+0
| | | | | | | | | | | | | | | | Debugger::Terminate(). The issue was we have two global variables: one that contains a DebuggerList pointer and one that contains a std::mutex pointer. These get initialized in Debugger::Initialize(), and everywhere that uses these does: if (g_debugger_list_ptr && g_debugger_list_mutex_ptr) { std::lock_guard<std::recursive_mutex> guard(*g_debugger_list_mutex_ptr); // do work while mutex is locked } Debugger::Terminate() was deleting and nulling out g_debugger_list_ptr which meant we had a race condition where someone might do the if statement and it evaluates to true, then another thread calls Debugger::Terminate() and deletes and nulls out g_debugger_list_ptr while holding the mutex, and another thread then locks the mutex and tries to use g_debugger_list_ptr. The fix is to just not delete and null out the g_debugger_list_ptr variable. llvm-svn: 275119
* Fix an issue where one could not define a Python command with the same name ↵Enrico Granata2016-07-114-2/+56
| | | | | | as an existing alias (or rather, one could but the results of invoking the command were far from satisfactory) llvm-svn: 275080
* Change the /proc/<pid>/maps to not assert on incorrect inputTamas Berghammer2016-07-111-12/+9
| | | | | | | | | | If LLDB reads some incorrect input form /proc/<pid>/maps then it should report an error instead of assert-ing as we don't want to crash in case of an incorrect maps file. Differential revision: http://reviews.llvm.org/D22211 llvm-svn: 275060
* When calling "settings set target.source-map <old-path> <new-path>", make ↵Greg Clayton2016-07-082-14/+70
| | | | | | | | | | sure that <new-path> exists before accepting it as a remapping. We had some clients that had added old source paths remappings to their .lldbinit files and they were causing trouble at a later date. This fix should help mitigate these issues. <rdar://problem/26358860> llvm-svn: 274948
* Make IsSyntheticChildrenGenerated() virtual so that dynamic and synthetic ↵Enrico Granata2016-07-085-2/+46
| | | | | | values can refer back to their parents llvm-svn: 274901
OpenPOWER on IntegriCloud