[Lldb-commits] [lldb] r163439 - /lldb/trunk/source/Target/StackFrameList.cpp
Jim Ingham
jingham at apple.com
Fri Sep 7 17:26:50 PDT 2012
Author: jingham
Date: Fri Sep 7 19:26:49 2012
New Revision: 163439
URL: http://llvm.org/viewvc/llvm-project?rev=163439&view=rev
Log:
Fiddle with the heuristic about where to set the stop point in a nested inline stack when we get there by breakpoint. If we hit a user breakpoint, I set the stop point to the bottom-most frame 'cause that's what we did before.
<rdar://problem/12258999> Setting breakpoint in always inline function is stopping in function above it
Modified:
lldb/trunk/source/Target/StackFrameList.cpp
Modified: lldb/trunk/source/Target/StackFrameList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrameList.cpp?rev=163439&r1=163438&r2=163439&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrameList.cpp (original)
+++ lldb/trunk/source/Target/StackFrameList.cpp Fri Sep 7 19:26:49 2012
@@ -13,6 +13,8 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Breakpoint/Breakpoint.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/SourceManager.h"
@@ -155,6 +157,31 @@
// FIXME: Figure out what this break point is doing, and set the inline depth
// appropriately. Be careful to take into account breakpoints that implement
// step over prologue, since that should do the default calculation.
+ // For now, if the breakpoints corresponding to this hit are all internal,
+ // I set the stop location to the top of the inlined stack, since that will make
+ // things like stepping over prologues work right. But if there are any non-internal
+ // breakpoints I do to the bottom of the stack, since that was the old behavior.
+ uint32_t bp_site_id = stop_info_sp->GetValue();
+ BreakpointSiteSP bp_site_sp(m_thread.GetProcess()->GetBreakpointSiteList().FindByID(bp_site_id));
+ bool all_internal = true;
+ if (bp_site_sp)
+ {
+ uint32_t num_owners = bp_site_sp->GetNumberOfOwners();
+ for (uint32_t i = 0; i < num_owners; i++)
+ {
+ Breakpoint &bp_ref = bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint();
+ if (!bp_ref.IsInternal())
+ {
+ all_internal = false;
+ }
+ }
+ }
+ if (!all_internal)
+ {
+ m_current_inlined_pc = curr_pc;
+ m_current_inlined_depth = 0;
+ break;
+ }
}
default:
{
More information about the lldb-commits
mailing list