diff options
author | Jim Ingham <jingham@apple.com> | 2012-09-08 00:26:49 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-09-08 00:26:49 +0000 |
commit | c635500dbb70bab23b7196aa347f2008096103ed (patch) | |
tree | 0617c59670dfc246897eef4a094af253f415d72e /lldb/source/Target/StackFrameList.cpp | |
parent | 044f3e2694079cce9a5b1373ee145bcb5b2a35e7 (diff) | |
download | bcm5719-llvm-c635500dbb70bab23b7196aa347f2008096103ed.tar.gz bcm5719-llvm-c635500dbb70bab23b7196aa347f2008096103ed.zip |
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
llvm-svn: 163439
Diffstat (limited to 'lldb/source/Target/StackFrameList.cpp')
-rw-r--r-- | lldb/source/Target/StackFrameList.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index a21502516d1..801bbc3e352 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -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 @@ StackFrameList::ResetCurrentInlinedDepth () // 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: { |