summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* DWARFIndex: s/ReportInvalidDIEOffset/ReportInvalidDIERefPavel Labath2019-06-147-27/+17
| | | | | | | | | | | | In a dwo/debug_types world, the die offset is not enough to uniquely idendify a debug info entry. Pass the the entire DIERef object instead. This is technically NFC, because only AppleIndex implemented this method (and there, the die offset *is* enough for unique identification). However, this makes the code simpler, and simplifies some of the follow-up patches. llvm-svn: 363373
* [C++20] add Basic consteval specifierGauthier Harnisch2019-06-142-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: this revision adds Lexing, Parsing and Basic Semantic for the consteval specifier as specified by http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1073r3.html with this patch, the consteval specifier is treated as constexpr but can only be applied to function declaration. Changes: - add the consteval keyword. - add parsing of consteval specifier for normal declarations and lambdas expressions. - add the whether a declaration is constexpr is now represented by and enum everywhere except for variable because they can't be consteval. - adapt diagnostic about constexpr to print constexpr or consteval depending on the case. - add tests for basic semantic. Reviewers: rsmith, martong, shafik Reviewed By: rsmith Subscribers: eraman, efriedma, rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61790 llvm-svn: 363362
* Make UniqueCStringMap work with non-default-constructible types and other ↵Pavel Labath2019-06-145-101/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | improvements/cleanups Summary: The motivation for this was me wanting to make the validity of dwarf DIERefs explicit (via llvm::Optional<DIERef>). This meant that the class would no longer have a default constructor. As the DIERef was being stored in a UniqueCStringMap, this meant that this container (like all standard containers) needed to work with non-default-constructible types too. This part is achieved by removing the default constructors for the map entry types, and providing appropriate comparison overloads so that we can search for map entries without constructing a dummy entry. While doing that, I took the opportunity to modernize the code, and add some tests. Functions that were completely unused are deleted. This required also some changes in the Symtab code, as it was default constructing map entries, which was not impossible even though its value type was default-constructible. Technically, these changes could be avoided with some SFINAE on the entry type, but I felt that the code is cleaner this way anyway. Reviewers: JDevlieghere, sgraenitz Subscribers: mgorny, aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D63268 llvm-svn: 363357
* Fixed typos in Log.hJonas Devlieghere2019-06-141-2/+2
| | | | | | | | Patch by: Yuya Fujita Differential revision: https://reviews.llvm.org/D63241 llvm-svn: 363356
* [NFC] Replace a plugin header with a non-plugin headerAlex Langford2019-06-131-1/+1
| | | | llvm-svn: 363338
* [CMake] Fix generated Xcode-project ignoring output directory setting for ↵Stefan Granitz2019-06-131-0/+6
| | | | | | | | | LLDB.framework Other generators honor the `LIBRARY_OUTPUT_DIRECTORY` target property, but apparently Xcode doesn't. So we call `set_output_directory()` as `llvm_add_library()` would do and this works. Note that `LIBRARY_OUTPUT_DIRECTORY` is still necessary, because it's used to store and read the target's absolute build directory (while `LLDB_FRAMEWORK_BUILD_DIR` is relative!). llvm-svn: 363280
* [CMake] Fix lldb-dotest for single-config generators in standalone buildsStefan Granitz2019-06-131-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D62859 llvm-svn: 363279
* [CMake] Add fallbacks for copying clang-resource-headers to LLDB.framework ↵Stefan Granitz2019-06-131-3/+25
| | | | | | in standalone builds llvm-svn: 363271
* DWARF: Don't create lldb CompileUnits for DWARF type unitsPavel Labath2019-06-1313-199/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Type units don't represent actual compilations and a lot of the operations that we do with lldb compile units (getting their line tables, variables, etc.) don't make sense for them. There is also a lot more of them (sometimes over 100x), so making them more lightweight pays off. The main change in this patch is that we stop creating lldb CompileUnits for DWARF type units. The trickiest part here is that the SymbolFile interface requires that we assign consecutive sequence IDs to the compile units we create. As DWARF type and compile units can come in any order (in v5), this means we can no longer use 1-1 mapping between DWARF and lldb compile units. Instead I build a translation table between the two indices. To avoid pessimizing the case where there are no type units, I build the translation table only in case we have at least one type unit. Additionaly, I also tried to strenghted type safete by replacing DWARFUnit with DWARFCompileUnit where applicable. Though that was not stricly necessary, I found it a good way to ensure that the transformations I am doing here make sense. In the places where I was changing the function signatures, and where it was obvious that the objects being handled were not null, I also replaced pointers with references. There shouldn't be any major functional change with this patch. The only change I observed is that now the types in the type units will not be parsed when one calls Module::ParseAllDebugSymbols, unless they are referenced from other compile units. This makes sense, given how ParseAllDebugSymbols is implemented (it iterates over all compile units), and it only matters for one hand-writted test where I did not bother to reference the types from the compile units (which I now do). Reviewers: clayborg, JDevlieghere, aprantl Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D63005 llvm-svn: 363250
* [Reproducers] Remove call to lldb_private::GetVersion()Jonas Devlieghere2019-06-131-2/+1
| | | | | | | | Utility doesn't link against lldbBase so we cannot call GetVersion in keep. I already added a string member m_version to deal with that, but the call was still there. llvm-svn: 363228
* [Reproducers] Include lldb version in the reproducer rootJonas Devlieghere2019-06-134-5/+43
| | | | | | | | | | | Generally, reproducers are rev-locked to the version of LLDB, so it's valuable to have the LLDB version in the reproducer. For now I just want the information to be present, without enforcing it, but I envision emitting a warning during replay in the future. Differential revision: https://reviews.llvm.org/D63229 llvm-svn: 363225
* [Reproducers] Simplify providers with nested Info struct (NFC)Jonas Devlieghere2019-06-128-52/+41
| | | | | | | | | This replaces the `info` typedef with a nested struct named Info. This means we now have FooProvider and FooProvider::Info, instead of two related but separate classes FooProvider and FooInfo. This change is mostly cosmetic. llvm-svn: 363211
* Re-land r363103 ("When reading ObjC class table, use new SPI if it is avail")Jason Molenda2019-06-121-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | with a call to snprintf() to find the size of the formatted string, malloc memory, then snprintf again to format it into the buffer, instead of calling asprintf. Orig commit msg: When reading ObjC class table, use new SPI if it is avail In the latest OS betas, the objc runtime has a special interface for the debugger, class_getNameRaw(), instead of the existing class_getName(), which will return class names in their raw, unmangled (in the case of swift) form. When lldb can access the unmangled names of classes, it won't need to fetch them out of the inferior process after we run our "get the objc class table" expression. If the new interface is absent (debugging a process on an older target), lldb will fall back to class_getName and reading any class names that it got back in demangled form, at a bit of a performance cost on the first expression. <rdar://problem/50688054> llvm-svn: 363206
* Skip failing test on older versions of clang.Adrian Prantl2019-06-121-0/+1
| | | | llvm-svn: 363202
* [Expression] Add PersistentExpressionState::GetCompilerTypeFromPersistentDeclAlex Langford2019-06-126-36/+93
| | | | | | | | | | | | | | | | Summary: PersistentStateExpressions (e.g. ClangPersistentVariables) have the ability to define types using expressions that persist throughout the debugging session. GetCompilerTypeFromPersistentDecl is a useful operation to have if you need to use any of those persistently declared types, like in CommandObjectMemory. This decouples clang from CommandObjectMemory and decouples Plugins from Commands in general. Differential Revision: https://reviews.llvm.org/D62797 llvm-svn: 363183
* [lldb] Ignore null frames in lldb.macosx crashlogStefan Granitz2019-06-121-0/+4
| | | | llvm-svn: 363172
* [CMake] Two extra FOLDER properties for debugserverStefan Granitz2019-06-121-0/+4
| | | | llvm-svn: 363171
* Recognise debug_types.dwo as a debug info sectionPavel Labath2019-06-126-0/+13
| | | | | | This is a preparatory patch to allow reading type units from dwo files. llvm-svn: 363146
* DWARF: Share line tables of type unitsPavel Labath2019-06-1212-105/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch creates a cache of file lists in line tables referenced by type units. This cache is used to avoid parsing a line table twice (since a file list will generally be shared by many type units). It also sets things up in a way that parsing of DW_AT_decl_file attributes will keep working even when we stop creating lldb compile units for dwarf type units, but it stops short of actually doing that. This means that the request for files now go directly to SymbolFileDWARF instead of being routed there indirectly via the lldb_private::CompileUnit class. As a result of this, a number of occurences of SymbolContext variables in DWARFASTParserClang have become unused, so I remove them. This patch reduces the number of times a file list is being parsed, but the situation is still suboptimal, as the parsed list is being copied multiple times. This will be fixed when we stop creating CompileUnits for DWARF type units. Reviewers: clayborg, aprantl, JDevlieghere Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62894 llvm-svn: 363143
* [LLDB] Fix FreeBSD buildDavid Carlier2019-06-121-1/+1
| | | | | | | | | | | | The auxiliary vector method had the wrong signature. Reviewers: MaskRay, teemperor, aadsm Reviewed By: MaskRay, teemperor Differential Revision: https://reviews.llvm.org/D63187 llvm-svn: 363135
* Back out r363103 ("When reading ObjC class table, use new SPI if it is avail")Jason Molenda2019-06-121-50/+4
| | | | | | because it breaks the windows bot - asprintf() is not available. llvm-svn: 363115
* [LanguageRuntime] Simplify CreateExceptionSearchFilter in derived classesAlex Langford2019-06-114-12/+7
| | | | llvm-svn: 363109
* When reading ObjC class table, use new SPI if it is availJason Molenda2019-06-111-4/+50
| | | | | | | | | | | | | | | | | | In the latest OS betas, the objc runtime has a special interface for the debugger, class_getNameRaw(), instead of the existing class_getName(), which will return class names in their raw, unmangled (in the case of swift) form. When lldb can access the unmangled names of classes, it won't need to fetch them out of the inferior process after we run our "get the objc class table" expression. If the new interface is absent (debugging a process on an older target), lldb will fall back to class_getName and reading any class names that it got back in demangled form, at a bit of a performance cost on the first expression. <rdar://problem/50688054> llvm-svn: 363103
* Update AuxVector.cppJason Molenda2019-06-111-6/+4
| | | | llvm-svn: 363102
* Fix a crash in option parsing.Adrian Prantl2019-06-113-0/+9
| | | | | | | | | | | The call to getopt_long didn't handle the case where the *last* option had an argument missing. <rdar://problem/51231882> Differential Revision: https://reviews.llvm.org/D63110 llvm-svn: 363101
* Add support to read aux vector valuesAntonio Afonso2019-06-1118-206/+149
| | | | | | | | | | | | | | | | | | | | Summary: This is the second patch to improve module loading in a series that started here (where I explain the motivation and solution): https://reviews.llvm.org/D62499 I need to read the aux vector to know where the r_debug map with the loaded libraries are. The AuxVector class was made generic so it could be reused between the POSIX-DYLD plugin and NativeProcess*. The class itself ended up in the ProcessUtility plugin. Reviewers: clayborg, xiaobai, labath, JDevlieghere Reviewed By: clayborg, labath, JDevlieghere Subscribers: emaste, JDevlieghere, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62500 llvm-svn: 363098
* [Target] Use llvm::scope_exit to restore m_suppress_stop_hooks value.Tatyana Krasnukha2019-06-101-4/+5
| | | | llvm-svn: 362985
* [Target][NFC] Rename GetCPPLanguageRuntime to GetAlex Langford2019-06-102-3/+2
| | | | | | | This is a followup to rL362981, in which I moved GetObjCLanguageRuntime from Process to ObjCLanguageRuntime, renaming it to Get along the way. llvm-svn: 362984
* Create a generic handler for Xfer packetsAntonio Afonso2019-06-109-67/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the first of a few patches I have to improve the performance of dynamic module loading on Android. In this first diff I'll describe the context of my main motivation and will then link to it in the other diffs to avoid repeating myself. ## Motivation I have a few scenarios where opening a specific feature on an Android app takes around 40s when lldb is attached to it. The reason for that is because 40 modules are dynamicly loaded at that point in time and each one of them is taking ~1s. ## The problem To learn about new modules we have a breakpoint on a linker function that is called twice whenever a module is loaded. One time just before it's loaded (so lldb can check which modules are loaded) and another right after it's loaded (so lldb can check again which ones are loaded and calculate the diference). It's figuring out which modules are loaded that is taking quite some time. This is currently done by traversing the linked list of loaded shared libraries that the linker maintains in memory. Each item in the linked list requires its own `x` packet sent to the gdb server (this is android so the network also plays a part). In my scenario there are 400+ loaded libraries and even though we read 0x800 worth of bytes at a time we still make ~180 requests that end up taking 150-200ms. We also do this twice, once before the module is loaded (state = eAdd) and another right after (state = eConsistent) which easly adds up to ~400ms per module. ## A solution **Implement `xfer:libraries-svr4` in lldb-server:** I noticed in the code that loads the new modules that it had support for the `xfer:libraries-svr4` packet (added ~4 years ago to support the ds2 debug server) but we didn't support it in lldb-server. This single packet returns an xml list of all the loaded modules by the process. The advantage is that there's no more need to make 180 requests to read the linked list. Additionally this new requests takes around 10ms. **More efficient usage of the `xfer:libraries-svr4` packet in lldb:** When `xfer:libraries-svr4` is available the Process class has a `LoadModules` function that requests this packet and then loads or unloads modules based on the current list of loaded modules by the process. This is the function that is used by the DYLDRendezvous class to get the list of loaded modules before and after the module is loaded. However, this is really not needed since the LoadModules function already loaded or unloaded the modules accordingly. I changed this strategy to call LoadModules only once (after the process has loaded the module). **Bugs** I found a few issues in lldb while implementing this and have submitted independent patches for them. I tried to devide this into multiple logical patches to make it easier to review and discuss. ## Tests I wanted to put these set of diffs up before having all the tests up and running to start having them reviewed from a techical point of view. I'm also having some trouble making the tests running on linux so I need more time to make that happen. # This diff The `xfer` packages follow the same protocol, they are requested with `xfer:<object>:<read|write>:<annex>:<offset,length>` and a return that starts with `l` or `m` depending if the offset and length covers the entire data or not. Before implementing the `xfer:libraries-svr4` I refactored the `xfer:auxv` to generically handle xfer packets so we can easly add new ones. The overall structure of the function ends up being: * Parse the packet into its components: object, offset etc. * Depending on the object do its own logic to generate the data. * Return the data based on its size, the requested offset and length. Reviewers: clayborg, xiaobai, labath Reviewed By: labath Subscribers: mgorny, krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62499 llvm-svn: 362982
* [Target] Remove Process::GetObjCLanguageRuntimeAlex Langford2019-06-1025-68/+61
| | | | | | | | | | | Summary: In an effort to make Process more language agnostic, I removed GetCPPLanguageRuntime from Process. I'm following up now with an equivalent change for ObjC. Differential Revision: https://reviews.llvm.org/D63052 llvm-svn: 362981
* ABI: reflow the table text (NFC)Saleem Abdulrasool2019-06-101-954/+84
| | | | | | | Reflow the text for the table to make the table legible. This is purely cosmetic, but makes understanding the contents of the table easier. NFCI. llvm-svn: 362961
* Breakpad: Add support for the arm64e "architecture"Pavel Labath2019-06-103-1/+7
| | | | llvm-svn: 362960
* Add "REQUIRES: x86" to DWARF assembly testsPavel Labath2019-06-1017-10/+26
| | | | | | | These tests don't require an x86 host, but they do require that we build the x86 llvm target. llvm-svn: 362948
* [lldb] [Process/NetBSD] Fix error handling in register operationsMichal Gorny2019-06-102-38/+18
| | | | | | | | | | Ensure that errors are passed through correctly when performing register read/write operations. Currently, any ptrace() errors are silently discarded and LLDB behaves as if operation was successful. Differential Revision: https://reviews.llvm.org/D63054 llvm-svn: 362946
* [Target] Remove unused header from ProcessAlex Langford2019-06-081-1/+0
| | | | | | | I forgot to remove this when I removed GetCPPLanguageRuntime from Process llvm-svn: 362885
* [LanguageRuntime] Introduce LLVM-style castsAlex Langford2019-06-0826-113/+128
| | | | | | | | | | | | Summary: Using llvm-style rtti gives us stronger guarantees around casting LanguageRuntimes. As discussed in D62755 Differential Revision: https://reviews.llvm.org/D62934 llvm-svn: 362884
* Revert "DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit"Alex Langford2019-06-081-1/+9
| | | | | | | | | This reverts commit 58afc1bdebf9fa8b178d6c9d89af94c5cc091760. This commit caused the test suite on macOS to fail many tests. It appears that setting breakpoints is the issue. One example that fails is the lit test Breakpoint/case-sensitive.test. llvm-svn: 362862
* NFC: Fix typo in a cmake messageAdrian McCarthy2019-06-071-1/+1
| | | | llvm-svn: 362845
* Fix lit tests on Windows related to CR+LFAdrian McCarthy2019-06-072-3/+4
| | | | | | | | | | | | | | | | | | | | | Problem discovered in the breakpoint lit test, but probably exists in others. lldb-test splits lines on LF. Input files that are CR+LF separated (as is common on Windows) then resulted in commands being sent to LLDB that ended in CR, which confused the command interpreter. This could be fixed at different levels: 1. Treat '\r' like a tab or space in the argument splitter. 2. Fix the line splitters (plural) in lldb-test. 3. Normalize the test files to LF only. If we did only 3, I'd expect similar problems to recur, so this patch does 1 and 2. I may also do 3 in a separate patch later, but that's tricky because I believe we have some input files that MUST use CR+LF. Differential Revision: https://reviews.llvm.org/D62759 llvm-svn: 362844
* [lldb] Fix msan use-of-uninitialized-value in DWARFDebugLine::FileNameEntry.Jorge Gorbe Moya2019-06-071-1/+2
| | | | | | | | lldb/lit/SymbolFile/DWARF/debug-types-expressions.test fails with msan. This change fixes the issue by ensuring FileNameEntry::checksum is always default-initialized. llvm-svn: 362843
* [CMake] Add special case for processing LLDB_DOTEST_ARGSStefan Granitz2019-06-072-3/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Allow to run the test suite when building LLDB Standalone with Xcode against a provided LLVM build-tree that used a single-configuration generator like Ninja. So far both test drivers, lit-based `check-lldb` as well as `lldb-dotest`, were looking for test dependencies (clang/dsymutil/etc.) in a subdirectory with the configuration name (Debug/Release/etc.). It was implicitly assuming that both, LLDB and the provided LLVM used the same generator. In practice, however, the opposite is quite common: build the dependencies with Ninja and LLDB with Xcode for development*. With this patch it becomes the default. (* In fact, it turned out that the Xcode<->Xcode variant didn't even build out of the box. It's fixed since D62879) Once this is sound, I'm planning the following steps: * add stage to the [lldb-cmake-standalone bot](http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-standalone/) to build and test it * update `Building LLDB with Xcode` section in the docs * bring the same mechanism to swift-lldb * fade out the manually maintained Xcode project On macOS build and test like this: ``` $ git clone https://github.com/llvm/llvm-project.git /path/to/llvm-project $ cd /path/to/lldb-dev-deps $ cmake -GNinja -C/path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi" /path/to/llvm-project/llvm $ ninja $ cd /path/to/lldb-dev-xcode $ cmake -GXcode -C/path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake -DLLDB_BUILD_FRAMEWORK=Off -DLLVM_DIR=/path/to/lldb-dev-deps/lib/cmake/llvm -DClang_DIR=/path/to/lldb-dev-deps/lib/cmake/clang /path/to/llvm-project/lldb $ xcodebuild -configuration Debug -target check-lldb $ xcodebuild -configuration Debug -target lldb-dotest $ ./Debug/bin/lldb-dotest ``` Reviewers: JDevlieghere, jingham, xiaobai, stella.stamenova, labath Reviewed By: stella.stamenova Subscribers: labath, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62859 llvm-svn: 362803
* Fix some signed/unsigned comparison warningsPavel Labath2019-06-071-8/+8
| | | | llvm-svn: 362784
* DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnitPavel Labath2019-06-071-9/+1
| | | | | | | | | | | | | | | | | Summary: The DWARFCompileUnit is set as the "user data" of the lldb compile unit directly in the constructor (see ParseCompileUnit). This means that instead of going through unit indexes, we can just fetch the DWARF unit directly from there. Reviewers: clayborg, JDevlieghere Subscribers: aprantl, jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62943 llvm-svn: 362783
* [NativeProcessDarwin] Remove dead code. NFCI.Davide Italiano2019-06-051-8/+0
| | | | llvm-svn: 362639
* [DynamicLoader] Make sure we always set the rendezvous breakpointAntonio Afonso2019-06-051-5/+8
| | | | | | | | | | | | | | | | | | | Summary: Once we've attached to the process we load all current modules and also set a breakpoint at the rendezvous break address. However, we don't do this if we already have a load address for the image info address (e.g.: DT_DEBUG on ELF). This code was added 4 years ago when adding support for `$qXfer:Libraries:` packet (https://reviews.llvm.org/D9471) but its intention is not 100% clear to me. It seems to me we're using that check to know if the modules have already been loaded (which they have if `$qXfer:Libraries:` is supported by the gdb server) and skip loading the modules again in the following `if` block. The problem is that we also skip setting the Rendezvous breakpoint so we stop knowing when the process loads new modules. I fix this by moving the call to set the breakpoint to the end of the function so we always call it as long as we have a valid executable. Reviewers: ADodds, clayborg, eugene, labath Reviewed By: eugene, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62168 llvm-svn: 362619
* [CMake] Add configuration dirs as potential locations for llvm-lit and ↵Stefan Granitz2019-06-051-3/+16
| | | | | | | | | | | | | | | | | | | | llvm-tblgen in standalone builds Summary: If the provided LLVM build-tree used a multi-configuration generator like Xcode, `LLVM_TOOLS_BINARY_DIR` will have a generator-specific placeholder to express `CMAKE_CFG_INTDIR`. Thus `llvm-lit` and `llvm-tblgen` won't be found. D62878 exports the actual configuration types so we can fix the path and add them to the search paths for `find_program()`. Reviewers: xiaobai, labath, stella.stamenova Reviewed By: xiaobai, stella.stamenova Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62879 llvm-svn: 362589
* Ignore DIEs in the skeleton unit in a DWO scenarioPavel Labath2019-06-052-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r362103 exposed a bug, where we could read incorrect data if a skeleton unit contained more than the single unit DIE. Clang emits these kinds of units with -fsplit-dwarf-inlining (which is also the default). Changing lldb to handle these DIEs is nontrivial, as we'd have to change the UID encoding logic to be able to reference these DIEs, and fix up various places which are assuming that all DIEs come from the separate compile unit. However, it turns out this is not necessary, as the DWO unit contains all the information that the skeleton unit does. So, this patch just skips parsing the extra DIEs if we have successfully found the DWO file. This enforces the invariant that the rest of the code is already operating under. This patch fixes a couple of existing tests, but I've also included a simpler test which does not depend on execution of binaries, and would have helped us in catching this sooner. Reviewers: clayborg, JDevlieghere, aprantl Subscribers: probinson, dblaikie, lldb-commits Differential Revision: https://reviews.llvm.org/D62852 llvm-svn: 362586
* Fix -Wsign-compare by explicit cast after r362557Fangrui Song2019-06-051-1/+1
| | | | llvm-svn: 362570
* Call abs to avoid signed/unsigned comparison warning.Jason Molenda2019-06-041-1/+1
| | | | llvm-svn: 362557
* [Target] Remove Process::GetCPPLanguageRuntimeAlex Langford2019-06-046-15/+8
| | | | | | | | | | | | | | | | | | | | | Summary: I want to remove this method because I think that Process should be language agnostic, or at least, not have knowledge about specific language runtimes. There is "GetLanguageRuntime()" which should be used instead. If the caller a CPPLanguageRuntime, they should cast it as needed. Ideally, this should only happen in plugins that need C++ specific knowledge. The next step I would like to do is remove "GetObjCLanguageRuntime()" as well. There are a lot more instances of that function being used, so I wanted to upload this one first to get the general reception to this idea. Reviewers: compnerd, davide, JDevlieghere, jingham, clayborg, labath, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D62755 llvm-svn: 362544
OpenPOWER on IntegriCloud