hrev45748 adds 2 changesets to branch 'master' old head: 51e2dbe7f2df7178a0e232a69a87795dcd946084 new head: 7e6a958b0b8a15e726a670da262dd07a8f94614d overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=7e6a958+%5E51e2dbe ---------------------------------------------------------------------------- 07842a5: 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++). 7e6a958: Fix regression introduced in 6b308faf. That commit switched to a single string column for representing breakpoint locations, but neglected to update the case of a breakpoint in a non-debug function to actually format the address as a string appropriately, leading to those simply showing no data since then. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 5 insertions(+), 4 deletions(-) src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp | 3 ++- .../user_interface/gui/team_window/BreakpointListView.cpp | 6 +++--- ############################################################################ Commit: 07842a5be077c94761e264e93d6c1b97f189cd1e URL: http://cgit.haiku-os.org/haiku/commit/?id=07842a5 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Sat Jun 8 02:13:48 2013 UTC 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++). ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index 254fd36..58e478a 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<DwarfFunctionDebugInfo*>(_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<BLocker> locker(fLock); ############################################################################ Revision: hrev45748 Commit: 7e6a958b0b8a15e726a670da262dd07a8f94614d URL: http://cgit.haiku-os.org/haiku/commit/?id=7e6a958 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Sat Jun 8 02:32:32 2013 UTC Fix regression introduced in 6b308faf. That commit switched to a single string column for representing breakpoint locations, but neglected to update the case of a breakpoint in a non-debug function to actually format the address as a string appropriately, leading to those simply showing no data since then. ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/user_interface/gui/team_window/BreakpointListView.cpp b/src/apps/debugger/user_interface/gui/team_window/BreakpointListView.cpp index 8c6ba03..ba4b031 100644 --- a/src/apps/debugger/user_interface/gui/team_window/BreakpointListView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/BreakpointListView.cpp @@ -263,18 +263,18 @@ private: case 2: { LocatableFile* sourceFile = location.SourceFile(); + BString data; if (sourceFile != NULL) { - BString data; data.SetToFormat("%s:%" B_PRId32, sourceFile->Name(), location.GetSourceLocation().Line() + 1); - value.SetTo(data); } else { AutoLocker<Team> teamLocker(fTeam); if (UserBreakpointInstance* instance = breakpoint->InstanceAt(0)) { - value.SetTo(instance->Address()); + data.SetToFormat("%#" B_PRIx64, instance->Address()); } } + value.SetTo(data); return true; } default: