diff options
author | Greg Clayton <gclayton@apple.com> | 2011-05-17 17:37:43 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-05-17 17:37:43 +0000 |
commit | 7a9ef8f11b4a1e6ee0dacf498829c42d36a63728 (patch) | |
tree | 5957618bfab55b223321a4b6b6051661dd297496 /lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | |
parent | c65d8eda7bb8808de16a449b2a61e42e586c6bb5 (diff) | |
download | bcm5719-llvm-7a9ef8f11b4a1e6ee0dacf498829c42d36a63728.tar.gz bcm5719-llvm-7a9ef8f11b4a1e6ee0dacf498829c42d36a63728.zip |
Removed some assertions that could crash the controlling program
and turned them into warnings to stderr.
llvm-svn: 131470
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index 69f1c7b5a2b..675c4bc09e0 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -400,7 +400,7 @@ DWARFDebugLine::Parse(const DataExtractor& debug_line_data, DWARFDebugLine::Stat bool DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* offset_ptr, Prologue* prologue) { -// const uint32_t prologue_offset = *offset_ptr; + const uint32_t prologue_offset = *offset_ptr; //DEBUG_PRINTF("0x%8.8x: ParsePrologue()\n", *offset_ptr); @@ -453,7 +453,11 @@ DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* break; } - assert(*offset_ptr == end_prologue_offset); + if (*offset_ptr != end_prologue_offset) + { + fprintf (stderr, "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8x\n", + prologue_offset, end_prologue_offset, *offset_ptr); + } return end_prologue_offset; } @@ -532,7 +536,11 @@ DWARFDebugLine::ParseSupportFiles(const DataExtractor& debug_line_data, const ch } } - assert(offset == end_prologue_offset); + if (offset != end_prologue_offset) + { + fprintf (stderr, "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8x\n", + stmt_list, end_prologue_offset, offset); + } return end_prologue_offset; } @@ -576,8 +584,6 @@ DWARFDebugLine::ParseStatementTable const dw_offset_t end_offset = debug_line_offset + prologue->total_length + sizeof(prologue->total_length); - assert(debug_line_data.ValidOffset(end_offset-1)); - State state(prologue, log, callback, userData); while (*offset_ptr < end_offset) |