summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [TypeSystem] Guard the global `ASTSourceMap` with a mutexSean Callanan2017-07-251-4/+12
| | | | | | | | | | | | | | | | | s_source_map in ClangExternalASTSourceCommon.cpp is unguarded and therefore can break in multithreaded conditions. This can cause crashes in particular if multiple targets are being set up at once. This patch wraps s_source_map in a function that ensures exclusivity, and makes every user of it use that function instead. <rdar://problem/33429774> lldb crashes after "resume_off" Differential Revision: https://reviews.llvm.org/D35083 llvm-svn: 308993
* Extend 'target symbols add' to load symbols from a given moduleEugene Zemtsov2017-07-245-5/+80
| | | | | | | | | | | | | | Now -shlib flag can be provided alongside with names of symbols files: (lldb) target symbols add --shlib stripper-lib.so unstripper-lib.so This is helpful when default matching mechanisms by name and UUID can't find a module, and the user needs to explicitly specify which module the given symbol file belongs to. Differential Revision: https://reviews.llvm.org/D35607 llvm-svn: 308933
* Skip test_lldbmi_var_update on Darwin.Sean Callanan2017-07-241-0/+1
| | | | llvm-svn: 308919
* Don't allow .debug_types to be parsed as LLDB can crash when enums are not ↵Greg Clayton2017-07-241-0/+15
| | | | | | | | able to be found. Differential Revision: https://reviews.llvm.org/D35734 llvm-svn: 308911
* RFix PR33875 by distinguishing between DWO and clang modules.Adrian Prantl2017-07-242-2/+8
| | | | | | | | This reapplies https://reviews.llvm.org/D35740 with a tweak to find the section by name rather than type. Section types don't distinguish between regular sections and their DWO counterparts. llvm-svn: 308905
* Don't crash when hostname is empty. StringRef will assert and kill your program.Greg Clayton2017-07-241-1/+1
| | | | llvm-svn: 308896
* Revert "Fix PR33875 by distinguishing between DWO and clang modules"Adrian Prantl2017-07-232-6/+2
| | | | | | This reverts commit r308850. llvm-svn: 308851
* Fix PR33875 by distinguishing between DWO and clang modulesAdrian Prantl2017-07-232-2/+6
| | | | | | | | | | | | | | The DWO handling code can get confused by clang modules which also use skeleton CUs to point to the object file with the full debug info. This patch detects whether an object is a "real" DWO or a clang module and prevents LLDB from interpreting clang modules as DWO. This fixes the regression in TestWithModuleDebugging. http://llvm.org/bugs/show_bug.cgi?id=33875 Differential Revision: https://reviews.llvm.org/D35740 llvm-svn: 308850
* Added a missing "break;" after seeing a clang warning about potential fall ↵Greg Clayton2017-07-211-0/+1
| | | | | | through annotation. llvm-svn: 308776
* XFail TestWithModuleDebugging on linux (bug 33875)Pavel Labath2017-07-211-0/+2
| | | | llvm-svn: 308732
* Fix typo in error message in 'platform status'.Bruce Mitchener2017-07-211-1/+1
| | | | llvm-svn: 308716
* Add help text for "expression" telling how to enter multi-line mode.Jim Ingham2017-07-191-0/+11
| | | | | | | | | This seemed natural to us, but wasn't documented anywhere and was not clear to everybody. <rdar://problem/33316164> llvm-svn: 308549
* Fix GreenDragon botsChris Bieneman2017-07-192-18/+0
| | | | | | | | | This commit removes a very old deprecated API that was causing compile failures for LLDB on Darwin. Since the comment says we only needed to keep the old API around for a few Xcode builds, and the comment was written 6 years ago... I think this can safely go away. Failure URL: http://lab.llvm.org:8080/green/view/LLDB/job/lldb_build_test/29936/console llvm-svn: 308509
* silence a couple of -Wqual-cast warning from GCC (NFC)Saleem Abdulrasool2017-07-192-2/+4
| | | | | | | | | | | | | | | Cast to `const uint8_t *` instead of `uint8_t *` to avoid the warning from GCC. EmulationStateARM.cpp:206:34: warning: cast from type 'const void*' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Wcast-qual] Cast to `const uint32_t *` and the explicitly cast away the const-ness of the value. This seems pretty sketchy as the `DataExtractor` holds a const reference to the data. However, this is no worse than before. ObjectFilePECOFF.cpp:540:78: warning: cast from type 'const uint8_t* {aka const unsigned char*}' to type 'uint32_t* {aka unsigned int*}' casts away qualifiers [-Wcast-qual] llvm-svn: 308489
* Expose hit count via SBBreakpointLocation.Bruce Mitchener2017-07-196-0/+156
| | | | | | | | | | | | | | | Summary: SBBreakpointLocation exposed the ignore count, but didn't expose the hit count. Both values were exposed by SBBreakpoint and SBWatchpoint, so this makes things a bit more consistent. Reviewers: lldb-commits Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31283 llvm-svn: 308480
* Fix typos in documentation.Bruce Mitchener2017-07-193-3/+3
| | | | | | | | | | Reviewers: lldb-commits Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31282 llvm-svn: 308426
* Update API headers.Bruce Mitchener2017-07-193-4/+4
| | | | | | | | | | | | | Summary: * Provide API doc for SBProcess::SaveCore. * Fix typo in SBAttachInfo doc comments. * SBBreakpointList: Name some variables same as C++. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D35614 llvm-svn: 308425
* cmake build needs to run tests AND collect resultsTim Hammerquist2017-07-181-7/+7
| | | | | | | | | | | CMake target "check-lldb" runs the lldb dotest.py suite, but doesn't collect the results in a usable format. In adding the arguments necessary to collect these results, I found some minor bugs in CMake that prevented dotest overrides from being used. This patch fixes them. <rdar://problem/33389717> cmake build needs to run tests AND collect results llvm-svn: 308393
* [CMake] A few fixups to support building LLDB for iOSChris Bieneman2017-07-182-12/+26
| | | | | | These changes enable proper configuration of LLDB targeting iOS. llvm-svn: 308378
* [CMake] Refactor debugserver build systemChris Bieneman2017-07-186-23/+55
| | | | | | | | | This refactoring changes two significant things about how the debugserver build system works: (1) debugserver will include all appropriate architecture support, so we can now build arm or ppc debugservers (2) debugserver can be built by itself, so you don't have to configure all of LLDB in order to generate debugserver. llvm-svn: 308377
* [CMake] [NFC] Remove out of date and redundant version requirementChris Bieneman2017-07-181-1/+0
| | | | | | Since we set the minimum required version elsewhere to be higher this actually has meaningful good impact. llvm-svn: 308376
* Fix NetBSD/FreeBSD build after r308304Pavel Labath2017-07-184-0/+4
| | | | llvm-svn: 308307
* Clean up lldb-types.hPavel Labath2017-07-1826-39/+29
| | | | | | | | | | | | | | | | | | | | Summary: It defined a couple of types (condition_t) which we don't use anymore, as we have c++11 goodies now. I remove these definitions. Also it unnecessarily included a couple of headers which weren't necessary for it's operation. I remove these, and place the includes in the relevant files (usually .cpp, usually in Host code) which use them. This allows us to reduce namespace pollution in most of the lldb files which don't need the OS-specific definitions. Reviewers: zturner, jingham Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D35113 llvm-svn: 308304
* Fix linux arm and mips builds broken by r308282Pavel Labath2017-07-182-4/+4
| | | | llvm-svn: 308292
* Remove shared pointer from NativeProcessProtocolPavel Labath2017-07-1818-469/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The usage of shared_from_this forces us to separate construction and initialization phases, because shared_from_this() is not available in the constructor (or destructor). The shared semantics are not necessary, as we always have a clear owner of the native process class (GDBRemoteCommunicationServerLLDB object). Even if we need shared semantics in the future (which I think we should strongly avoid), reverting this will not be necessary -- the owners can still easily store the native process object in a shared pointer if they really want to -- this just prevents the knowledge of that from leaking into the class implementation. After this a NativeThread object will hold a reference to the parent process (instead of a weak_ptr) -- having a process instance always available allows us to simplify some logic in this class (some of it was already simplified because we were asserting that the process is available, but this makes it obvious). Reviewers: krytarowski, eugene, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D35123 llvm-svn: 308282
* Fixing LLDB build after refactoring of clang's MacroInfoEugene Zemtsov2017-07-171-4/+4
| | | | llvm-svn: 308219
* Fix debugserver accepting remote connectionsChris Bieneman2017-07-134-3/+32
| | | | | | | | While adding IPv6 support to debugserver I broke handling wildcard addresses and fully qualified address filtering. This patch resolves that bug and adds a test for matching the address "*". <rdar://problem/32947613> llvm-svn: 307957
* Enable parsing C++ names generated by lambda functions.Jim Ingham2017-07-133-0/+39
| | | | | | https://reviews.llvm.org/D34911 from Weng Xuetian. llvm-svn: 307944
* Convert a few more tests to use run_to_source_breakpoint.Jim Ingham2017-07-133-84/+7
| | | | llvm-svn: 307943
* Fix a deadlock in the Python interpreter vrs. SIGINT.Jim Ingham2017-07-132-2/+2
| | | | | | | | | | | The interpreter gets invoked in the sigint handler to cancel long-running Python operations. That requires the interpreter lock, but that may be held by the Python operation that's getting interrupted, so the mutex needs to be recursive. <rdar://problem/33179086> llvm-svn: 307942
* Upstreaming a patch from Github: When evaluation user expressions, ignore ↵Kuba Mracek2017-07-137-2/+80
| | | | | | InstrumentationRuntime breakpoints. (#235) llvm-svn: 307881
* The llvm.org bugzilla moved.Jim Ingham2017-07-131-1/+1
| | | | llvm-svn: 307870
* [MainLoop] Fix possible use of an invalid iteratorPetr Pavlu2017-07-121-9/+18
| | | | | | | | | | | | | | | | Store file descriptors from loop.m_read_fds (if FORCE_PSELECT is defined) and signals from loop.m_signals that need to be processed in MainLoop::RunImpl::ProcessEvents() into a separate vector and then iterate over this container to invoke the callbacks. This prevents a problem where when the code iterated directly over m_read_fds/m_signals, a callback invoked from within the loop could modify these variables and invalidate the loop iterator. This would then result in an assertion failure in llvm::DenseMapIterator::operator++(). Differential Revision: https://reviews.llvm.org/D35298 llvm-svn: 307782
* Fixing Android builderRavitheja Addepally2017-07-121-5/+5
| | | | llvm-svn: 307773
* Adding Support for Error Strings in Remote PacketsRavitheja Addepally2017-07-129-23/+136
| | | | | | | | | | | | | | | | | | Summary: This patch adds support for sending strings along with error codes in the reply packets. The implementation is based on the feedback recieved in the lldb-dev mailing list. The patch also adds an extra packet for the client to query if the server has the capability to provide strings along with error replys. Reviewers: labath, jingham, sas, lldb-commits, clayborg Reviewed By: labath, clayborg Differential Revision: https://reviews.llvm.org/D34945 llvm-svn: 307768
* switch on enum should be exhaustive and warning-freeTim Hammerquist2017-07-111-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Testing the value of type_code against the closed enum TypeCodes provides statically verifiable completeness of testing. However, one branch assigns to type_code by casting directly from a masked integer value. This is currently handled by adding a default: case after checking each TypeCodes instance. This patch introduces a bool variable containing the "default" state value, allowing the switch to be exhaustive, protect against future instances not being handled in the switch, and preserves the original logic. This addresses the warning: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] As an issue of maintainability, the bitmask on line 524 handles the current values of TypeCodes enum, but this will be invalid if the enum is extended. This patch does not address this, and a more closed conversion from cfinfoa -> TypeCodes would help protect against this. Reviewers: spyffe, lhames, sas Reviewed By: sas Subscribers: sas, lldb-commits Differential Revision: https://reviews.llvm.org/D35036 llvm-svn: 307712
* NativeProcessLinux: Fix handling of raise(SIGTRAP)Pavel Labath2017-07-113-5/+15
| | | | | | | | | | | | | | | | | | | | | In NativeProcessLinux::MonitorSIGTRAP we were asserting that the si_code value is one of the codes we know about. However, that list was very incomplete -- for example, we were not handling SI_TKILL/SI_USER, generated by raise(SIGTRAP). A cursory examination show there are at least a dozen codes like these that an app can generate, and more can be added at any point. So, instead of trying to play catchup, I change the default behavior to treat an unknown si_code like an ordinary signal. The only reason we needed to inspect si_code in the first place is because watchpoint/breakpoints are notified as SIGTRAP, but we already know about those, and us starting to use a new debug event is far less likely than somebody introducing a new non-debug event. I add a test case to TestRaise to verify we are handling raise(SIGTRAP) in an application properly. llvm-svn: 307644
* NativeProcessLinux: Fix some compiler warningsPavel Labath2017-07-112-21/+6
| | | | llvm-svn: 307636
* [LLDB][ppc64le] Rename enums in AuxVectorPavel Labath2017-07-113-74/+75
| | | | | | | | | | | | | | | | | Summary: On linux on ppc64le some of the enums in AuxVector have the same name as macros defined in the system. Reviewers: mikesart, labath Reviewed By: labath Subscribers: joerg, gut, krytarowski, lldb-commits Differential Revision: https://reviews.llvm.org/D35065 Patch by Bruno Rosa <bruno.rosa@eldorado.org.br> llvm-svn: 307632
* Pass in the disassembler flavor when disassembling inJason Molenda2017-07-111-1/+2
| | | | | | | | DumpDataExtractor. Patch from Jeffrey Crowell, https://reviews.llvm.org/D34929 llvm-svn: 307618
* Don't access Python objects while not holding the GIL.Zachary Turner2017-07-091-8/+6
| | | | | | | Patch by Tatyana Krasnukha Differential Revision: https://reviews.llvm.org/D34942 llvm-svn: 307512
* Update message that Main Thread Checker produces.Kuba Mracek2017-07-082-3/+3
| | | | llvm-svn: 307464
* The x86 instruction unwinder can be asked to disassemble non-instruction Jason Molenda2017-07-083-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | blocks of memory, and if the final bytes of that block look like a long x86 instruction, it can cause the llvm disassembler to read past the end of the buffer. Use the maximum allowed instruction length that we pass to the llvm disassembler as a way to limit this to the size of the buffer. An example of how to trigger this is when lldb does a function call, it puts a breakpoint on the beginning of main() and uses that as the return address from the function call. When we stop at that location, lldb may try to find the first frame up the stack. Because this is on the first instruction of a function, it will get the word-size value at the stack pointer and assume that this was the caller's pc value. But this is random stack memory and could point to anything - an object in memory, something in the data section, whatever. And if we have a symbol for that thing, we'll try to disassemble it. This was leading to infrequent crashes in customer scenarios; figured out what was happening with address sanitizer. <rdar://problem/30463256> llvm-svn: 307454
* Disable TestGoASTContextPavel Labath2017-07-071-0/+1
| | | | | | | it fails with go 1.8 and we don't seem to have a maintainer of that functionality. llvm-svn: 307391
* Add a NativeProcessProtocol Factory classPavel Labath2017-07-0712-553/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the static functions used for creating NativeProcessProtocol instances with a factory pattern, and modernizes the interface of the new class in the process -- I use llvm::Expected instead of the Status+value combo. I also move some of the common code (like the Delegate registration into the base class). The new arrangement has multiple benefits: - it removes the NativeProcess*** dependency from Process/gdb-remote (which for example means that liblldb no longer pulls in this code). - it enables unit testing of the GDBRemoteCommunicationServerLLGS class (by providing a mock Native Process). - serves as another example on how to use the llvm::Expected class (I couldn't get rid of the Initialize-type functions completely here because of the use of shared_from_this, but that's the next thing on my list here) Tests still pass on Linux and I've made sure NetBSD compiles after this. Reviewers: zturner, eugene, krytarowski Subscribers: srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D33778 llvm-svn: 307390
* Fix Xcode project file for gtest schemes.Tim Hammerquist2017-07-061-8/+30
| | | | | | <rdar://problem/33066993> llvm-svn: 307335
* Change remaining references to lit.util.capture to use subprocess.check_output.David L. Jones2017-07-061-3/+3
| | | | | | | | | | | | | | Summary: The capture() function was removed in r306625. This should fix PGO breakages reported by Michael Zolotukhin. Reviewers: mzolotukhin Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D35088 llvm-svn: 307320
* Working through testcases, converting to run_to_source_breakpoint.Jim Ingham2017-07-065-99/+14
| | | | llvm-svn: 307287
* Fix a copy-paste error in r307161Pavel Labath2017-07-061-2/+2
| | | | llvm-svn: 307253
* Revert "Android.rules: build x86 tests with -mstackrealign"Pavel Labath2017-07-062-6/+0
| | | | | | | | | | | Starting with android ndk r15, clang much more tests are affected by the -mstackrealign bugl (now nearly all functions are affected, and not just the ones requiring 16-byte alignment). Due to their numbers, Xfailing all of them is not a viable option, so we will just have to declare this configuration unsupported, and wait until ndk ships a clang version that has this bug fixed. llvm-svn: 307252
OpenPOWER on IntegriCloud