summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-101-1/+1
| | | | llvm-svn: 362960
* [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
* [LanguageRuntime] Introduce LLVM-style castsAlex Langford2019-06-0819-108/+97
| | | | | | | | | | | | 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
* [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
* 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
* Ignore DIEs in the skeleton unit in a DWO scenarioPavel Labath2019-06-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-2/+3
| | | | | | | | | | | | | | | | | | | | | 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
* [ABI] Fix SystemV ABI to handle nested aggregate type returned in registerAlex Langford2019-06-041-48/+88
| | | | | | | | | | Add a function to flatten the nested aggregate type Differential Revision: https://reviews.llvm.org/D62702 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 362543
* [lldb] Fix out-of-bounds read after c3ea7c66fec021867e005ad1b02f3c7e80feaa85James Y Knight2019-06-041-1/+1
| | | | | | | | "Add support for mid-function epilogues on x86 that end in a non-local jump." Detected by asan. llvm-svn: 362510
* Add support for mid-function epilogues on x86 that end in a non-local jump.Jason Molenda2019-06-032-19/+257
| | | | | | | | | | | | | | | | | | | | | | | | | The x86 assembly inspection engine has code to support detecting a mid-function epilogue that ends in a RET instruction; add support for recognizing an epilogue that ends in a JMP, and add a check that the unwind state has been restored to the original stack setup; reinstate the post-prologue unwind state after this JMP instruction. The assembly inspection engine used for other architectures, UnwindAssemblyInstEmulation, detects mid-function epilogues by tracking branch instructions within the function and "forwards" the current unwind state to the targets of the branches. If an epilogue unwinds the stack and exits, followed by a branch target, we get back to the correct unwind state. The x86 unwinder should move to this same algorithm, or possibly even look at implementing an x86 instruction emulation plugin and get UnwindAssemblyInstEmulation to work for x86 too. I added a branch instruction recognizier method that will be necessary if we want to switch the algorithm. Differential Revision: https://reviews.llvm.org/D62764 <rdar://problem/51074422> llvm-svn: 362456
* [COFF, ARM64] Fix CodeView API change for getRegisterNamesTom Tan2019-06-031-1/+12
| | | | | | | | | Change rL362280 changed CodeView API getRegisterNames() by adding an input parameter in CPUType. It is called in LLDB and needs to be updated. Differential Revision: https://reviews.llvm.org/D62772 llvm-svn: 362349
* Make CPlusPlusNameParser robust against nullptr StringRefs.Adrian Prantl2019-05-311-0/+2
| | | | | | | | | | There is likely also an underlying bug in all code that calls CPlusPlusNameParser with nullptrs, but this patch can also stand for itself. rdar://problem/49072829 llvm-svn: 362177
* Make ConnectionFileDescription work with all socketsAntonio Afonso2019-05-301-12/+11
| | | | | | | | | | | | | | | | | | | | | Summary: My main goal here is to make lldb-server work with Android Studio. This is currently not the case because lldb-server is started in platform mode listening on a domain socket. When Android Studio connects to it lldb-server crashes because even though it's listening on a domain socket as soon as it gets a connection it asserts that it's a TCP connection, which will obviously fails for any non-tcp connection. To do this I came up with a new method called GetConnectURI() in Socket that returns the URI needed to connect to the connected portion of the socket. Reviewers: labath, clayborg, xiaobai Reviewed By: labath Subscribers: mgorny, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62089 llvm-svn: 362173
* Code and comment cleanups [NFC]Greg Clayton2019-05-302-51/+44
| | | | | | | | | Changes: - update comments to detail the info can come from .debug_info or .debug_types - Rename "debug_info_data" to "data" now that we can get data from .debug_info or .debug_types. - Also call DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(...) instead of manually grabbing abbreviation. llvm-svn: 362116
* Fix a regression in DWARF access speed caused by svn revision 356190Greg Clayton2019-05-302-8/+10
| | | | | | | | | | | | | | The issue was caused by the error checking code that was added. It was incorrectly adding an extra abbreviation when DWARFEnumState::Complete was received since it would push an extra abbreviation onto the list with the abbreviation code of zero. This cause m_idx_offset in each DWARFAbbreviationDeclarationSet to be set to UINT32_MAX. This valid indicates we must linearly search for attributes, not access them in O(1) time. This caused every DWARFDebugInfoEntry that would try to get its DWARFAbbreviationDeclaration from the CU's DWARFAbbreviationDeclarationSet to always linearly search the abbreviation set for a given abbreviation code. Easy to see why this would cause things to be slow. This regression was caused by: https://reviews.llvm.org/D59370. I asked to ensure there was no regression is parsing or access speed, but that must not have been done. In my test with 40 DWARF files trying to set a breakpoint by function name and in a header file, I see a 8% speed improvement with this fix. There was no regression in correctness, just very inefficient access. Added full unit testing for DWARFAbbreviationDeclarationSet parsing to ensure this doesn't regress. Differential Revision: https://reviews.llvm.org/D62630 llvm-svn: 362105
* Improve DWARF parsing and accessing by 1% to 2%Greg Clayton2019-05-302-38/+18
| | | | | | | | | | When LLDB first started we didn't have our mmap of the DWARF data done correctly and if the backing file would change we would get live changes as the file changed and it would cause problems. We now mmap correctly and do not run into these issues. There was legacy code in DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(...) that would always extract the abbrev index each time the function was called to verify that DWARF data hadn't changed and a warning was emitted if it did. We no longer need this and the code was removed. The other thing this function did when it parsed the abbrev index was give us the offset of the first attribute bytes by adding the LEB128 size to the offset. This required an extra parameter to DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(...) which is now removed. I added "lldb::offset_t DWARFDebugInfoEntry::GetFirstAttributeOffset() const" which calculates this when we need it and modified all sites that need the offset to call it. Now that we aren't decoding and verifying the abbrev index, it speeds up DWARF access by 1% to 2%. Differential Revision: https://reviews.llvm.org/D62634 llvm-svn: 362103
* DWARFASTParserClang: Delete dead codePavel Labath2019-05-301-33/+0
| | | | | | | This removes places where DW_AT_decl_file/line/column was being parsed, but not used. llvm-svn: 362086
* DWARFASTParserClang: Move attribute parsing into a single functionPavel Labath2019-05-301-634/+427
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The ParseTypeFromDWARF function consists of a huge switch on the kind of type being parsed. Each case in this switch starts with parsing the attributes of the current DIE. A lot of these attributes are specific to one kind of a type, but a lot of them are common too, leading to code duplication. This patch reduces the duplication (and the size of ParseTypeFromDWARF) by moving the attribute parsing to a separate function. It creates a struct (ParsedTypeAttributes), which contains a parsed form of all attributes which are useful for parsing any kind of a type. The parsing code for a specific type kind can then access the fields which are relevant for that specific case. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62477 llvm-svn: 362075
* [lldb-server] Support 'g' packetsPavel Labath2019-05-302-0/+60
| | | | | | | Differential Revision: https://reviews.llvm.org/D62221 Patch by Guilherme Andrade <guiandrade@google.com>. llvm-svn: 362063
* DWARFDebugInfoEntry: delete unused Extract() and rename FastExtract() to ↵Fangrui Song2019-05-303-172/+10
| | | | | | | | | | | | | Extract() The function Extract() is almost a duplicate of FastExtract() but is not used. Delete it and rename FastExtract() to Extract(). Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D62593 llvm-svn: 362049
* Clean up DWARFDebugInfoEntryFangrui Song2019-05-292-106/+0
| | | | llvm-svn: 361962
* Revert "D11003: Tolerate DWARF compile unit without filename."Pavel Labath2019-05-291-13/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: This code is modifying a support file list after it has been created. This makes it hard to share the file list between type units and compile units in DWARF. It's not a total showstopper, but supporting this while also sharing the lists would make things more complicated. Given that this was added to support a project which never fully materialised, and that even back then there were some concerns about the correctness of this approach (according to D11003#200772 the compile unit name is not guaranteed to be the first one in the support file list), I think we should just delete this workaround. Reviewers: clayborg, tberghammer, dsrbecky Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D62517 llvm-svn: 361948
* DWARFASTParserClang: Unify compilation unit language handlingPavel Labath2019-05-291-8/+5
| | | | | | | | | | | | | | | | | | Summary: The function was not being consistent in how it retrieved the language of the current compile unit. Sometimes it did so from the lldb CU object, and sometimes from the DWARF die. This patch unifies the handling on the latter. The reason for choosing the DWARF method is because I'd eventually like to stop creating lldb CUs for dwarf type units (and so this code needs to would need to work without them). Reviewers: clayborg, JDevlieghere, aprantl Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62481 llvm-svn: 361939
* DWARF: Fix address range support in mixed 4+5 scenarioPavel Labath2019-05-295-93/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: debug_ranges got renamed to debug_rnglists in DWARF 5. Prior to this patch lldb was just picking the first section it could find in the file, and using that for all address ranges lookups. This is not correct in case the file contains a mixture of compile units with various standard versions (not a completely unlikely scenario). In this patch I make lldb support reading from both sections simulaneously, and decide the correct section to use based on the version number of the compile unit. SymbolFileDWARF::DebugRanges is split into GetDebugRanges and GetDebugRngLists (the first one is renamed mainly so we can catch all incorrect usages). I tried to structure the code similarly to how llvm handles this logic (hence DWARFUnit::FindRnglistFromOffset/Index), but the implementations are still relatively far from each other. Reviewers: JDevlieghere, aprantl, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D62302 llvm-svn: 361938
* [SymbolFileDWARF] Remove unused member (NFC)Jonas Devlieghere2019-05-282-4/+2
| | | | | | Removes the unused debug line instance. llvm-svn: 361886
* [DWARFExpression] Remove ctor that takes just a compile unit.Jonas Devlieghere2019-05-285-32/+34
| | | | | | | | | | | | | | | | Like many of our DWARF classes, the DWARFExpression can be initialized in several ways. One such way was through a constructor that takes just the compile unit. This constructor is used to initialize both empty DWARFExpressions, and DWARFExpression that will be populated later. To make the distinction more clear, I changed the constructor to a default constructor and updated its call sites. Where the DWARFExpression was being populated later, I replaced that with a call to the copy assignment constructor. Differential revision: https://reviews.llvm.org/D62425 llvm-svn: 361849
* DWARFDebugArangeSet: Remove references to SymbolFileDWARFPavel Labath2019-05-272-7/+4
| | | | | | | This class does not depend on SymbolFileDWARF. Instead, include more appropriate low-level headers. llvm-svn: 361765
* DWARF: Remove cu_idx variables from parsing functionsPavel Labath2019-05-274-46/+31
| | | | | | | | These variables were useful when looking up the compile unit index required a binary search. Now that we can look up a compile unit index in constant time, they are no longer needed. llvm-svn: 361754
* Cleanup fixed form sizes.Greg Clayton2019-05-2410-161/+80
| | | | | | | | | | | | | The fix form sizes use to have two arrays: one for 4 byte addresses and in for 8 byte addresses. The table had an issue where DW_FORM_flag_present wasn't being represented as a fixed size form because its actual size _is_ zero and zero was used to indicate the form isn't fixed in size. Any code that needed to quickly access the DWARF had to get a FixedFormSizes instance using the address byte size. This fix cleans things up by adding a DWARFFormValue::GetFixedSize() both as a static method and as a member function on DWARFFormValue. It correctly can indicate if a form size is zero. This cleanup is a precursor to a follow up patch where I hope to speed up DWARF parsing. I verified performance doesn't regress by loading hundreds of DWARF files and setting a breakpoint by file and line and by name in files that do not have DWARF indexes. Performance remained consistent between the two approaches. Differential Revision: https://reviews.llvm.org/D62416 llvm-svn: 361675
* [FuncUnwinders] Use "symbol file" unwind plans for unwindingPavel Labath2019-05-241-6/+8
| | | | | | | | | | | | | | | | | Summary: Previous patch (r360409) introduced the "symbol file unwind plan" concept, but that plan wasn't used for unwinding yet. With this patch, we start to consider the new plan as a possible strategy for both synchronous and asynchronous unwinding. I also add a test that asserts that unwinding via breakpad STACK CFI info works end-to-end. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits, amccarth, markmentovai Differential Revision: https://reviews.llvm.org/D61853 llvm-svn: 361618
* DWARF: Implement DW_AT_signature lookup for type unit supportPavel Labath2019-05-248-28/+80
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements the main feature of type units. When completing a type, if we encounter a DW_AT_signature attribute, we use it's value to lookup the complete definition of the type in the relevant type unit. To enable this lookup, we build up a map of all type units in a symbol file when parsing the units. Then we consult this map when resolving the DW_AT_signature attribute. I include add a couple of tests which exercise the type lookup feature, including one that ensure we do something reasonable in case we fail to lookup the type. A lot of the ideas in this patch have been taken from D32167 and D61505. Reviewers: clayborg, JDevlieghere, aprantl, alexshap Subscribers: mgrang, lldb-commits Differential Revision: https://reviews.llvm.org/D62246 llvm-svn: 361603
* DWARFContext: Make loading of sections thread-safePavel Labath2019-05-242-41/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SymbolFileDWARF used to load debug sections in a thread-safe manner. When we moved to DWARFContext, we dropped the thread-safe part, because we thought it was not necessary. It turns out this was only mostly correct. The "mostly" part is there because this is a problem only if we use the manual index, as that is the only source of intra-module paralelism. Also, this only seems to occur for extremely simple files (like the ones I've been creating for tests lately), where we've managed to start indexing before loading the debug_str section. Then, two threads start to load the section simultaneously and produce wrong results. On more complex files, something seems to be loading the debug_str section before we start indexing, as I haven't been able to reproduce this there, but I have not investigated what it is. I've tried to come up with a test for this, but I haven't been able to reproduce the problem reliably. Still, while doing so, I created a way to generate many compile units on demand. Given that most of our tests work with only one or two compile units, it seems like this could be useful anyway. Reviewers: aprantl, JDevlieghere, clayborg Subscribers: arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D62316 llvm-svn: 361602
* Fix integer literals which are cast to boolJonas Devlieghere2019-05-2411-44/+46
| | | | | | | | | This change replaces built-in types that are implicitly converted to booleans. Differential revision: https://reviews.llvm.org/D62284 llvm-svn: 361580
* [gdb-remote] Fix more issues with thread_result_tJonas Devlieghere2019-05-232-4/+4
| | | | | | More fixes needed to un-break the Windows bot. llvm-svn: 361539
* [lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'Konrad Kleine2019-05-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On Windows `lldb::thread_result_t` resolves to `typedef unsigned thread_result_t;` and on other platforms it resolves to `typedef void *thread_result_t;`. Therefore one cannot use `nullptr` when returning from a function that returns `thread_result_t`. I've made this change because a windows build bot fails with these errors: ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` and ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` This is the failing build: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5035/steps/build/logs/stdio Reviewers: JDevlieghere, teemperor, jankratochvil, labath, clayborg, RKSimon, courbet, jhenderson Reviewed By: labath, clayborg Subscribers: labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62305 llvm-svn: 361503
* [lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine2019-05-23129-973/+992
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]] This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information. This is the command I ran and I to fix and format the code base: ``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ``` NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow. NOTE: I know this is a rather large commit but it is a nobrainer in most parts. Reviewers: martong, espindola, shafik, #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D61847 llvm-svn: 361484
* DWARFASTParserClang: Reduce indentationPavel Labath2019-05-231-1507/+1495
| | | | | | by two levels via early returns. llvm-svn: 361471
* DWARF: Don't compute address ranges for type unitsPavel Labath2019-05-237-116/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Type units don't describe any code, so they should never be the result of any address lookup queries. Previously, we would compute the address ranges for the type units for via the line tables they reference because the type units looked a lot like line-tables-only compile units. However, this is not correct, as the line tables are only referenced from type units so that other declarations can use the file names contained in them. In this patch I make the BuildAddressRangeTable function virtual, and implement it only for compile units. Testing this was a bit tricky, because the behavior depends on the order in which we add things to the address range map. This rarely caused a problem with DWARF v4 type units, as they are always added after all CUs. It happened more frequently with DWARF v5, as there clang emits the type units first. However, this is still not something that it is required to do, so for testing I've created an assembly file where I've deliberately sandwiched a compile unit between two type units, which should isolate us from both changes in how the compiler emits the units and changes in the order we process them. Reviewers: clayborg, aprantl, JDevlieghere Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62178 llvm-svn: 361465
* Simplify `GetName`+`AppendTypeName` by `DWARFDIE`Jan Kratochvil2019-05-234-168/+131
| | | | | | | | | | | | | | | In D61502#1503247 @clayborg suggested that DWARFUnit *+dw_offset_t can be now replaced by DWARFDIE. It is moved from DWARFDebugInfoEntry to DWARFDIE as noted by @clayborg. I have also removed return type as (1) it was wrong in one case and (2) no existing caller used the return type. I also refactored the deep nesting noted by @JDevlieghere. Differential Revision: https://reviews.llvm.org/D62211 llvm-svn: 361463
* [ARM64][AArch64] Update disassembler attributes to ARMv8.5 ISA with SVE ↵Omair Javaid2019-05-231-3/+3
| | | | | | | | | | extensions This patch updates assembler attributes for AArch64 targets so we can disassemble newer instructions supported in ISA version 8.5 and SVE extensions. Differential Revision: https://reviews.llvm.org/D62235 llvm-svn: 361451
* DWARFDebugInfoEntry: remove unused variablePavel Labath2019-05-221-4/+1
| | | | llvm-svn: 361361
* DWARF: Introduce DWARFTypeUnit classPavel Labath2019-05-2210-47/+111
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces the DWARFTypeUnit class, and teaches lldb to parse type units out of both the debug_types section (DWARF v4), and from the regular debug_info section (DWARF v5). The most important piece of functionality - resolving DW_AT_signatures to connect type forward declarations to their definitions - is not implemented here, but even without that, a lot of functionality becomes available. I've added tests for the commands that start to work after this patch. The changes in this patch were greatly inspired by D61505, which in turn took over changes from D32167. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: mgorny, jankratochvil, lldb-commits Differential Revision: https://reviews.llvm.org/D62008 llvm-svn: 361360
* Delete unnecessary copy ctorsFangrui Song2019-05-222-31/+0
| | | | llvm-svn: 361358
* Fix LLDB warnings when compiling with Clang 8.0Alexandre Ganea2019-05-213-18/+56
| | | | | | Differential Revision: https://reviews.llvm.org/D62021 llvm-svn: 361295
OpenPOWER on IntegriCloud