From a5bee836388067c5e1926ce2f3bd734f47364b2b Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Thu, 18 Jul 2013 19:06:27 -0400 Subject: [PATCH] DwarfFile: Slight cosmetic change to trace output. Output the DIE trace for a type unit after we've read the signature and type offset so we can include those as well. --- src/apps/debugger/dwarf/DwarfFile.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index d0d889d4cc..517c4416a9 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -1007,9 +1007,21 @@ DwarfFile::_ParseTypesSection() break; } + dataReader.SetAddressSize(addressSize); + + uint64 signature = dataReader.Read(0); + + off_t typeOffset = dwarf64 + ? dataReader.Read(0) + : dataReader.Read(0); + + off_t unitContentOffset = dataReader.Offset(); + TRACE_DIE("DWARF%d type unit: version %d, length: %" B_PRIu64 - ", abbrevOffset: %" B_PRIdOFF ", address size: %d\n", - dwarf64 ? 64 : 32, version, unitLength, abbrevOffset, addressSize); + ", abbrevOffset: %" B_PRIdOFF ", address size: %d, " + "signature: %#" B_PRIx64 ", type offset: %" B_PRIu64 "\n", + dwarf64 ? 64 : 32, version, unitLength, abbrevOffset, addressSize, + signature, typeOffset); if (version > 4) { WARNING("\"%s\": Unsupported type unit version: %d\n", @@ -1022,15 +1034,6 @@ DwarfFile::_ParseTypesSection() addressSize); break; } - dataReader.SetAddressSize(addressSize); - - uint64 signature = dataReader.Read(0); - - off_t typeOffset = dwarf64 - ? dataReader.Read(0) - : dataReader.Read(0); - - off_t unitContentOffset = dataReader.Offset(); // create a type unit object TypeUnit* unit = new(std::nothrow) TypeUnit(