From 855f2c88d3c15f9c0ee9e7b799bb6bb0678d5c87 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 25 Dec 2012 09:35:43 -0500 Subject: [PATCH] Add some more information to CIE parsing failure messages. --- src/apps/debugger/dwarf/DwarfFile.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index e9bb094f29..14ba4bbb7b 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -287,14 +287,20 @@ struct DwarfFile::CIEAugmentation { --remaining; break; default: + WARNING("Encountered unsupported augmentation '%c' " + " while parsing CIE augmentation string %s\n", + *string, fString); return B_UNSUPPORTED; } string++; } - dataReader.Skip(remaining); + // we should have read through all of the augmentation data + // at this point, if not, something is wrong. if (remaining != 0 || dataReader.HasOverflow()) { - WARNING("Error while reading CIE Augmentation\n"); + WARNING("Error while reading CIE Augmentation, expected " + "%" B_PRIu64 " bytes of augmentation data, but read " + "%" B_PRIu64 " bytes.\n", length, length - remaining); return B_BAD_DATA; }