summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Minidump/Windows: Fix module lookup"Pavel Labath2019-08-141-1/+0
| | | | | | | | | | | Although there is nothing wrong with this patch, the test added here uncovers a problem in other parts of the code which cause the test to fail when running under asan. Reverting the patch until I can fix the underlying issue(s). This reverts commit r368416. llvm-svn: 368838
* [lldb] Reinstate original guard variable checkRaphael Isemann2019-08-141-9/+5
| | | | | | | | | | The isGuardVariableSymbol option for ignoring Microsoft's ABI was originally added to get the bots green, but now that we found the actual issue (that we checked for prefix instead of suffix in the MS ABI check), we should be able to properly implement the guard variable check without any strange Microsoft exceptions. llvm-svn: 368802
* Fix warning: suggest braces around initialization of subobjectJonas Devlieghere2019-08-141-5/+7
| | | | | | This patch adds braces to the DEFINE_XMM macro. llvm-svn: 368782
* Enable lldb-server on WindowsAaron Smith2019-08-132-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit contains three small changes to enable lldb-server on Windows. - Add lldb-server for Windows to the build - Disable pty redirection on Windows for the initial lldb-server bring up - Add a support to get the parent pid for a process on Windows - Ifdef some signals which aren't supported on Windows Thanks to Hui Huang for the help with this patch! Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, compnerd, Hui, amccarth, xiaobai, srhines, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61686 llvm-svn: 368774
* [DebugLine] Be more robust in geussing the path styleJonas Devlieghere2019-08-131-3/+9
| | | | | | | | My previous change didn't fix the Windows bot. This patch is an attempt to make guessing the path style more robust by first looking at the compile dir and falling back to the actual file if that's unsuccessful. llvm-svn: 368772
* Initial support for native debugging of x86/x64 Windows processesAaron Smith2019-08-1320-3/+2899
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and the reviewers for all the help with this patch. Reviewers: labath, Hui, jfb, clayborg, amccarth Reviewed By: labath Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63165 llvm-svn: 368759
* [DWARF] Guess the path styleJonas Devlieghere2019-08-131-2/+6
| | | | | | Try to guess the FileSpec path style before defaulting to native. llvm-svn: 368746
* [DWARF} Use LLVM's debug line parser in LLDB.Jonas Devlieghere2019-08-134-1208/+175
| | | | | | | | | | | | | | | | The line number table header was substantially revised in DWARF 5 and is not fully supported by LLDB's current debug line implementation. This patch replaces the LLDB debug line parser with its counterpart in LLVM. This was possible because of the limited contact surface between the code to parse the DWARF debug line section and the rest of LLDB. We pay a small cost in terms of performance and memory usage. This is something we plan to address in the near future. Differential revision: https://reviews.llvm.org/D62570 llvm-svn: 368742
* [Symbol] Decouple clang from CompilerTypeAlex Langford2019-08-136-27/+46
| | | | | | | | | | Summary: Ideally CompilerType would have no knowledge of clang or any individual TypeSystem. Decoupling clang is relatively straightforward. Differential Revision: https://reviews.llvm.org/D66102 llvm-svn: 368741
* [lldb] Fix Microsoft guard variable detectionRaphael Isemann2019-08-131-1/+1
| | | | | | | Apparently we need to check for a suffix, not a prefix. This broke probably broke expression evaluation on Windows. llvm-svn: 368695
* [lldb] Reland "Refactor guard variable checks in IRForTarget"Raphael Isemann2019-08-131-14/+19
| | | | | | | | It seems the broken guard variable check for Windows was a feature(TM) and not a bug, so let's keep add a flag to the guard check that keeps the old behavior in the places where we ignored guard variables before. llvm-svn: 368688
* [CompilerType] Pass an ExecutionContextScope to GetTypeBitAlign.Davide Italiano2019-08-121-1/+1
| | | | llvm-svn: 368620
* Revert "[lldb] Refactor guard variable checks in IRForTarget"Stella Stamenova2019-08-121-12/+12
| | | | | | This reverts commit 94fbbf712e906464f5f3abbeabcfcbc05d5352ec. llvm-svn: 368616
* Revert "[lldb] Fix dynamic_cast by no longer failing on variable without ↵Stella Stamenova2019-08-121-1/+7
| | | | | | | | metadata" This reverts commit b448d1bf212219febbb182d00c210bad1bd25e7f. llvm-svn: 368615
* [Symbol] GetTypeBitAlign() should return None in case of failure.Davide Italiano2019-08-121-2/+4
| | | | | | | | | | | | | | | | Summary: And not `zero`. This is the last API needed to be converted to an Optional<T>. Reviewers: xiaobai, compnerd Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66093 llvm-svn: 368614
* [lldb] Fix dynamic_cast by no longer failing on variable without metadataRaphael Isemann2019-08-101-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Our IR rewriting infrastructure currently fails when it encounters a variable which has no metadata associated. This causes dynamic_cast to fail as in this case IRForTarget considers the type info pointers ('@_ZTI...') to be variables without associated metadata. As there are no variables for these internal variables, this is actually not an error and dynamic_cast would work fine if we didn't throw this error. This patch fixes this by removing this diagnostics code. In case we would actually hit a variable that has no metadata (but is supposed to have), we still have the error in the expression log so this shouldn't make it harder to diagnose any missing metadata errors. This patch should fix dynamic_cast and also adds a bunch of test coverage to that language feature. Fixes rdar://10813639 Reviewers: davide, labath Reviewed By: labath Subscribers: friss, labath, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65932 llvm-svn: 368511
* Small format fixHaibo Huang2019-08-091-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D66034 llvm-svn: 368497
* Detects whether RESOURCE_TYPE_IO is defined.Haibo Huang2019-08-091-0/+3
| | | | | | | | | | | | | | Summary: This fixes lldb build on macOS SDK prior to 10.12. Reviewers: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66034 llvm-svn: 368496
* [lldb][NFC] Remove unused IRForTarget::BuildRelocationRaphael Isemann2019-08-092-36/+0
| | | | llvm-svn: 368442
* [lldb][NFC] Unify InstrList typedef in IRForTargetRaphael Isemann2019-08-091-6/+2
| | | | llvm-svn: 368425
* [lldb] Refactor guard variable checks in IRForTargetRaphael Isemann2019-08-091-12/+12
| | | | | | | | Not NFC as this will probably fix a wrong guard variable check on Windows. Not sure though what Windows test can now be safely enabled. llvm-svn: 368417
* Minidump/Windows: Fix module lookupPavel Labath2019-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: When opening a minidump, we were failing to find an executable because we were searching for i386-unknown-windows, whereas we recognize the pe/coff files as i386-pc-windows. This fixes the triple computation code in the minidump parser to match pe/coff, and adds an appropriate test. NB: I'm not sure setting the vendor to "pc" is really correct for arm(64) windows, but right now that seems to match what we do in the pe/coff case (ArchSpec.cpp:935). Reviewers: clayborg, amccarth Subscribers: javed.absar, kristof.beyls, rnk, markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D65955 llvm-svn: 368416
* [lldb][NFC] Clean up logging in IRForTargetRaphael Isemann2019-08-091-167/+100
| | | | llvm-svn: 368415
* [lldb][NFC] Remove last C string uses from IRForTargetRaphael Isemann2019-08-091-10/+8
| | | | llvm-svn: 368406
* [lldb][NFC] Use range-based for-loops in IRForTargetRaphael Isemann2019-08-091-108/+40
| | | | llvm-svn: 368405
* [lldb][NFC] Modernize IRForTarget::CreateResultVariableRaphael Isemann2019-08-081-21/+20
| | | | llvm-svn: 368359
* [lldb][NFC] Move to StringRef in some places in IRForTargetRaphael Isemann2019-08-081-37/+32
| | | | llvm-svn: 368353
* [lldb] Fix HAVE_LIBCOMPRESSIONHaibo Huang2019-08-082-4/+2
| | | | | | | | | | | | | | | | Summary: This test doesn't make sense. Change to be consistent with what we did in GDBRemoteCommunication.cpp. Reviewers: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65965 llvm-svn: 368352
* [lldb][NFC] Directly use StringRef instead of temporary std::stringRaphael Isemann2019-08-081-13/+12
| | | | llvm-svn: 368346
* SymbolFileDWARF: Unconditionally scan through clang modules. NFCishAdrian Prantl2019-08-081-3/+7
| | | | | | | | | | | | | When looking up a type by name, also scan through any referenced Clang modules regardsless of whether a type with this name has been found. This is NFCish (= a potential performance regression) for Clang projects, but necessary in mixed Swift and Objective-C projects (and tested in swift-lldb). This only affects projects compiled with -gmodules that were not run through dsymutil. llvm-svn: 368345
* Fix a comment which was incorrect.Jim Ingham2019-08-081-1/+1
| | | | llvm-svn: 368340
* Remove unused and undocumented data_offset parameter (NFC)Adrian Prantl2019-08-081-1/+1
| | | | | | | | | Value::GetValueAsData() takes an undocumented parameter called data_offset that is always 0. Differential Revision: https://reviews.llvm.org/D65910 llvm-svn: 368330
* [lldb][NFC] Simplify return in MaybeHandleVariableRaphael Isemann2019-08-081-9/+4
| | | | | | This function anyway returns true, no need to do this extra work. llvm-svn: 368309
* Remove Module::GetSymbolVendorPavel Labath2019-08-081-19/+13
| | | | | | | | | | | | | | | | | | | | Summary: This patch removes the GetSymbolVendor function, and the various mentions of the SymbolVendor in the Module class. The implementation of GetSymbolVendor is "inlined" into the GetSymbolFile class which I created earlier. After this patch, the SymbolVendor class still exists inside the Module object, but only as an implementation detail -- a fancy holder for the SymbolFile. That will be removed in the next patch. Reviewers: clayborg, JDevlieghere, jingham, jdoerfert Subscribers: jfb, lldb-commits Differential Revision: https://reviews.llvm.org/D65864 llvm-svn: 368263
* Add support for deterministically linked binaries on macOS to lldb.Nico Weber2019-08-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When ld64 links a binary deterministically using the flag ZERO_AR_DATE, it sets a timestamp of 0 for N_OSO members in the symtab section, rather than the usual last modified date of the object file. Prior to this patch, lldb would compare the timestamp from the N_OSO member against the last modified date of the object file, and skip loading the object file if there was a mismatch. This patch updates the logic to ignore the timestamp check if the N_OSO member has timestamp 0. The original logic was added in https://reviews.llvm.org/rL181631 as a safety check to avoid problems when debugging if the object file was out of date. This was prior to the introduction of deterministic build in ld64. lld still doesn't support deterministic build. Other code in llvm already relies on and uses the assumption that a timestamp of 0 means deterministic build. For example, commit 9ccfddc39d4d27f9b16fcc72ab30d483151d6d08 adds similar timestamp checking logic to dsymutil, but special cases timestamp 0. Likewise, commit 0d1bb79a0413f221432a7b1d0d2d10c84c4bbb99 adds a long comment describing deterministic archive, which mostly uses timestamp 0 for determinism. Patch from Erik Chen <erikchen@chromium.org>! Differential Revision: https://reviews.llvm.org/D65826 llvm-svn: 368199
* ProcessElfCore: Remove linux and freebsd NT_*** constantsPavel Labath2019-08-072-46/+21
| | | | | | | These are already defined in llvm/BinaryFormat/ELF.h. Leaving the NetBSD and OpenBSD constants as-is, as they have no llvm counterparts. llvm-svn: 368168
* ObjectFileELF: Remove NT_*** constantsPavel Labath2019-08-071-36/+1
| | | | | | | llvm now has definitions of those in BinaryFormat/ELF.h. Use those instead. llvm-svn: 368159
* Detect HAVE_SYS_TYPES_H in lldbHaibo Huang2019-08-072-0/+4
| | | | | | | | | | | | | | | | Summary: After rL368069 I noticed that HAVE_SYS_TYPES_H is not defined in Platform.h, or anywhere else in lldb. This change fixes that. Reviewers: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65822 llvm-svn: 368125
* [lldb][NFC] Minor refactorings to (Clang)ExpressionSourceCodeRaphael Isemann2019-08-061-6/+6
| | | | llvm-svn: 368082
* [SymbolFile] Remove commented out methodAlex Langford2019-08-062-204/+0
| | | | llvm-svn: 368075
* Update LLDB to follow changes in llvm::DWARFDebugNames::NameIndex (4/5)Igor Kudrin2019-08-061-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D65640 llvm-svn: 368033
* ObjectFileELF: permit thread-local sections with overlapping file addressesPavel Labath2019-08-061-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In an attempt to make file-address-based lookups more predictable, in D55998 we started ignoring sections which would result in file address overlaps. It turns out this was too aggressive because thread-local sections typically will have file addresses which apear to overlap regular data/code. This does not cause a problem at runtime because thread-local sections are loaded into memory using special logic, but it can cause problems for lldb when trying to lookup objects by their file address. This patch changes ObjectFileELF to permit thread-local sections to overlap regular ones by essentially giving them a separate address space. It also makes them more symmetrical to regular sections by creating container sections from PT_TLS segments. Simultaneously, the patch changes the regular file address lookup logic to ignore sections with the thread-specific bit set. I believe this is what the users looking up file addresses would typically expect, as looking up thread-local data generally requires more complex logic (e.g. DWARF has a special opcode for that). Reviewers: clayborg, jingham, MaskRay Subscribers: emaste, aprantl, arichardson, lldb-commits Differential Revision: https://reviews.llvm.org/D65282 llvm-svn: 368010
* SymbolVendor: Remove passthrough methodsPavel Labath2019-08-064-29/+24
| | | | | | | | | | After the recent refactorings the SymbolVendor passthrough no longer serve any purpose. This patch removes those methods, and updates all callsites to go to the symbol file directly -- in most cases that just means calling GetSymbolFile()->foo() instead of GetSymbolVendor()->foo(). llvm-svn: 368001
* SymbolVendorELF: Perform build-id lookup even without a debug linkPavel Labath2019-08-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: The debug link and build-id lookups are two independent ways one can search for a separate symbol file. However, our implementation in SymbolVendorELF was tying the two together and refusing to look up the symbol file based on a build id if the file did not contain a debug link. This patch makes it possible to search for the symbol file with just one of the two methods available. To demonstrate, I split the build-id-case test into two, so that we test the search using both methods. Reviewers: jankratochvil, mgorny, clayborg, espindola, alexshap Subscribers: emaste, arichardson, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65561 llvm-svn: 367994
* [lldb][NFC] Remove unnecessary cast in ClangUserExpressionRaphael Isemann2019-08-061-5/+3
| | | | llvm-svn: 367989
* [Gardening] Remove dead code from ASTDumper (NFC)Jonas Devlieghere2019-08-061-4/+0
| | | | | | These functions are not referenced. llvm-svn: 367978
* [Gardening] Remove dead code from ScriptInterpreterPython (NFC)Jonas Devlieghere2019-08-062-24/+3
| | | | | | The terminal state is never saved or restored. llvm-svn: 367977
* [lldb][NFC] Document and refactor ↵Raphael Isemann2019-08-051-4/+16
| | | | | | ClangPersistentVariables::RemovePersistentVariable llvm-svn: 367936
* [lldb][NFC] Refactor ClangUserExpression::UpdateLanguageForExprRaphael Isemann2019-08-052-16/+21
| | | | | | | | | The UpdateLanguageForExpr should only update the language, but over time it started to do also do different things related to the generation of the expression source code. This patch refactors all the source code generation part into its own function. llvm-svn: 367922
* Changing representation of .cv_def_range directives in Codeview debug info ↵Nilanjana Basu2019-08-051-2/+2
| | | | | | assembly format for better readability llvm-svn: 367867
OpenPOWER on IntegriCloud