summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support in debug LLDB builds (if LLDB_CONFIGURATION_DEBUG is defined) ↵Greg Clayton2016-06-031-0/+40
| | | | | | | | | | where we can set an environment variable named LLDB_DWARF_DONT_COMPLETE_TYPENAMES that can contain one or more typenames separated by ';' characters. This will cause us to not complete any types whose names match and can help us to try and reproduce issues we see in bugs. So you can launch LLDB with the environment variable: % LLDB_DWARF_DONT_COMPLETE_TYPENAMES=Foo;Bar;Baz lldb llvm-svn: 271696
* Fix makefile for TestExternCSymbolsTamas Berghammer2016-06-031-1/+1
| | | | llvm-svn: 271618
* Fixed a problem where we couldn't call extern "C" functions.Sean Callanan2016-06-025-1/+79
| | | | | | | | | | | | | Some compilers do not mark up C++ functions as extern "C" in the DWARF, so LLDB has to fall back (if it is about to give up finding a symbol) to using the base name of the function. This fix also ensures that we search by full name rather than "auto," which could cause unrelated C++ names to be found. Finally, it adds a test case. <rdar://problem/25094302> llvm-svn: 271551
* LLDB needs to be able to handle DW_AT_GNU_dwo_name that are relative to the ↵Greg Clayton2016-06-021-0/+16
| | | | | | | | DW_AT_comp_dir when using -gmodules with DWARF in .o files on darwin. <rdar://problem/26590227> llvm-svn: 271545
* Fixed a problem where -gmodules debug info would be loaded by the DWO file ↵Greg Clayton2016-06-021-0/+6
| | | | | | | | support accidentally and cause 1000s of files to be mapped into LLDB's address space for each .o file that reference a module. <rdar://problem/26580266> -gmodules causes LLDB.framework to map hundreds of copies of the same .pcm file llvm-svn: 271543
* Fix JavaArraySyntheticFrontEnd for non-reference ValueObject.Tamas Berghammer2016-06-021-1/+1
| | | | | | | | | | | | Summary: Fix missing return after checking that m_backend is not a pointer or reference type. Reviewers: clayborg, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20875 llvm-svn: 271453
* [tsan] Prefer mangled name looking up variable declaration for racy addressDevin Coughlin2016-06-014-1/+99
| | | | | | | | | | | | | | | | For Thread Sanitizer reports, LLDB tries to find a global variable declaration corresponding to the racy address in order to provide a filename and line number. This commit changes the lookup of the variable to use the mangled name for lookup and fall back to the demangled version if unavailable. This is needed to report locations of races on Swift global variables. I've also added a test to make sure we look up C++ globals correctly. rdar://problem/26459401 Differential Revision: http://reviews.llvm.org/D20760 llvm-svn: 271433
* Add more verification on consectutive bitfields otherwise clang will assert.Greg Clayton2016-05-311-17/+35
| | | | | | | | We need to verify that consecutive bitfields have higher offsets and don't overlap. The issues was found by running a broken version of recent clangs where the bitfield offsets were being emitted incorrectly. To guard against this we now verify and toss out any invalid bitfields and print a message that indicates to file a bug against the compiler. <rdar://problem/25737621> llvm-svn: 271343
* [CMake] Update to requiring CMake 3.4.3Chris Bieneman2016-05-311-1/+1
| | | | | | | | | | | | | | Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20826 llvm-svn: 271328
* Implement ProcessInfo::Dump(), log gdb-remote stub launchTodd Fiala2016-05-314-9/+42
| | | | | | | | | | | | | | | | | | This change implements dumping the executable, triple, args and environment when using ProcessInfo::Dump(). It also tweaks the way Args::Dump() works so that it prints a configurable label rather than argv[{index}]={value}. By default it behaves the same, but if the Dump() method with the additional arg is provided, it can be overridden. The environment variables dumped as part of ProcessInfo::Dump() make use of that. lldb-server has been modified to dump the gdb-remote stub's ProcessInfo before launching if the "gdb-remote process" channel is logged. llvm-svn: 271312
* [LLDB] Make sure that indexing is done before clearing DIE infoCameron Desrochers2016-05-301-17/+68
| | | | | | | | | | | | | | | | "ClearDIEs()" was being called too soon, before everyone was done using the DIEs. This fix delays the calls to ::ClearDIEs() until all compile units have been indexed. 1 - Call "::ExtractDIEsIfNeeded()" on all compile units on separate threads. See if each CU has the DIEs parsed and remember this. 2 - Index all compile units on separate threads. 3 - Clear any DIEs in any compile units that didn't have their DIEs parsed after all compile units have been indexed. Patch by phlav Differential Revision: http://reviews.llvm.org/D20738 llvm-svn: 271209
* fix up lldb-server platform on Apple hostsTodd Fiala2016-05-271-0/+3
| | | | | | | | | | | | r259714 introduces the transport method into the URL passed to the gdb-remote stub. On debugserver, this is not supported and prevented debugserver from being launched by lldb-server in platform mode. This change skips the transport method addition from r259714 when on Apple hosts. llvm-svn: 270961
* Add a new "lldb" log channel named "demangle". If we have crashes that are ↵Greg Clayton2016-05-273-0/+27
| | | | | | | | related to demangling, we now can enable this logging and we will be able to reproduce demangler crashes (usually due to overflowing the stack) without needing someone's project. <rdar://problem/25221899> llvm-svn: 270941
* Lock the access to the BreakpointLocationCollection.Jim Ingham2016-05-262-2/+13
| | | | | | | | | | | | I was investigating an odd crash in lldb when the breakpoint site goes to bump the hit counts of the locations it implements. I noticed that the BreakpointLocationCollection wasn't locking itself for access and modification. I don't see how that can cause the crash I'm seeing, but still this is the right thing to do... <rdar://problem/25178205> llvm-svn: 270939
* Don't cache the stret/vrs. non-stret code pointer as static data in the runtime.Jim Ingham2016-05-262-6/+6
| | | | | | | | | It belongs in the instance, since then when you change architectures it can be adjusted appropriately. <rdar://problem/26308079> llvm-svn: 270938
* With -gmodules, we have been having a harder time always finding a type when ↵Greg Clayton2016-05-261-2/+25
| | | | | | | | | | | | | | | | | | | | | | we need one. We have seen cases where we have been unable to find an argument type for a function, or we find one from another language, and then we try to create a function type by calling: lldb_private::ClangASTContext::CreateFunctionType(clang::ASTContext*, lldb_private::CompilerType const&, lldb_private::CompilerType const*, unsigned int, bool, unsigned int) This fix will ensure that all arguments to lldb_private::ClangASTContext::CreateFunctionType() are in order by checking: - AST is valid - if arguments are specified we have a valid argument array - return type is valid - return type is a clang type - all argument types are valid - all argument types are clang types If any of these fail, we return an invalid CompilerType. If we don't return an invalid type, clang will crash anyway, and LLDB must not crash even in the presence of bad or missing debug info. <rdar://problem/25172715> llvm-svn: 270932
* Make sure that we succeed in starting a definition before we complete it and ↵Greg Clayton2016-05-262-32/+80
| | | | | | | | | | | | | | | | emit an error if we fail to start the definition. ClangASTContext::StartTagDeclarationDefinition(...) was starting definitions for any TagType instances that have TagDecl, but ClangASTContext::CompleteTagDeclarationDefinition(...) was getting the type to a CXXRecordDecl with: clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl(); The problem is that getAsCXXRecordDecl() might dig a bit deeper into a type and dig out a different decl, which means we might call ClangASTContext::StartTagDeclarationDefinition(...), but it might not do anything, and then we might call ClangASTContext::CompleteTagDeclarationDefinition(...) and it might try to complete something that didn't have its definition started and this will crash. This change fixes that, and also makes sure that starting a definition succeeds before any calls to ClangASTContext::CompleteTagDeclarationDefinition(). <rdar://problem/24091798> llvm-svn: 270891
* Guard against the C++ destructor chain by not letting the debugger list ↵Greg Clayton2016-05-261-67/+49
| | | | | | | | | | clean up after itself in the C++ destructor chain. If users call "static void lldb::SBDebugger::Terminate()" we will clean up the debugger list, and users can individually destroy debugger instances with "static void lldb::SBDebugger::Destroy(SBDebugger &)". But if we let the C++ destructor chain tear down this list, other threads that might still be running as the main thread exits can now crash if they access the debugger list. We stop this by leaking the debugger list and its mutex. <rdar://problem/26372169> llvm-svn: 270869
* [cmake] Remove the LLDB versions of the exception-controlling variablesPavel Labath2016-05-261-22/+0
| | | | | | | | | | | | | | | Summary: One can still use the LLVM variables to control this: LLVM_ENABLE_EH, LLVM_ENABLE_RTTI. It's not clear to me why one would want to control these at lldb level and it's generally not even a good idea to compile parts of the same binary with different values of these flags. Reviewers: zturner, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20673 llvm-svn: 270863
* [cmake] Add a big warning about a libstdc++ issuePavel Labath2016-05-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: Recent increase in the usage of std::weak_ptr has caused us to rediscover an issue in libstdc++ versions prior to 4.9 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656>, which make this class unusable without exceptions in the presence of multiple threads. It's virtualy impossible to work around this issue without implementing our own shared_ptr/weak_ptr substitutes, which does not seem like a good idea. Therefore, I am adding a big CMake warning which warns you about this issue if you're attempting a to do a build which is suceptible to this problem and suggests possible alternatives. Right now, nothing spectacular will happen if you ignore this warning (all the crashes I have seen occur during process shutdown), but there's no guarantee the situation will not change in the future. Reviewers: tberghammer, tfiala, nitesh.jain, omjavaid, emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20671 llvm-svn: 270854
* Add "-gmodules" support to the test suite.Todd Fiala2016-05-2613-29/+108
| | | | | | | | | | | | | | This change adds the capability of building test inferiors with the -gmodules flag to enable module debug info support. Windows is excluded per @zturner. Reviewers: granata.enrico, aprantl, zturner, labath Subscribers: zturner, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D19998 llvm-svn: 270848
* [cmake] Add ability to customize (and skip) debugserver codesignPavel Labath2016-05-261-23/+25
| | | | | | | | | | | | | | | | | | Summary: This adds the ability to customize the debugserver codesign process via cmake cache variable. The user can set the codesign indentity (with the default being the customary lldb_codesign), and if the identity is set to a empty string, the codesign step is skipped completely. We needed the last feature to enable building lldb on buildservers which do not have the right certificates installed. Reviewers: sas, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20623 llvm-svn: 270832
* Avoid using stdio in TestVirtualPavel Labath2016-05-262-20/+22
| | | | | | | | | | | | | | Summary: using stdio in tests does not work on windows, and it is not completely reliable on linux. Avoid using stdio in this test, as it is not necessary for this purpose. Reviewers: clayborg Subscribers: lldb-commits, zturner Differential Revision: http://reviews.llvm.org/D20567 llvm-svn: 270831
* Small further refinement to the check in ObjectFileMachO::ParseSymtabJason Molenda2016-05-261-7/+9
| | | | | | | | | | | | | | | | | which looks for binaries missing an LC_FUNCTION_STARTS section because it was stripped/not emitted. If we see a normal user process binary (executable, dylib, framework, bundle) without LC_FUNCTION_STARTS, that is unusual and we should disallow instruction emulation because that binary has likely been stripped a lot. If this is a non-user process binary -- a kernel, a standalone bare-board binary, a kernel extension (kext) -- and there is no LC_FUNCTION_STARTS, we should not assume anything about the binary and allow instruction emulation as we would normally do. <rdar://problem/26453952> llvm-svn: 270818
* Make sure to try and take the process stop lock when calling:Greg Clayton2016-05-261-6/+11
| | | | | | | | | | | uint32_t SBProcess::GetNumQueues(); SBQueue SBProcess::GetQueueAtIndex (size_t index); Otherwise this code will run when the process is running and cause problems. <rdar://problem/26482744> llvm-svn: 270803
* It has been brought to my attention that, given two variablesEnrico Granata2016-05-253-12/+17
| | | | | | | | | | | | | | | | | T x; U y; doing x = *((T*)y) is undefined behavior, even if sizeof(T) == sizeof(U), due to pointer aliasing rules Fix up a couple of places in LLDB that were doing this, and transform them into a defined and safe memcpy() operation Also, add a test case to ensure we didn't regress by doing this w.r.t. tagged pointer NSDate instances llvm-svn: 270793
* Mark some aarch64-linux specific xfails marking bug entriesOmair Javaid2016-05-253-2/+3
| | | | | | | | TestBSDArchives.py and TestWatchLocation.py fail due to unicode error and bug has already been reported for arm and macOSx. TestConstVariables.py fails because lldb cant figure out frame variable type when used in expr. llvm-svn: 270780
* Add logging to ValueObjectSyntheticFilter such that one can trace through ↵Enrico Granata2016-05-251-8/+78
| | | | | | the creation of synthetic children llvm-svn: 270770
* Fix an issue where LLDB would crash if one tried to 'frame variable' an ↵Enrico Granata2016-05-252-4/+8
| | | | | | | | unordered_map more than once in a stop due to the synthetic provider not properly caching the ValueObjects it was returning for the child elements Fixes rdar://26470909 llvm-svn: 270752
* Mark some arm-linux specific xfails marking bug entriesOmair Javaid2016-05-254-1/+5
| | | | | | | | TestCallUserAnonTypedef.py and TestIRInterpreter.py fail to limitation of JIT expressions in handling hard float ABI targets. TestBSDArchives.py fails due to python unicode error. TestBuiltinTrap.py fails due to wrong line information generated by some gcc versions. llvm-svn: 270745
* Add unit tests for ModuleCachePavel Labath2016-05-254-0/+192
| | | | | | | | | | Reviewers: ovyalov, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20570 llvm-svn: 270684
* Include <mutex> in Process.h - Jim's change in r270593 added a std::mutexJason Molenda2016-05-251-0/+1
| | | | | | | ivar and this header is needed for it to compile on linux, judging by the build bots. llvm-svn: 270662
* Add support for arm64 compact unwind tables, used on darwin arm64Jason Molenda2016-05-253-0/+340
| | | | | | | | | | | | | | systems (ios, tvos, watchos). It's a simple format to use now that I have i386/x86_64 supported already. The unwind instructions are only valid at call sites -- that is, when lldb is unwinding a frame in the middle of the stack. It cannot be used for the currently executing frame; it has no information about prologues/epilogues/etc. <rdar://problem/12062336> llvm-svn: 270658
* Fix an issue where the NSDate data formatter was not using the proper ↵Enrico Granata2016-05-241-1/+3
| | | | | | | | alignment on watchOS targets Fixes rdar://problem/23298264 llvm-svn: 270621
* Ach, editing too many files at once. Make this file compile again.Jason Molenda2016-05-241-1/+1
| | | | llvm-svn: 270620
* In r268475 I made a change to ObjectFileMachO so that if it isJason Molenda2016-05-241-1/+4
| | | | | | | | | | | | | | | | missing an LC_FUNCTION_STARTS section, we assume it has been aggressively stripped (it is *very* unusual for anyone to strip LC_FUNCTION_STARTS) so we disable assembly instruction unwind plan creation. Kernel extensions (kexts) don't have LC_FUNCTION_STARTS, but we almost always have good symbol bounds just with the linker symbols. So add an exception to allow assembly instruction unwind plan creation for kexts even though they lack LC_FUNCTION_STARTS. <rdar://problem/26453952> llvm-svn: 270618
* Reword the "Happened at" TSan-reported thread to contain a thread id.Kuba Brecka2016-05-241-2/+5
| | | | llvm-svn: 270608
* xfail TestRedefinitionsInline with older ClangEd Maste2016-05-241-1/+2
| | | | | | | | This fails on FreeBSD 10 with the system compiler, Clang 3.4.1. llvm.org/pr27845 llvm-svn: 270603
* Lock out Process::RunThreadPlan so only one can be in flight at a time.Jim Ingham2016-05-242-1/+5
| | | | | | | | | | | | What with all sorts of folks (TSAN, ASAN, queue detection, etc...) trying to gather info by calling functions down in the lower layers of lldb, we've started to see people running expressions simultaneously. The expression evaluation part is okay, but only one RunThreadPlan can be active at a time. I added a lock to enforce that. <rdar://problem/26431072> llvm-svn: 270593
* Skip leading spaces when decoding hex valuesFrancis Ricci2016-05-241-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: The StringExtractor functions using stroull will already skip leading whitespace (ie GetU64). Make sure that the manual hex parsing functions also skip leading whitespace. This is important for members of the gdb protocol which are defined as using whitespace separators (ie qfThreadInfo, qC, etc). While lldb-server does not use the whitespace separators, gdb-remotes should work if they do, as the whitespace is defined by the gdb-remote protocol. Reviewers: vharron, jasonmolenda, clayborg Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D20509 llvm-svn: 270592
* Replace file system forbidden symbols in the hostname which passed to the ↵Oleksiy Vyalov2016-05-241-4/+20
| | | | | | | | ModuleCache. http://reviews.llvm.org/D20548 llvm-svn: 270590
* Improve wording in TSan reports involving global variables. Don't repeat ↵Kuba Brecka2016-05-242-12/+43
| | | | | | hex addresses that are the same. llvm-svn: 270588
* Add a missing include to ItaniumABILanguageRuntime.hPavel Labath2016-05-241-0/+1
| | | | | | | some (I'm not sure why only some, actually) implementations of std::map require the value type to be a fully specified type when declaring then. This make sure TypeAndOrName is. llvm-svn: 270570
* [LLDB][MIPS] Fix floating point handling in case of thread step-outSagar Thakur2016-05-246-38/+229
| | | | | | | | | | | Patch by Nitesh Jain. Summary: These patch fix thread step-out for hard and soft float. Reviewers: jaydeep, bhushan, clayborg Differential Revision: http://reviews.llvm.org/D20416 llvm-svn: 270564
* Make sure TestRedefinitionsInInlines.py actually inlines.Chaoren Lin2016-05-231-2/+2
| | | | | | | | | | Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20540 llvm-svn: 270493
* xfail TestRedefinitionsInline on Windows.Zachary Turner2016-05-231-1/+1
| | | | llvm-svn: 270490
* We have many radars showing that stepping through C++ code can result in ↵Greg Clayton2016-05-234-142/+189
| | | | | | | | | | | | slow steps. One of the things slowing us down is that ItaniumABILanguageRuntime class doesn't cache vtable to types in a map. This causes us, on every step, for every variable, to read the first pointer in a C++ type that could be dynamic and lookup the symbol, possibly in every symbol file (some symbols files on Darwin can end up having thousands of .o files when using DWARF in .o files, so thousands of .o files are searched each time). This fix caches lldb_private::Address (the resolved vtable symbol address in section + offset format) to TypeAndOrName instances inside the one ItaniumABILanguageRuntime in a process. This allows caching of dynamic types and stops us from always doing deep searches in each file. <rdar://problem/18890778> llvm-svn: 270488
* add cmake files to Xcode projectTodd Fiala2016-05-231-0/+32
| | | | | | This makes it easier to use Xcode revision diffing tools on them. llvm-svn: 270476
* Removed the m_decl_objects map from ClangASTContext.Sean Callanan2016-05-2313-80/+42
| | | | | | | | | | | | | m_decl_objects is problematic because it assumes that each VarDecl has a unique variable associated with it. This is not the case in inline contexts. Also the information in this map can be reconstructed very easily without maintaining the map. The rest of the testsuite passes with this cange, and I've added a testcase covering the inline contexts affected by this. <rdar://problem/26278502> llvm-svn: 270474
* Always rerun all tests on Windows.Zachary Turner2016-05-232-0/+4
| | | | | | | | There is flakiness somewhere in the core infrastructure on Windows, so to get the buildbot reliably green we need to mark all tests as flaky. llvm-svn: 270460
OpenPOWER on IntegriCloud