[llvm] r301527 - [llvm-dwarfdump] - Change format for .gdb_index dump.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 03:00:14 PDT 2017
Author: grimar
Date: Thu Apr 27 05:00:13 2017
New Revision: 301527
URL: http://llvm.org/viewvc/llvm-project?rev=301527&view=rev
Log:
[llvm-dwarfdump] - Change format for .gdb_index dump.
It is useful to output size of ranges when address ranges
section of .gdb_index is dumped.
It helps to compare outputs produced by different linkers,
for example. In that case address ranges can look very different,
when they are the same at fact. Difference comes from different
low address because of different address of .text.
Differential revision: https://reviews.llvm.org/D32492
Modified:
llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp
llvm/trunk/test/DebugInfo/dwarfdump-dump-gdbindex.test
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp?rev=301527&r1=301526&r2=301527&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFGdbIndex.cpp Thu Apr 27 05:00:13 2017
@@ -39,8 +39,9 @@ void DWARFGdbIndex::dumpAddressArea(raw_
<< '\n';
for (const AddressEntry &Addr : AddressArea)
OS << format(
- " Low address = 0x%llx, High address = 0x%llx, CU index = %d\n",
- Addr.LowAddress, Addr.HighAddress, Addr.CuIndex);
+ " Low/High address = [0x%llx, 0x%llx) (Size: 0x%llx), CU id = %d\n",
+ Addr.LowAddress, Addr.HighAddress, Addr.HighAddress - Addr.LowAddress,
+ Addr.CuIndex);
}
void DWARFGdbIndex::dumpSymbolTable(raw_ostream &OS) const {
Modified: llvm/trunk/test/DebugInfo/dwarfdump-dump-gdbindex.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-dump-gdbindex.test?rev=301527&r1=301526&r2=301527&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/dwarfdump-dump-gdbindex.test (original)
+++ llvm/trunk/test/DebugInfo/dwarfdump-dump-gdbindex.test Thu Apr 27 05:00:13 2017
@@ -18,8 +18,8 @@ RUN: llvm-dwarfdump -debug-dump=gdb_inde
; CHECK-NEXT: 1: Offset = 0x34, Length = 0x34
; CHECK: Address area offset = 0x38, has 2 entries:
-; CHECK-NEXT: Low address = 0x4000e8, High address = 0x4000f3, CU index = 0
-; CHECK-NEXT: Low address = 0x4000f3, High address = 0x4000fe, CU index = 1
+; CHECK-NEXT: Low/High address = [0x4000e8, 0x4000f3) (Size: 0xb), CU id = 0
+; CHECK-NEXT: Low/High address = [0x4000f3, 0x4000fe) (Size: 0xb), CU id = 1
; CHECK: Symbol table offset = 0x60, size = 1024, filled slots:
; CHECK-NEXT: 489: Name offset = 0x1d, CU vector offset = 0x0
More information about the llvm-commits
mailing list