From 07842a5be077c94761e264e93d6c1b97f189cd1e Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Fri, 7 Jun 2013 22:13:48 -0400 Subject: [PATCH] Fall back to disassembly in case typecast fails. Since some time now, we construct minimal dwarf image debug infos for release images if they contain frame unwind information, in order to allow using that to unwind the stack in as many cases as possible. As such, it's entirely possible that such an image may be asked for statement information regarding a function that isn't in fact compiled with debugging. As such, we need to simply fall back to disassembly rather than failing entirely. Fixes setting breakpoints in such functions (i.e. anything in a release version of libstdc++). --- src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index 254fd36ce0..58e478ace2 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -705,7 +705,8 @@ DwarfImageDebugInfo::GetStatement(FunctionDebugInfo* _function, = dynamic_cast(_function); if (function == NULL) { TRACE_LINES(" -> no dwarf function\n"); - return B_BAD_VALUE; + // fall back to assembly + return fArchitecture->GetStatement(function, address, _statement); } AutoLocker locker(fLock);