[llvm] 292b67f - [DebugInfo] Use "an address table" in diagnostic messages of DWARFDebugAddr.

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 22:36:22 PST 2020


Author: Igor Kudrin
Date: 2020-02-12T13:33:00+07:00
New Revision: 292b67f99310d10229e14dc0ece18855e22d11cc

URL: https://github.com/llvm/llvm-project/commit/292b67f99310d10229e14dc0ece18855e22d11cc
DIFF: https://github.com/llvm/llvm-project/commit/292b67f99310d10229e14dc0ece18855e22d11cc.diff

LOG: [DebugInfo] Use "an address table" in diagnostic messages of DWARFDebugAddr.

This replaces a collocation "a .debug_addr table" with "an address table"
because the latter sounds more accurate.

Differential Revision: https://reviews.llvm.org/D74407

Added: 
    

Modified: 
    llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_not_multiple.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_segment_selector.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_small_length_field.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_section.s
    llvm/test/tools/llvm-dwarfdump/X86/debug_addr_version_mismatch.s

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
index 591c35b8532f..72aadda8c600 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
@@ -28,8 +28,8 @@ Error DWARFDebugAddrTable::extract(DWARFDataExtractor Data,
   // Read and verify the length field.
   if (!Data.isValidOffsetForDataOfSize(*OffsetPtr, sizeof(uint32_t)))
     return createStringError(errc::invalid_argument,
-                       "section is not large enough to contain a "
-                       ".debug_addr table length at offset 0x%"
+                       "section is not large enough to contain an "
+                       "address table length at offset 0x%"
                        PRIx64, *OffsetPtr);
   uint16_t UnitVersion;
   if (Version == 0) {
@@ -54,7 +54,7 @@ Error DWARFDebugAddrTable::extract(DWARFDataExtractor Data,
       uint32_t TmpLength = getLength();
       invalidateLength();
       return createStringError(errc::invalid_argument,
-                         ".debug_addr table at offset 0x%" PRIx64
+                         "address table at offset 0x%" PRIx64
                          " has too small length (0x%" PRIx32
                          ") to contain a complete header",
                          HeaderOffset, TmpLength);
@@ -64,7 +64,7 @@ Error DWARFDebugAddrTable::extract(DWARFDataExtractor Data,
       uint32_t TmpLength = getLength();
       invalidateLength();
       return createStringError(errc::invalid_argument,
-          "section is not large enough to contain a .debug_addr table "
+          "section is not large enough to contain an address table "
           "of length 0x%" PRIx32 " at offset 0x%" PRIx64,
           TmpLength, HeaderOffset);
     }
@@ -97,33 +97,33 @@ Error DWARFDebugAddrTable::extract(DWARFDataExtractor Data,
   // attribute in the info table.
   if (HeaderData.Version != UnitVersion)
     return createStringError(errc::invalid_argument,
-                       ".debug_addr table at offset 0x%" PRIx64
+                       "address table at offset 0x%" PRIx64
                        " has version %" PRIu16
                        " which is 
diff erent from the version suggested"
                        " by the DWARF unit header: %" PRIu16,
                        HeaderOffset, HeaderData.Version, UnitVersion);
   if (HeaderData.AddrSize != 4 && HeaderData.AddrSize != 8)
     return createStringError(errc::not_supported,
-                       ".debug_addr table at offset 0x%" PRIx64
+                       "address table at offset 0x%" PRIx64
                        " has unsupported address size %" PRIu8,
                        HeaderOffset, HeaderData.AddrSize);
   if (HeaderData.AddrSize != AddrSize && AddrSize != 0)
     WarnCallback(createStringError(
         errc::invalid_argument,
-        ".debug_addr table at offset 0x%" PRIx64 " has address size %" PRIu8
+        "address table at offset 0x%" PRIx64 " has address size %" PRIu8
         " which is 
diff erent from CU address size %" PRIu8,
         HeaderOffset, HeaderData.AddrSize, AddrSize));
 
   // TODO: add support for non-zero segment selector size.
   if (HeaderData.SegSize != 0)
     return createStringError(errc::not_supported,
-                       ".debug_addr table at offset 0x%" PRIx64
+                       "address table at offset 0x%" PRIx64
                        " has unsupported segment selector size %" PRIu8,
                        HeaderOffset, HeaderData.SegSize);
   if (DataSize % HeaderData.AddrSize != 0) {
     invalidateLength();
     return createStringError(errc::invalid_argument,
-                       ".debug_addr table at offset 0x%" PRIx64
+                       "address table at offset 0x%" PRIx64
                        " contains data of size %" PRIu32
                        " which is not a multiple of addr size %" PRIu8,
                        HeaderOffset, DataSize, HeaderData.AddrSize);
@@ -159,8 +159,8 @@ Expected<uint64_t> DWARFDebugAddrTable::getAddrEntry(uint32_t Index) const {
   if (Index < Addrs.size())
     return Addrs[Index];
   return createStringError(errc::invalid_argument,
-                           "Index %" PRIu32 " is out of range of the "
-                           ".debug_addr table at offset 0x%" PRIx64,
+                           "Index %" PRIu32 " is out of range in the "
+                           "address table at offset 0x%" PRIx64,
                            Index, HeaderOffset);
 }
 

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s
index fca66237ee00..d5fdf5dc3d88 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s
@@ -2,7 +2,7 @@
 # RUN: llvm-dwarfdump -debug-addr - 2> %t.warn | FileCheck %s
 # RUN: FileCheck %s -input-file %t.warn -check-prefix=WARN
 
-# WARN: .debug_addr table at offset 0x0 has address size 8 which is 
diff erent from CU address size 4
+# WARN: address table at offset 0x0 has address size 8 which is 
diff erent from CU address size 4
 # WARN-NOT: {{.}}
 
 # CHECK: .debug_addr contents

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_not_multiple.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_not_multiple.s
index e8835e087962..eaae931898bf 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_not_multiple.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_not_multiple.s
@@ -4,7 +4,7 @@
 
 # CHECK: .debug_addr contents:
 # CHECK-NOT: {{.}}
-# ERR: .debug_addr table at offset 0x0 contains data of size 7 which is not a multiple of addr size 4
+# ERR: address table at offset 0x0 contains data of size 7 which is not a multiple of addr size 4
 # ERR-NOT: {{.}}
 
 # data size is not multiple of address_size

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_segment_selector.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_segment_selector.s
index 21f0322fd2ec..3200b4f2da3b 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_segment_selector.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_segment_selector.s
@@ -4,7 +4,7 @@
 
 # CHECK: .debug_addr contents:
 # CHECK-NOT: {{.}}
-# ERR: .debug_addr table at offset 0x0 has unsupported segment selector size 1
+# ERR: address table at offset 0x0 has unsupported segment selector size 1
 # ERR-NOT: {{.}}
 
 # non-zero segment_selector_size

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_small_length_field.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_small_length_field.s
index cbecb98e6bec..50c865f207dc 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_small_length_field.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_small_length_field.s
@@ -4,7 +4,7 @@
 
 # CHECK: .debug_addr contents:
 # CHECK-NOT: {{.}}
-# ERR: .debug_addr table at offset 0x0 has too small length (0x5) to contain a complete header
+# ERR: address table at offset 0x0 has too small length (0x5) to contain a complete header
 # ERR-NOT: {{.}}
 
 # too small length value

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
index c26bfcb02e0a..dcec7dad5f9e 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
@@ -4,7 +4,7 @@
 
 # CHECK: .debug_addr contents:
 # CHECK-NOT: {{.}}
-# ERR: section is not large enough to contain a .debug_addr table length at offset 0x0
+# ERR: section is not large enough to contain an address table length at offset 0x0
 # ERR-NOT: {{.}}
 
 # too small section to contain length field

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_section.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_section.s
index facffee69fb6..98468fa36812 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_section.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_section.s
@@ -4,7 +4,7 @@
 
 # CHECK: .debug_addr contents:
 # CHECK-NOT: {{.}}
-# ERR: section is not large enough to contain a .debug_addr table of length 0x10 at offset 0x0
+# ERR: section is not large enough to contain an address table of length 0x10 at offset 0x0
 # ERR-NOT: {{.}}
 
 # too small section to contain section of given length

diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_version_mismatch.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_version_mismatch.s
index e349f3386a6c..788e102f4f02 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_version_mismatch.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_addr_version_mismatch.s
@@ -2,7 +2,7 @@
 # RUN: llvm-dwarfdump -debug-addr - 2> %t.err | FileCheck %s
 # RUN: FileCheck %s -input-file %t.err -check-prefix=ERR
 
-# ERR: .debug_addr table at offset 0x0 has version 4 which is 
diff erent from the version suggested by the DWARF unit header: 5
+# ERR: address table at offset 0x0 has version 4 which is 
diff erent from the version suggested by the DWARF unit header: 5
 # ERR-NOT: {{.}}
 
 # CHECK: .debug_addr contents


        


More information about the llvm-commits mailing list