summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF
Commit message (Collapse)AuthorAgeFilesLines
* [DWARF] Fix DWARFDebugAranges to support 64-bit CU offsets.Igor Kudrin2020-01-151-2/+2
| | | | | | DWARFContext, the only user of this class, can already handle such offsets. Differential Revision: https://reviews.llvm.org/D71834
* DWARFDebugLine.cpp: Restore LF line endingsHubert Tong2020-01-141-1188/+1188
| | | | | rG7e02406f6cf180a8c89ce64665660e7cc9dbc23e switched the file to CRLF line endings.
* [DebugInfo] Make debug line address size mismatch non-fatal to parsingJames Henderson2020-01-131-11/+20
| | | | | | | | | Reasonable assumptions can be made when a parsed address length does not match the expected length, so there's no need for this to be fatal. Reviewed by: ikudrin Differential Revision: https://reviews.llvm.org/D72154
* [DebugInfo][NFC] Remove unused variable/fix variable namingJames Henderson2020-01-101-1181/+1179
| | | | | | Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D72159
* [DebugInfo] Improve error message textJames Henderson2020-01-101-3/+5
| | | | | | | | | | Unlike most of our errors in the debug line parser, the "no end of sequence" message was missing any reference to which line table it refererred to. This change adds the offset to this message. Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D72443
* [DWARFDebugLoc] Tweak error message when resolving offset pairs with no base ↵Pavel Labath2020-01-091-3/+3
| | | | | | | | | | | | address The previous message mentioned DW_LLE_offset_pair, but this is incorrect/confusing because we can get this message even with DWARF4 (which does not use DW_LLE encodings). This happens because DWARF<=4 location entries are "upgraded" to DWARF v5 during parsing. The new error message refrains from referencing specific constants. Fixes pr44482.
* [DebugInfo] Fix infinite loop caused by reading past debug_line endJames Henderson2020-01-071-2/+17
| | | | | | | | | | | | | | | | If the claimed unit length of a debug line program is such that the line table would finish past the end of the .debug_line section, an infinite loop occurs because the data extractor will continue to "read" zeroes without changing the offset. This previously didn't hit an error because the line table program handles a series of zeroes as a bad extended opcode. This patch fixes the inifinite loop and adds a warning if the program doesn't fit in the available data. Reviewed by: JDevlieghere Differential Revision: https://reviews.llvm.org/D72279
* [NFC] Fix trivial typos in commentsJames Henderson2020-01-061-1/+1
| | | | | | | | Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D72143 Patch by Kazuaki Ishizaki.
* [DWARF] Don't assume optional always has a value.Jonas Devlieghere2020-01-031-1/+4
| | | | | | | | When getting the file name form the line table prologue we assume that a valid string form value can always be extracted as a string. If you look at the implementation of DWARFormValue this is not necessarily true. I hit this assertion from LLDB when I create a "dummy" DWARFContext that was missing the string section.
* [DebugInfo] Remove redundant checks for past-the-end of prologueJames Henderson2020-01-031-24/+0
| | | | | | | | | | | | | | The V5 directory and filename tables had checks in to make sure we hadn't read past the end of the line table prologue. Since previous changes to the data extractor class ensure we never read past the end, these checks are now redundant, so this patch removes them. There is still a check to show that the whole prologue remains within the prologue length. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D71768
* [DebugInfo][NFC] Use function_ref consistently in debug line parsingJames Henderson2020-01-022-3/+3
| | | | | | | | | | This patch fixes an inconsistency where we were using std::function in some places and function_ref in others to pass around the error handling callback. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D71762
* [NFC] Fixes -Wrange-loop-analysis warningsMark de Wever2020-01-012-4/+4
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71857
* DebugInfo: Support dumping any exprloc as an expressionDavid Blaikie2019-12-231-1/+2
| | | | | | | Now that DWARFv5 provides a way to identify DWARF expressions based on form, rather than only by attribute - use it to always provide pretty printing for any exprloc attribute, not only the attributes known to contain expressions.
* [DWARF] Check that all fields of a Unit Header are read.Igor Kudrin2019-12-241-12/+18
| | | | | | | | | Tests "dwarfdump-rnglists-dwarf64.s" and "dwarfdump-rnglists.s" were malformed because they had missing required DWO ID fields in split compilation unit headers. The patch fixes the tests and checks the reading of a unit header more thoroughly. Differential Revision: https://reviews.llvm.org/D71704
* [WebAssembly] Use TargetIndex operands in DbgValue to track WebAssembly ↵Yury Delendik2019-12-201-0/+2
| | | | | | | | | | | | | | | | | | operands locations Extends DWARF expression language to express locals/globals locations. (via target-index operands atm) (possible variants are: non-virtual registers or address spaces) The WebAssemblyExplicitLocals can replace virtual registers to targertindex operand type at the time when WebAssembly backend introduces {get,set,tee}_local instead of corresponding virtual registers. Reviewed By: aprantl, dschuff Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D52634
* llvm-symbolizer: support DW_FORM_loclistx locations.Evgenii Stepanov2019-12-202-31/+27
| | | | | | | | | | | | | | | | Summary: With -gdwarf-5 local variable locations are emitted as DW_FORM_loclistx form instead of the regular DW_FORM_sec_offset. Teach DWARFDie::getLocations to understand the new format and use it in llvm-symbolizer "FRAME" command. Reviewers: pcc, jdoerfert Subscribers: srhines, aprantl, hiraditya, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70756
* Temporarily Revert "[Dsymutil][Debuginfo][NFC] Refactor dsymutil to separate ↵Eric Christopher2019-12-195-372/+1
| | | | | | | | | | | DWARF optimizing part 2." as it causes a layering violation/dependency cycle: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp -> llvm/DebugInfo/DWARF/DWARFExpression.h llvm/include/llvm/DebugInfo/DWARF/DWARFOptimizer.h -> llvm/CodeGen/NonRelocatableStringpool.h This reverts commit abc7f6800df8a1f40e1e2c9ccce826abb0208284.
* [DebugInfo] Fix verbose printing of rows added via DW_LNE_end_sequenceJames Henderson2019-12-191-1/+1
| | | | | | | | | | | The debug line verbose printing was printing the wrong values for rows added via DW_LNE_end_sequence, because the row was being printed AFTER its state had been reset following it being appended to the line table. This patch fixes this issue by printing the row before appending it. Reviewers: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D71664
* [Dsymutil][Debuginfo][NFC] Refactor dsymutil to separate DWARF optimizing ↵Alexey Lapshin2019-12-195-1/+372
| | | | | | | | | | | part 2. That patch is extracted from the D70709. It moves CompileUnit, DeclContext into llvm/DebugInfo/DWARF. It also adds new file DWARFOptimizer with AddressesMap class. AddressesMap generalizes functionality from RelocationManager. Differential Revision: https://reviews.llvm.org/D71271
* DebugInfo: Don't use implicit zero addr_baseDavid Blaikie2019-12-182-7/+10
| | | | (found when LLVM fails to emit addr_base for gmlt+DWARFv5)
* [DebugInfo] Only print a single blank line after an empty line tableJames Henderson2019-12-171-1/+1
| | | | | | | | | | | | Commit 84a9756 added an extra blank line at the end of any line table. However, a blank line is also printed after the line table header, which meant that two blank lines in a row were being printed after a header, if there were no rows. This patch defers the post-header blank line printing until it has been determined that there are rows to print. Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D71540
* [llvm-dwarfdump] Add blank line after printing line tableJames Henderson2019-12-121-0/+4
| | | | | | | | This helps delineate it in the output from later tables or other output. Reviewed by: JDevlieghere Differential Revision: https://reviews.llvm.org/D71344
* [DWARF5][DWARFVerifier] Check that Skeleton compilation unit does not have ↵Alexey Lapshin2019-12-121-0/+8
| | | | | | | | | children. That patch adds checking into DWARFVerifier that the Skeleton compilation unit does not have children. Differential Revision: https://reviews.llvm.org/D71244
* [DebugInfo] Fix printing of DW_LNS_set_isaJames Henderson2019-12-111-1/+1
| | | | | | | | | | | | | | | | | The Isa register is a uint8_t, but at least on Windows this is internally an unsigned char, which meant that prior to this patch it got formatted as an ASCII character, rather than a decimal number. This patch fixes this by casting it to a uint64_t before printing. I did it this way instead of using a uint8_t formatter because a) it is simpler, and b) it allows us to change the internal type of Isa in the future without this code breaking. I also took the opportunity to test the printing of the other standard opcodes. Reviewed by: probinson Differential Revision: https://reviews.llvm.org/D71274
* Recommit "[DWARF5] Start emitting DW_AT_dwo_name when -gdwarf-5 is specified."Sourabh Singh Tomar2019-12-111-1/+3
| | | | | | | | Reviewers: dblaikie, aprantl, probinson Tags: #debug-info #llvm Differential Revision: https://reviews.llvm.org/D71185
* Revert "[DWARF5] Start emitting DW_AT_dwo_name when -gdwarf-5 is specified."Sourabh Singh Tomar2019-12-111-3/+1
| | | | | This reverts commit 6ef01588f4d75ef43da4ed2a37ba7a8b8daab259. Missing Differetial revision.
* [DWARF5] Start emitting DW_AT_dwo_name when -gdwarf-5 is specified.Sourabh Singh Tomar2019-12-111-1/+3
|
* [llvm/DWARF] Return section offset from DWARFUnit::get{Loc,Rng}listOffsetPavel Labath2019-12-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently these function return the raw content of the appropriate table header, which means they are relative to the DW_AT_{loc,rng}list_base, and one has to relocate them in order to do anything. This changes the functions to perform the relocation themselves, which seems more clearer, particularly as they are sitting right next to the find{Rng,Loc}listFromOffset functions, but one *cannot* simply take the result of these functions and take pass them there. The only effect of this patch is to change what value is dumped for the DW_AT_ranges attribute, which I think is for the better, as previously the values appeared to point into thin air. (The main reason I am looking at this is because I was trying to implement equivalent functionality in lldb's DWARFUnit, and was stumped by this behavior. Reviewers: dblaikie, JDevlieghere, aprantl Subscribers: hiraditya, llvm-commits, SouraVX Tags: #llvm Differential Revision: https://reviews.llvm.org/D71006
* [DWARFDebugLoclists] Add support for other DW_LLE encodingsPavel Labath2019-12-041-8/+38
| | | | | | | | | | | | | | | Summary: lldb's loclists parser has support for DW_LLE_start_end(x) encodings. To avoid regressing when switching the implementation to llvm's, I add parsing support for all previously unsupported location list encodings. Reviewers: dblaikie, JDevlieghere, aprantl, SouraVX Subscribers: hiraditya, probinson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70949
* [DWARFDebugRnglists] Add a callback-based version of the getAbsoluteRanges ↵Pavel Labath2019-12-041-2/+11
| | | | | | | | | | | | | | | | | | | | function Summary: The dump() function already accepts a callback. This makes getAbsoluteRanges do the same. The existing DWARFUnit overload is implemented on top of the new function. This enables usage of the debug_rnglists parser from within lldb (which has it's own dwarf parser). Reviewers: dblaikie, JDevlieghere, aprantl Subscribers: hiraditya, probinson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70952
* [DWARF] Add support for parsing/dumping section indices in location listsPavel Labath2019-12-033-32/+51
| | | | | | | | | | | | | | | | | | | Summary: This does exactly what it says on the box. The only small gotcha is the section index computation for offset_pair entries, which can use either the base address section, or the section from the offset_pair entry. This is to support both the cases where the base address is relocated (points to the base of the CU, typically), and the case where the base address is a constant (typically zero) and relocations are on the offsets themselves. Reviewers: dblaikie, JDevlieghere, aprantl, SouraVX Subscribers: hiraditya, llvm-commits, probinson Tags: #llvm Differential Revision: https://reviews.llvm.org/D70540
* [DebugInfo] Support for debug_macinfo.dwo section in llvm and llvm-dwarfdump.Sourabh Singh Tomar2019-12-031-0/+17
| | | | | | | | | | | This patch adds support for debug_macinfo.dwo section[pre-standardized] to llvm and llvm-dwarfdump. Reviewers: probinson, dblaikie, aprantl, jini.susan.george, alok Differential Revision: https://reviews.llvm.org/D70705 Tags: #debug-info #llvm
* llvm-symbolizer: fix handling of DW_AT_specification in FRAME.Evgenii Stepanov2019-11-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use getSubroutineName() to the the subrouting name; this function knows how to handle cases when DW_TAG_subprogram refers to an earlier declaration: 0x00000050: DW_TAG_subprogram DW_AT_linkage_name ("_ZN1A1fEv") DW_AT_name ("f") ... 0x00000067: DW_TAG_subprogram DW_AT_low_pc (0x0000000000000000) DW_AT_high_pc (0x0000000000000020) DW_AT_specification (0x00000050 "_ZN1A1fEv") ... 0x0000008c: DW_TAG_variable Reviewers: pcc, vitalybuka, jdoerfert Subscribers: srhines, hiraditya, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70630
* llvm-symbolizer: Support loclist in FRAME.Evgenii Stepanov2019-11-251-4/+56
| | | | | | | | | | | | | | | | Summary: Support location lists in FRAME command. These are used for the majority of local variables in optimized code. Also support DW_OP_breg in addition to DW_OP_fbreg when it refers to the same register as DW_AT_frame_base. Reviewers: pcc, jdoerfert Subscribers: srhines, hiraditya, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70629
* Recommit "[DWARF] Support for loclist.dwo section in llvm and llvm-dwarfdump."Sourabh Singh Tomar2019-11-233-8/+38
| | | | | | | | | | | The original commit message follows. This patch adds support for debug_loclists.dwo section in llvm and llvm-dwarfdump. Also Fixes PR43622, PR43623. Reviewers: dblaikie, probinson, labath, aprantl, jini.susan.george Differential Revision: https://reviews.llvm.org/D69462
* Revert "[DWARF] Support for loclist.dwo section in llvm and llvm-dwarfdump."Sourabh Singh Tomar2019-11-232-37/+8
| | | | | | This reverts commit 81b0a3284af1dcef26e56b0de9fd74002083c471. Will Re-apply, with updated Differtial Revision, for automatic closure of Phabricator review.
* [DWARF] Support for loclist.dwo section in llvm and llvm-dwarfdump.Sourabh Singh Tomar2019-11-232-8/+37
| | | | | | | | | This patch adds support for debug_loclists.dwo section in llvm and llvm-dwarfdump. Also Fixes PR43622, PR43623. Reviewers: dblaikie, probinson, labath, aprantl, jini.susan.george https://reviews.llvm.org/D69462
* [DWARFVerifier] Use the new location list apiPavel Labath2019-11-223-79/+25
| | | | | | | | | | | | | | | | | | Summary: Instead of going to the debug_loc section directly, use new DWARFDie::getLocations instead. This means that the code will now automatically support debug_loclists sections. This is the last usage of the old debug_loc methods, and they can now be removed. Reviewers: dblaikie, JDevlieghere, aprantl, SouraVX Subscribers: hiraditya, probinson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70534
* [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"Tom Stellard2019-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Most libraries are defined in the lib/ directory but there are also a few libraries defined in tools/ e.g. libLLVM, libLTO. I'm defining "Component Libraries" as libraries defined in lib/ that may be included in libLLVM.so. Explicitly marking the libraries in lib/ as component libraries allows us to remove some fragile checks that attempt to differentiate between lib/ libraries and tools/ libraires: 1. In tools/llvm-shlib, because llvm_map_components_to_libnames(LIB_NAMES "all") returned a list of all libraries defined in the whole project, there was custom code needed to filter out libraries defined in tools/, none of which should be included in libLLVM.so. This code assumed that any library defined as static was from lib/ and everything else should be excluded. With this change, llvm_map_components_to_libnames(LIB_NAMES, "all") only returns libraries that have been added to the LLVM_COMPONENT_LIBS global cmake property, so this custom filtering logic can be removed. Doing this also fixes the build with BUILD_SHARED_LIBS=ON and LLVM_BUILD_LLVM_DYLIB=ON. 2. There was some code in llvm_add_library that assumed that libraries defined in lib/ would not have LLVM_LINK_COMPONENTS or ARG_LINK_COMPONENTS set. This is only true because libraries defined lib lib/ use LLVMBuild.txt and don't set these values. This code has been fixed now to check if the library has been explicitly marked as a component library, which should now make it easier to remove LLVMBuild at some point in the future. I have tested this patch on Windows, MacOS and Linux with release builds and the following combinations of CMake options: - "" (No options) - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DBUILD_SHARED_LIBS=ON - -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON - -DBUILD_SHARED_LIBS=ON -DLLVM_LINK_LLVM_DYLIB=ON Reviewers: beanz, smeenai, compnerd, phosek Reviewed By: beanz Subscribers: wuzish, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, mgorny, mehdi_amini, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, dang, Jim, lenary, s.egerton, pzheng, sameer.abuasal, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70179
* [Debuginfo][NFC] removes redundant semicolon.Alexey Lapshin2019-11-211-1/+1
|
* Recommit "[DWARF] Add an api to get "interpreted" location lists"Pavel Labath2019-11-203-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This recommits 089c0f581492cd6e2a3d2927be3fbf60ea2d7e62, which was reverted due to failing tests on big endian machines. It includes a fix which I believe (I don't have BE machine) should fix this issue. The fix consists of correcting the invocation DWARFYAML::EmitDebugSections, which was missing one (default) function arguments, and so didn't actually force the little-endian mode. The original commit message follows. Summary: This patch adds DWARFDie::getLocations, which returns the location expressions for a given attribute (typically DW_AT_location). It handles both "inline" locations and references to the external location list sections (currently only of the DW_FORM_sec_offset type). It is implemented on top of DWARFUnit::findLoclistFromOffset, which is also added in this patch. I tried to make their signatures similar to the equivalent range list functionality. The actual location list interpretation logic is in DWARFLocationTable::visitAbsoluteLocationList. This part is not equivalent to the range list code, but this deviation is motivated by a desire to reuse the same location list parsing code within lldb. The functionality is tested via a c++ unit test of the DWARFDie API. Reviewers: dblaikie, JDevlieghere, SouraVX Subscribers: mgorny, hiraditya, cmtice, probinson, llvm-commits, aprantl Tags: #llvm Differential Revision: https://reviews.llvm.org/D70394
* Revert "[DWARF] Add an api to get "interpreted" location lists"Pavel Labath2019-11-203-60/+0
| | | | | | | The test fails on big endian machines. This reverts commit 089c0f581492cd6e2a3d2927be3fbf60ea2d7e62 and the subsequent attempt to fix in 82dc32e2d456c75d08bc9ffe97def409ee5a03cd.
* [DWARF] Add an api to get "interpreted" location listsPavel Labath2019-11-203-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds DWARFDie::getLocations, which returns the location expressions for a given attribute (typically DW_AT_location). It handles both "inline" locations and references to the external location list sections (currently only of the DW_FORM_sec_offset type). It is implemented on top of DWARFUnit::findLoclistFromOffset, which is also added in this patch. I tried to make their signatures similar to the equivalent range list functionality. The actual location list interpretation logic is in DWARFLocationTable::visitAbsoluteLocationList. This part is not equivalent to the range list code, but this deviation is motivated by a desire to reuse the same location list parsing code within lldb. The functionality is tested via a c++ unit test of the DWARFDie API. Reviewers: dblaikie, JDevlieghere, SouraVX Subscribers: mgorny, hiraditya, cmtice, probinson, llvm-commits, aprantl Tags: #llvm Differential Revision: https://reviews.llvm.org/D70394
* Add streaming/equality operators to DWARFAddressRange/DWARFLocationExpressionPavel Labath2019-11-192-0/+20
| | | | | | | The main motivation for this is being able to write simpler assertions and get better error messages in unit tests. Split off from D70394.
* Re-commit "DWARF location lists: Add section index dumping"Pavel Labath2019-11-184-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies c0f6ad7d1f3ccb9d0b9ce9ef8dfa06409ccf1b3e with an additional fix in test/DebugInfo/X86/constant-loclist.ll, which had a slightly different output on windows targets. The test now accounts for this difference. The original commit message follows. Summary: As discussed in D70081, this adds the ability to dump section names/indices to the location list dumper. It does this by moving the range specific logic from DWARFDie.cpp:dumpRanges into the DWARFAddressRange class. The trickiest part of this patch is the backflip in the meanings of the two dump flags for the location list sections. The dumping of "raw" location list data is now controlled by "DisplayRawContents" flag. This frees up the "Verbose" flag to be used to control whether we print the section index. Additionally, the DisplayRawContents flag is set for section-based dumps whenever the --verbose option is passed, but this is not done for the "inline" dumps. Also note that the index dumping currently does not work for the DWARF v5 location lists, as the parser does not fill out the appropriate fields. This will be done in a separate patch. Reviewers: dblaikie, probinson, JDevlieghere, SouraVX Subscribers: sdardis, hiraditya, jrtc27, atanasyan, arphaman, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70227
* Revert rGc0f6ad7d1f3c : "DWARF location lists: Add section index dumping"Simon Pilgrim2019-11-184-26/+20
| | | | This reverts commit c0f6ad7d1f3ccb9d0b9ce9ef8dfa06409ccf1b3e to fix the buildbots.
* DWARF location lists: Add section index dumpingPavel Labath2019-11-184-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in D70081, this adds the ability to dump section names/indices to the location list dumper. It does this by moving the range specific logic from DWARFDie.cpp:dumpRanges into the DWARFAddressRange class. The trickiest part of this patch is the backflip in the meanings of the two dump flags for the location list sections. The dumping of "raw" location list data is now controlled by "DisplayRawContents" flag. This frees up the "Verbose" flag to be used to control whether we print the section index. Additionally, the DisplayRawContents flag is set for section-based dumps whenever the --verbose option is passed, but this is not done for the "inline" dumps. Also note that the index dumping currently does not work for the DWARF v5 location lists, as the parser does not fill out the appropriate fields. This will be done in a separate patch. Reviewers: dblaikie, probinson, JDevlieghere, SouraVX Subscribers: sdardis, hiraditya, jrtc27, atanasyan, arphaman, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70227
* DebugInfo: Use loclistx for DWARFv5 location lists to reduce the number of ↵David Blaikie2019-11-153-0/+41
| | | | | | | | | | relocations This only implements the non-dwo part, but loclistx is necessary to use location lists in DWARFv5, so it's a precursor to that work - and generally reduces relocations (only using one reloc, then indexes/relative offsets for all location list references) in non-split DWARF.
* DebugInfo: Templatize rnglist header parsing to setup for reuse with loclist ↵David Blaikie2019-11-151-9/+10
| | | | header parsing
* DWARFDebugLoc(v4): Add an incremental parsing functionPavel Labath2019-11-155-104/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a visitLocationList function to the DWARF v4 location lists, similar to what already exists for DWARF v5. It follows the approach outlined in previous patches (D69672), where the parsed form is always stored in the DWARF v5 format, which makes it easier for generic code to be built on top of that. v4 location lists are "upgraded" during parsing, and then this upgrade is undone while dumping. Both "inline" and section-based dumping is rewritten to reuse the existing "generic" location list dumper. This means that the output format is consistent for all location lists (the only thing one needs to implement is the function which prints the "raw" form of a location list), and that debug_loc dumping correctly processes base address selection entries, etc. The previous existing debug_loc functionality (e.g., parseOneLocationList) is rewritten on top of the new API, but it is not removed as there is still code which uses them. This will be done in follow-up patches, after I build the API to access the "interpreted" location lists in a generic way (as that is what those users really want). Reviewers: dblaikie, probinson, JDevlieghere, aprantl, SouraVX Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69847
OpenPOWER on IntegriCloud