summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] [ARM] Use r11 as frame pointer on Windows on ARMMartin Storsjö2019-11-294-2/+152
| | | | | | | Extend EmulateMOVRdRm to identify "mov r11, sp" in thumb mode as setting the frame pointer, if r11 is the frame pointer register. Differential Revision: https://reviews.llvm.org/D70797
* [lldb][NFC] Remove unused ClangASTContext::GetBasicType(ConstString)Raphael Isemann2019-11-292-7/+0
|
* [lldb][NFC] Remove ClangASTContext::GetBuiltinTypeForEncodingAndBitSize overloadRaphael Isemann2019-11-294-59/+41
|
* [lldb][NFC] Explicitly ask for a ClangASTContext in ClangASTSourceRaphael Isemann2019-11-295-31/+25
| | | | | | | | | | | ClangASTSource currently takes a clang::ASTContext and keeps that around, but a lot of LLDB's functionality for doing operations on a clang::ASTContext is in its ClangASTContext twin class. We currently constantly recompute the respective ClangASTContext from the clang::ASTContext while we instead could just pass and store a ClangASTContext in the ClangASTSource. This also allows us to get rid of a bunch of unreachable error checking for cases where recomputation fails for some reason.
* [lldb][NFC] Early exit in ClangASTContext::CreateInstanceRaphael Isemann2019-11-291-41/+41
|
* [lldb] Fix windows build for 38870afPavel Labath2019-11-291-1/+1
|
* [lldb][NFC] Simplify regex_chars in CommandCompletionsRaphael Isemann2019-11-291-4/+1
|
* [lldb][NFC] Remove dead logging code from ↵Raphael Isemann2019-11-291-70/+1
| | | | | | | | | DWARFASTParserClang::CompleteRecordType This code is behind a `if (log)` that is always a nullptr as the initializer was commented out. One could uncomment the initializer code, but then this logging code just leads to a deadlock as it tries to aquire the module lock. This removes the logging code until I get this working again.
* [lldb] Remove FileSpec->CompileUnit inheritancePavel Labath2019-11-2922-76/+82
| | | | | | | | | | | | | | | | | | | | | | | Summary: CompileUnit is a complicated class. Having it be implicitly convertible to a FileSpec makes reasoning about it even harder. This patch replaces the inheritance by a simple member and an accessor function. This avoid the need for casting in places where one needed to force a CompileUnit to be treated as a FileSpec, and does not add much verbosity elsewhere. It also fixes a bug where we were wrongly comparing CompileUnit& and a CompileUnit*, which compiled due to a combination of this inheritance and the FileSpec*->FileSpec implicit constructor. Reviewers: teemperor, JDevlieghere, jdoerfert Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70827
* [lldb][NFC] Fix header guard comment in ThreadSafeDenseMap.hRaphael Isemann2019-11-291-1/+1
|
* [lldb] NFC: refactor CompileUnit::ResolveSymbolContextKonrad Kleine2019-11-284-91/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I found the above named method hard to read because it had a) many nested blocks, b) one return statement at the end with some logic involved, c) a duplicated while-loop with just small differences in it. I decided to refactor this function by employing an early exit strategy. In order to capture the logic in the return statement and to not have it repeated more than once I chose to implement a very small lamda function that captures all the variables it needs. I also replaced the two while-loops with just one. This is a non-functional change (NFC). Reviewers: jdoerfert, teemperor Reviewed By: teemperor Subscribers: labath, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70774
* [LLDB] On Windows, force error message formatting to EnglishAlexandre Ganea2019-11-281-1/+10
| | | | | | This fixes the Utility/StatusTest.ErrorWin32 unit test on non-English locales. Differential Revision: https://reviews.llvm.org/D70442
* [LLDB] Fix wrong argument in CommandObjectThreadStepWithTypeAndScopeAlexandre Ganea2019-11-281-1/+1
| | | | Differential Revision: https://reviews.llvm.org/D70448
* [lldb][NFC] Remove CompilerDeclContext::IsClangRaphael Isemann2019-11-284-13/+9
| | | | | | | This method is only used in ClangASTContext. Also removes the includes we only needed for the ClangASTContext RTTI check in the CompilerDecl[Context].cpp files.
* [lldb][NFC] Remove unused variable in ClangASTSource::CompleteTypeRaphael Isemann2019-11-281-1/+0
| | | | | Now that CompilerDeclContext is a trivial class, Clang started warning that this unused variable is in fact unused. Let's remove it.
* [lldb][NFC] Simplify CompilerDecl and CompilerDeclContext initializationRaphael Isemann2019-11-282-10/+6
|
* [lldb][NFC] Remove unused CompilerDecl::IsClangRaphael Isemann2019-11-282-6/+0
|
* [lldb] refactor FileSpec::EqualPavel Labath2019-11-281-13/+3
| | | | | The logic of this function was quite hard to follow. Replace it with a much simpler, equivalent, implementation.
* [lldb] Add FileSpec::Equal unit testsPavel Labath2019-11-281-0/+20
| | | | this is in preparation of a refactor of this method.
* [lldb] Simplify and improve FileSpecTestPavel Labath2019-11-281-24/+24
| | | | | | | | | | | | | | | | | | Summary: A most of these tests create FileSpecs with a hardcoded style. Add utility functions which create a file spec of a given style to simplify things. While in there add SCOPED_TRACE messages to tests which loop over multiple inputs to ensure it's clear which of the inputs failed. Reviewers: teemperor Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70814
* Revert "[lldb] NFC: refactor CompileUnit::ResolveSymbolContext"Raphael Isemann2019-11-284-71/+90
| | | | | | This reverts commit 373e2a4f69d623e59329ff801f261d8b299e12d2. This broke breakpoint setting.
* [lldb][NFC] Remove unused STLUtil include and STLUtil.h headerRaphael Isemann2019-11-282-27/+0
|
* [lldb][NFC] Use llvm::StringRef instead of C-strings as multimap keyRaphael Isemann2019-11-281-10/+5
|
* [lldb] NFC: refactor CompileUnit::ResolveSymbolContextKonrad Kleine2019-11-284-90/+71
| | | | | | | | | | | | | | | | | | | | | | | Summary: I found the above named method hard to read because it had a) many nested blocks and b) one return statement at the end with some logic involved. I decided to refactor this function by employing an early exit strategy. In order to capture the logic in the return statement and to not have it repeated more than once I chose to implement a very small lamda function that captures all the variables it needs. This is a non-functional change (NFC). Reviewers: jdoerfert Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70774
* [lldb][NFC] Remove unused CStringToDIEMap typedefRaphael Isemann2019-11-281-6/+0
|
* [lldb][NFC] Remove forward declaration of PrivateAutoCompleteMembersRaphael Isemann2019-11-281-7/+0
| | | | That's declared directly above the actual definition, so it serves no use.
* [lldb][NFC] Make GetAsCXXRecordDecl staticRaphael Isemann2019-11-281-1/+2
| | | | | All other casting functions there are static, so this should be too.
* [LLDB] [test] Add a missing "REQUIRES: arm" lineMartin Storsjö2019-11-281-0/+2
|
* [lldb][NFC] Split up DWARFASTParserClang::CompleteTypeFromDWARFRaphael Isemann2019-11-282-222/+243
| | | | | Moving the different parts into their own functions without any additional cleanup/refactoring, so this is NFC.
* [LLDB] Always interpret arm instructions as thumb on windowsMartin Storsjö2019-11-282-0/+95
| | | | | | | | Windows on ARM always uses thumb mode, and doesn't have most of the mechanisms that are used in e.g. ELF for distinguishing between arm and thumb. Differential Revision: https://reviews.llvm.org/D70796
* [LLDB] [PECOFF] Look for the truncated ".eh_fram" section nameMartin Storsjö2019-11-282-1/+94
| | | | | | | | | | | | | | COFF section names can either be stored truncated to 8 chars, in the section header, or as a longer section name, stored separately in the string table. libunwind locates the .eh_frame section by runtime introspection, which only works for section names stored in the section header (as the string table isn't mapped at runtime). To support this behaviour, lld always truncates the section names for sections that will be mapped, like .eh_frame. Differential Revision: https://reviews.llvm.org/D70745
* [LLDB] [PECOFF] Factorize mapping section names to types using StringSwitch. ↵Martin Storsjö2019-11-282-98/+75
| | | | | | | | | NFCI. Keep the existing special cases based on combinations of section name, flags and sizes/offsets. Differential Revision: https://reviews.llvm.org/D70778
* [lldb] Remove debugging code used for LLDB_DWARF_DONT_COMPLETE_TYPENAMESRaphael Isemann2019-11-281-33/+0
| | | | | | | | | | | | Reviewers: labath, clayborg, shafik Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70802
* [lldb][NFC] Move TypeSystem RTTI to static variable to remove swift referenceRaphael Isemann2019-11-276-53/+17
|
* [lldb][NFC] Remove unused CompilerType memory functionsRaphael Isemann2019-11-272-175/+0
| | | | | | | | | | | | | | | | Summary: All these functions are unused from what I can see. Unless I'm missing something here, this code can go the way of the Dodo. Reviewers: labath Reviewed By: labath Subscribers: abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70770
* [LLDB] Avoid using InitializeContext for zero-initializing a CONTEXT. NFC.Martin Storsjö2019-11-271-9/+2
| | | | | | | | | | | | | | | | | | InitializeContext is useful for allocating a (potentially variable size) CONTEXT struct in an unaligned byte buffer. In this case, we already have a fixed size CONTEXT we want to initialize, and we only used this as a very roundabout way of zero initializing it. Instead just memset the CONTEXT we have, and set the ContextFlags field manually. This matches how it is done in NativeRegisterContextWindows_*.cpp. This also makes LLDB run successfully in Wine (for a trivial tested case at least), as Wine hasn't implemented the InitializeContext function. Differential Revision: https://reviews.llvm.org/D70742
* [lldb][NFC] Early exit in DWARFASTParserClang::ParseArrayTypeRaphael Isemann2019-11-271-74/+74
|
* Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first ↵Eric Christopher2019-11-2610-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | pass at the O1 described there."" This reapplies: 8ff85ed905a7306977d07a5cd67ab4d5a56fafb4 Original commit message: As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there. This change doesn't include any change to move from selection dag to fast isel and that will come with other numbers that should help inform that decision. There also haven't been any real debuggability studies with this pipeline yet, this is just the initial start done so that people could see it and we could start tweaking after. Test updates: Outside of the newpm tests most of the updates are coming from either optimization passes not run anymore (and without a compelling argument at the moment) that were largely used for canonicalization in clang. Original post: http://lists.llvm.org/pipermail/llvm-dev/2019-April/131494.html Tags: #llvm Differential Revision: https://reviews.llvm.org/D65410 This reverts commit c9ddb02659e3ece7a0d9d6b4dac7ceea4ae46e6d.
* [lldb] [test] Un-XFAIL lldb-server tests fixed on NetBSDMichał Górny2019-11-261-2/+0
|
* [lldb] Avoid snprintf in PlatformRemoteDarwinDevicePavel Labath2019-11-261-19/+14
| | | | This quashes a -Wformat-truncation warning.
* [lldb][NFC] Modernize string handling in DWARFASTParserClang::ParseTypeModifierRaphael Isemann2019-11-261-22/+16
|
* [lldb] Use llvm::format in AppleObjCRuntimeV2.cppPavel Labath2019-11-261-8/+2
| | | | Crushing a "sprintf" buffer is null warning.
* [lldb] fix a -Wcast-qual warningPavel Labath2019-11-261-1/+1
|
* [lldb] remove a superfluous semicolonPavel Labath2019-11-261-1/+1
|
* [lldb] remove unsigned Stream::operator<< overloadsPavel Labath2019-11-268-85/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I recently re-discovered that the unsinged stream operators of the lldb_private::Stream class have a surprising behavior in that they print the number in hex. This is all the more confusing because the "signed" versions of those operators behave normally. Now that, thanks to Raphael, each Stream class has a llvm::raw_ostream wrapper, I think we should delete most of our formatting capabilities and just delegate to that. This patch tests the water by just deleting the operators with the most surprising behavior. Most of the code using these operators was printing user_id_t values. It wasn't fully consistent about prefixing them with "0x", but I've tried to consistenly print it without that prefix, to make it more obviously different from pointer values. Reviewers: teemperor, JDevlieghere, jdoerfert Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70241
* [lldb/symbolvendorelf] Copy more sections from separate debug filesPavel Labath2019-11-262-10/+83
| | | | Include the fancier DWARF5 sections too.
* [lldb][NFC] Remove no longer unused variable in ↵Raphael Isemann2019-11-261-1/+0
| | | | DWARFASTParserClang::ParseTypeFromDWARF
* [lldb][NFC] Simplify structure parsing code in ↵Raphael Isemann2019-11-261-4/+2
| | | | | | | | DWARFASTParserClang::ParseTypeFromDWARF This way it looks more like the code around it. The assert is also gone as it just checks that the variables we declare directly above were not initialized by anyone. That made more sense when this was one large function.
* [lldb] Add boilerplate to recognize the .debug_rnglists.dwo sectionPavel Labath2019-11-267-1/+22
|
* [lldb][NFC] Extract type modifier parsing from ↵Raphael Isemann2019-11-262-208/+226
| | | | | | DWARFASTParserClang::ParseTypeFromDWARF Part of the work to split up this monolithic parsing function.
OpenPOWER on IntegriCloud