<div dir="ltr">Anyone else seeing this 'make check' failure? I'm running Darwin x86-64; fails the same on 2 different machines.<br><br>FAIL: LLVM :: DebugInfo/dwarfdump-dwz.test (7308 of 13739)<br>******************** TEST 'LLVM :: DebugInfo/dwarfdump-dwz.test' FAILED ********************<br>Script:<br>--<br>/Users/spatel/myllvm/build/./bin/llvm-dwarfdump /Users/spatel/myllvm/llvm/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64 -debug-dump=info | /Users/spatel/myllvm/build/./bin/FileCheck /Users/spatel/myllvm/llvm/test/DebugInfo/dwarfdump-dwz.test -check-prefix DUMP_INFO<br>--<br>Exit Code: 2<br><br>Command Output (stderr):<br>--<br>0 llvm-dwarfdump 0x000000010b1e523e llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46<br>1 llvm-dwarfdump 0x000000010b1e6b09 PrintStackTraceSignalHandler(void*) + 25<br>2 llvm-dwarfdump 0x000000010b1e6f68 SignalHandler(int) + 584<br>3 libsystem_platform.dylib 0x00007fff8f71bf1a _sigtramp + 26<br>4 libsystem_platform.dylib 0x00007fff54bb0690 _sigtramp + 3309914000<br>5 llvm-dwarfdump 0x000000010b0dd1ba llvm::object::ELFFile<llvm::object::ELFType<(llvm::support::endianness)1, 2ul, true> >::ELFFile(llvm::StringRef, std::__1::error_code&) + 1882<br>6 llvm-dwarfdump 0x000000010b0d387d llvm::object::ELFFile<llvm::object::ELFType<(llvm::support::endianness)1, 2ul, true> >::ELFFile(llvm::StringRef, std::__1::error_code&) + 45<br>7 llvm-dwarfdump 0x000000010b0d383c llvm::object::ELFObjectFile<llvm::object::ELFType<(llvm::support::endianness)1, 2ul, true> >::ELFObjectFile(llvm::MemoryBufferRef, std::__1::error_code&) + 220<br>8 llvm-dwarfdump 0x000000010b0d3483 llvm::object::ELFObjectFile<llvm::object::ELFType<(llvm::support::endianness)1, 2ul, true> >::ELFObjectFile(llvm::MemoryBufferRef, std::__1::error_code&) + 67<br>9 llvm-dwarfdump 0x000000010b0d2bfa llvm::object::ObjectFile::createELFObjectFile(llvm::MemoryBufferRef) + 1994<br>10 llvm-dwarfdump 0x000000010b11b834 llvm::object::ObjectFile::createObjectFile(llvm::MemoryBufferRef, llvm::sys::fs::file_magic) + 308<br>11 llvm-dwarfdump 0x000000010b0583e6 llvm::object::ObjectFile::createObjectFile(llvm::MemoryBufferRef) + 118<br>12 llvm-dwarfdump 0x000000010b05036e DumpInput(llvm::StringRef) + 798<br>13 llvm-dwarfdump 0x000000010b04ffee main + 1518<br>14 libdyld.dylib 0x00007fff8f1d25c9 start + 1<br>15 libdyld.dylib 0x0000000000000003 start + 1893915195<br>Stack dump:<br>0. Program arguments: /Users/spatel/myllvm/build/./bin/llvm-dwarfdump /Users/spatel/myllvm/llvm/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64 -debug-dump=info <br>FileCheck error: '-' is empty.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 19, 2015 at 2:29 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: samsonov<br>
Date: Tue May 19 15:29:28 2015<br>
New Revision: 237721<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D237721-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=XO0GgiheEcvrikxMsO0W00yQXbyUGgApbkcdAYdwo58&e=" target="_blank">http://llvm.org/viewvc/llvm-project?rev=237721&view=rev</a><br>
Log:<br>
[DWARF parser] Add basic support for DWZ DWARF multifile extensions.<br>
<br>
This change implements basic support for DWARF alternate sections<br>
proposal: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dwarfstd.org_ShowIssue.php-3Fissue-3D120604.1-26type-3Dopen&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=lL9Sr_BDs2HAGSaK0VGR08-kLUaeid61syfSGNYjWJE&e=" target="_blank">http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open</a><br>
<br>
LLVM tools now understand new forms: DW_FORM_GNU_ref_alt and<br>
DW_FORM_GNU_strp_alt, which are used as references to .debug_info and<br>
.debug_str sections respectively, stored in a separate file, and<br>
possibly shared between different executables / shared objects.<br>
<br>
llvm-dwarfdump and llvm-symbolizer don't yet know how to access this<br>
alternate debug file (usually pointed by .gnu_debugaltlink section),<br>
but they can at lease properly parse and dump regular files, which<br>
refer to it.<br>
<br>
This change should fix crashes of llvm-dwarfdump and llvm-symbolizer on<br>
files produced by running "dwz" tool. Such files are already installed<br>
on some modern Linux distributions.<br>
<br>
Added:<br>
llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64 (with props)<br>
llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.dwz<br>
llvm/trunk/test/DebugInfo/dwarfdump-dwz.test<br>
Modified:<br>
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFFormValue.h<br>
llvm/trunk/include/llvm/Support/Dwarf.h<br>
llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp<br>
llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp<br>
llvm/trunk/lib/Support/Dwarf.cpp<br>
llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.cc<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFFormValue.h<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm_DebugInfo_DWARF_DWARFFormValue.h-3Frev-3D237721-26r1-3D237720-26r2-3D237721-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=OJZIKjRXAuZlbvzBREmx_xrWpnElCpx9jx0bNyUDDEA&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFFormValue.h?rev=237721&r1=237720&r2=237721&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFFormValue.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFFormValue.h Tue May 19 15:29:28 2015<br>
@@ -87,6 +87,8 @@ public:<br>
<br>
static ArrayRef<uint8_t> getFixedFormSizes(uint8_t AddrSize,<br>
uint16_t Version);<br>
+private:<br>
+ void dumpString(raw_ostream &OS, const DWARFUnit *U) const;<br>
};<br>
<br>
}<br>
<br>
Modified: llvm/trunk/include/llvm/Support/Dwarf.h<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm_Support_Dwarf.h-3Frev-3D237721-26r1-3D237720-26r2-3D237721-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=zp9esbSfizPAljLtnHHYdAX0Oo8WU5Klshn4QNygXew&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=237721&r1=237720&r2=237721&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Support/Dwarf.h (original)<br>
+++ llvm/trunk/include/llvm/Support/Dwarf.h Tue May 19 15:29:28 2015<br>
@@ -285,7 +285,11 @@ enum Form : uint16_t {<br>
<br>
// Extensions for Fission proposal<br>
DW_FORM_GNU_addr_index = 0x1f01,<br>
- DW_FORM_GNU_str_index = 0x1f02<br>
+ DW_FORM_GNU_str_index = 0x1f02,<br>
+<br>
+ // Alternate debug sections proposal (output of "dwz" tool).<br>
+ DW_FORM_GNU_ref_alt = 0x1f20,<br>
+ DW_FORM_GNU_strp_alt = 0x1f21<br>
};<br>
<br>
enum LocationAtom {<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_DebugInfo_DWARF_DWARFDebugInfoEntry.cpp-3Frev-3D237721-26r1-3D237720-26r2-3D237721-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=kSgU0NBO5pp3NFVkK6QqcJCEhXoBIulQfLug8C9u2LM&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp?rev=237721&r1=237720&r2=237721&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp Tue May 19 15:29:28 2015<br>
@@ -161,14 +161,15 @@ void DWARFDebugInfoEntryMinimal::dumpAtt<br>
// We have dumped the attribute raw value. For some attributes<br>
// having both the raw value and the pretty-printed value is<br>
// interesting. These attributes are handled below.<br>
- if ((attr == DW_AT_specification || attr == DW_AT_abstract_origin) &&<br>
- // The signature references aren't handled.<br>
- formValue.getForm() != DW_FORM_ref_sig8) {<br>
- uint32_t Ref = formValue.getAsReference(u).getValue();<br>
- DWARFDebugInfoEntryMinimal DIE;<br>
- if (const DWARFUnit *RefU = findUnitAndExtractFast(DIE, u, &Ref))<br>
- if (const char *Ref = DIE.getName(RefU, DINameKind::LinkageName))<br>
- OS << " \"" << Ref << '\"';<br>
+ if (attr == DW_AT_specification || attr == DW_AT_abstract_origin) {<br>
+ Optional<uint64_t> Ref = formValue.getAsReference(u);<br>
+ if (Ref.hasValue()) {<br>
+ uint32_t RefOffset = Ref.getValue();<br>
+ DWARFDebugInfoEntryMinimal DIE;<br>
+ if (const DWARFUnit *RefU = findUnitAndExtractFast(DIE, u, &RefOffset))<br>
+ if (const char *Name = DIE.getName(RefU, DINameKind::LinkageName))<br>
+ OS << " \"" << Name << '\"';<br>
+ }<br>
} else if (attr == DW_AT_APPLE_property_attribute) {<br>
if (Optional<uint64_t> OptVal = formValue.getAsUnsignedConstant())<br>
dumpApplePropertyAttribute(OS, *OptVal);<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_DebugInfo_DWARF_DWARFFormValue.cpp-3Frev-3D237721-26r1-3D237720-26r2-3D237721-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=zF4U7JEuJhbfKy2W5UFho1xFRwKCWQ8ylxyMpYOM7Tk&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp?rev=237721&r1=237720&r2=237721&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp Tue May 19 15:29:28 2015<br>
@@ -113,14 +113,17 @@ bool DWARFFormValue::isFormClass(DWARFFo<br>
if (Form < ArrayRef<FormClass>(DWARF4FormClasses).size() &&<br>
DWARF4FormClasses[Form] == FC)<br>
return true;<br>
- // Check DW_FORM_ref_sig8 from DWARF4.<br>
- if (Form == DW_FORM_ref_sig8)<br>
+ // Check more forms from DWARF4 and DWARF5 proposals.<br>
+ switch (Form) {<br>
+ case DW_FORM_ref_sig8:<br>
+ case DW_FORM_GNU_ref_alt:<br>
return (FC == FC_Reference);<br>
- // Check for some DWARF5 forms.<br>
- if (Form == DW_FORM_GNU_addr_index)<br>
+ case DW_FORM_GNU_addr_index:<br>
return (FC == FC_Address);<br>
- if (Form == DW_FORM_GNU_str_index)<br>
+ case DW_FORM_GNU_str_index:<br>
+ case DW_FORM_GNU_strp_alt:<br>
return (FC == FC_String);<br>
+ }<br>
// In DWARF3 DW_FORM_data4 and DW_FORM_data8 served also as a section offset.<br>
// Don't check for DWARF version here, as some producers may still do this<br>
// by mistake.<br>
@@ -199,15 +202,6 @@ bool DWARFFormValue::extractValue(DataEx<br>
case DW_FORM_sdata:<br>
Value.sval = data.getSLEB128(offset_ptr);<br>
break;<br>
- case DW_FORM_strp: {<br>
- Value.uval = data.getU32(offset_ptr);<br>
- if (!cu)<br>
- break;<br>
- RelocAddrMap::const_iterator AI = cu->getRelocMap()->find(*offset_ptr-4);<br>
- if (AI != cu->getRelocMap()->end())<br>
- Value.uval += AI->second.second;<br>
- break;<br>
- }<br>
case DW_FORM_udata:<br>
case DW_FORM_ref_udata:<br>
Value.uval = data.getULEB128(offset_ptr);<br>
@@ -219,14 +213,18 @@ bool DWARFFormValue::extractValue(DataEx<br>
Form = data.getULEB128(offset_ptr);<br>
indirect = true;<br>
break;<br>
- case DW_FORM_sec_offset: {<br>
+ case DW_FORM_sec_offset:<br>
+ case DW_FORM_strp:<br>
+ case DW_FORM_GNU_ref_alt:<br>
+ case DW_FORM_GNU_strp_alt: {<br>
// FIXME: This is 64-bit for DWARF64.<br>
Value.uval = data.getU32(offset_ptr);<br>
if (!cu)<br>
break;<br>
- RelocAddrMap::const_iterator AI = cu->getRelocMap()->find(*offset_ptr-4);<br>
+ RelocAddrMap::const_iterator AI =<br>
+ cu->getRelocMap()->find(*offset_ptr - 4);<br>
if (AI != cu->getRelocMap()->end())<br>
- Value.uval += AI->second.second;<br>
+ Value.uval += AI->second.second;<br>
break;<br>
}<br>
case DW_FORM_flag_present:<br>
@@ -323,7 +321,6 @@ DWARFFormValue::skipValue(uint16_t form,<br>
return true;<br>
<br>
// 4 byte values<br>
- case DW_FORM_strp:<br>
case DW_FORM_data4:<br>
case DW_FORM_ref4:<br>
*offset_ptr += 4;<br>
@@ -353,6 +350,9 @@ DWARFFormValue::skipValue(uint16_t form,<br>
<br>
// FIXME: 4 for DWARF32, 8 for DWARF64.<br>
case DW_FORM_sec_offset:<br>
+ case DW_FORM_strp:<br>
+ case DW_FORM_GNU_ref_alt:<br>
+ case DW_FORM_GNU_strp_alt:<br>
*offset_ptr += 4;<br>
return true;<br>
<br>
@@ -424,24 +424,17 @@ DWARFFormValue::dump(raw_ostream &OS, co<br>
case DW_FORM_udata: OS << Value.uval; break;<br>
case DW_FORM_strp: {<br>
OS << format(" .debug_str[0x%8.8x] = ", (uint32_t)uvalue);<br>
- Optional<const char *> DbgStr = getAsCString(cu);<br>
- if (DbgStr.hasValue()) {<br>
- raw_ostream &COS = WithColor(OS, syntax::String);<br>
- COS << '"';<br>
- COS.write_escaped(DbgStr.getValue());<br>
- COS << '"';<br>
- }<br>
+ dumpString(OS, cu);<br>
break;<br>
}<br>
case DW_FORM_GNU_str_index: {<br>
OS << format(" indexed (%8.8x) string = ", (uint32_t)uvalue);<br>
- Optional<const char *> DbgStr = getAsCString(cu);<br>
- if (DbgStr.hasValue()) {<br>
- raw_ostream &COS = WithColor(OS, syntax::String);<br>
- COS << '"';<br>
- COS.write_escaped(DbgStr.getValue());<br>
- COS << '"';<br>
- }<br>
+ dumpString(OS, cu);<br>
+ break;<br>
+ }<br>
+ case DW_FORM_GNU_strp_alt: {<br>
+ OS << format("alt indirect string, offset: 0x%" PRIx64 "", uvalue);<br>
+ dumpString(OS, cu);<br>
break;<br>
}<br>
case DW_FORM_ref_addr:<br>
@@ -467,6 +460,9 @@ DWARFFormValue::dump(raw_ostream &OS, co<br>
cu_relative_offset = true;<br>
OS << format("cu + 0x%" PRIx64, uvalue);<br>
break;<br>
+ case DW_FORM_GNU_ref_alt:<br>
+ OS << format("<alt 0x%" PRIx64 ">", uvalue);<br>
+ break;<br>
<br>
// All DW_FORM_indirect attributes should be resolved prior to calling<br>
// this function<br>
@@ -492,12 +488,23 @@ DWARFFormValue::dump(raw_ostream &OS, co<br>
}<br>
}<br>
<br>
+void DWARFFormValue::dumpString(raw_ostream &OS, const DWARFUnit *U) const {<br>
+ Optional<const char *> DbgStr = getAsCString(U);<br>
+ if (DbgStr.hasValue()) {<br>
+ raw_ostream &COS = WithColor(OS, syntax::String);<br>
+ COS << '"';<br>
+ COS.write_escaped(DbgStr.getValue());<br>
+ COS << '"';<br>
+ }<br>
+}<br>
+<br>
Optional<const char *> DWARFFormValue::getAsCString(const DWARFUnit *U) const {<br>
if (!isFormClass(FC_String))<br>
return None;<br>
if (Form == DW_FORM_string)<br>
return Value.cstr;<br>
- if (!U)<br>
+ // FIXME: Add support for DW_FORM_GNU_strp_alt<br>
+ if (Form == DW_FORM_GNU_strp_alt || U == nullptr)<br>
return None;<br>
uint32_t Offset = Value.uval;<br>
if (Form == DW_FORM_GNU_str_index) {<br>
@@ -539,9 +546,9 @@ Optional<uint64_t> DWARFFormValue::getAs<br>
return Value.uval + U->getOffset();<br>
case DW_FORM_ref_addr:<br>
return Value.uval;<br>
- // FIXME: Add proper support for DW_FORM_ref_sig8<br>
+ // FIXME: Add proper support for DW_FORM_ref_sig8 and DW_FORM_GNU_ref_alt.<br>
default:<br>
- return Value.uval;<br>
+ return None;<br>
}<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Support/Dwarf.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Support_Dwarf.cpp-3Frev-3D237721-26r1-3D237720-26r2-3D237721-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=CjHuPvrdW5LNnKwvq1FscUDTL5LddRCUgGFkqqGJiJw&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Dwarf.cpp?rev=237721&r1=237720&r2=237721&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Support/Dwarf.cpp (original)<br>
+++ llvm/trunk/lib/Support/Dwarf.cpp Tue May 19 15:29:28 2015<br>
@@ -233,6 +233,10 @@ const char *llvm::dwarf::FormEncodingStr<br>
// DWARF5 Fission Extension Forms<br>
case DW_FORM_GNU_addr_index: return "DW_FORM_GNU_addr_index";<br>
case DW_FORM_GNU_str_index: return "DW_FORM_GNU_str_index";<br>
+<br>
+ // Alternate debug sections proposal (output of "dwz" tool).<br>
+ case DW_FORM_GNU_ref_alt: return "DW_FORM_GNU_ref_alt";<br>
+ case DW_FORM_GNU_strp_alt: return "DW_FORM_GNU_strp_alt";<br>
}<br>
return nullptr;<br>
}<br>
<br>
Added: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_Inputs_dwarfdump-2Dtest-2Ddwz.elf-2Dx86-2D64-3Frev-3D237721-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=6momEXUivXMs63hpEyjhgDmAd85ba2-66UmFnFsC_LQ&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64?rev=237721&view=auto</a><br>
==============================================================================<br>
Binary files llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64 (added) and llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64 Tue May 19 15:29:28 2015 differ<br>
<br>
Propchange: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test-dwz.elf-x86-64<br>
------------------------------------------------------------------------------<br>
svn:executable = *<br>
<br>
Modified: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.cc<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_Inputs_dwarfdump-2Dtest.cc-3Frev-3D237721-26r1-3D237720-26r2-3D237721-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=Hi1hMpeoS21h7OyA2KjoCsyqNOZkGri7-QtCQdzllGk&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.cc?rev=237721&r1=237720&r2=237721&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.cc (original)<br>
+++ llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.cc Tue May 19 15:29:28 2015<br>
@@ -21,3 +21,9 @@ int main() {<br>
// $ cp dwarfdump-test.cc /tmp/dbginfo<br>
// $ cd /tmp/dbginfo<br>
// $ clang++ -g dwarfdump-test.cc -o <output><br>
+<br>
+// The result is also used as an input to .dwz tool:<br>
+// $ cp <output> output1.dwz<br>
+// $ cp <output> output2.dwz<br>
+// $ dwz -m output.dwz -r output1.dwz output2.dwz<br>
+// $ rm output2.dwz<br>
<br>
Added: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.dwz<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_Inputs_dwarfdump-2Dtest.elf-2Dx86-2D64.dwz-3Frev-3D237721-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=iuRuYQfw889Ud2h16OBnvJ5hYmsX7FR74bFCq6HAVcU&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.dwz?rev=237721&view=auto</a><br>
==============================================================================<br>
Binary files llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.dwz (added) and llvm/trunk/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.dwz Tue May 19 15:29:28 2015 differ<br>
<br>
Added: llvm/trunk/test/DebugInfo/dwarfdump-dwz.test<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_dwarfdump-2Ddwz.test-3Frev-3D237721-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=qKBGOC1kqS-HLwAwaZ9FgG9or5hXq0RLL5Ob4J0XdtI&s=50CXXxUHLsE4bhz1V__GmpXYx0FY5GaHurI3M_0nOgg&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-dwz.test?rev=237721&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/test/DebugInfo/dwarfdump-dwz.test (added)<br>
+++ llvm/trunk/test/DebugInfo/dwarfdump-dwz.test Tue May 19 15:29:28 2015<br>
@@ -0,0 +1,14 @@<br>
+; RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test-dwz.elf-x86-64 -debug-dump=info | FileCheck %s -check-prefix DUMP_INFO<br>
+<br>
+; DUMP_INFO: .debug_info<br>
+; DUMP_INFO: DW_TAG_compile_unit [2] *<br>
+; DUMP_INFO-NEXT: DW_AT_producer [DW_FORM_GNU_strp_alt] (alt indirect string, offset: 0x0)<br>
+; DUMP_INFO-NEXT: DW_AT_language [DW_FORM_data2] (DW_LANG_C_plus_plus)<br>
+; DUMP_INFO-NEXT: DW_AT_name [DW_FORM_GNU_strp_alt] (alt indirect string, offset: 0x31)<br>
+; DUMP_INFO-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)<br>
+; DUMP_INFO-NEXT: DW_AT_stmt_list [DW_FORM_data4] (0x00000000)<br>
+; DUMP_INFO-NEXT: DW_AT_comp_dir [DW_FORM_GNU_strp_alt] (alt indirect string, offset: 0x6b)<br>
+<br>
+; DUMP_INFO: DW_TAG_imported_unit [4]<br>
+; DUMP_INFO-NEXT: DW_AT_import [DW_FORM_GNU_ref_alt] (<alt 0xb>)<br>
+<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>