[lldb-dev] Problem unwinding from inside of a CRT function

Zachary Turner zturner at google.com
Tue Mar 10 17:41:01 PDT 2015

Ok crisis averted.  Part of why this thread dragged out for so long is
because I kept thinking it did this all the way down and it seemed
unnecessary and problematic to allow code arbitrarily deep on the stack to
mess up unwinding.


On Tue, Mar 10, 2015 at 5:35 PM Greg Clayton <gclayton at apple.com> wrote:

> > On Mar 10, 2015, at 5:26 PM, Zachary Turner <zturner at google.com> wrote:
> >
> > I'm going to be revisiting this soon, but one thing I was never clear
> about.
> >
> > If I step over a function call, does it do this algorithm of single
> stepping a call instruction and then running until the next branch point
> _all the way down_, or does it only do it one level deep?  In other words,
> say I have this code
> >
> > void baz() {
> >   printf("Test");
> > }
> >
> > void bar() {
> >    baz();
> > }
> >
> > void foo() {
> >    bar();
> > }
> >
> > and I'm inside of foo(), and I want to step over bar.  It will single
> step the call, end up inside of bar.  Then run to the next branch point.
> Does it now single step baz, end up in baz, run to next branch point, and
> then single step printf, and then continue this all the way down?  Or once
> it figures out where it is inside of bar, that's sufficient to let it run
> until the return address?
> The latter. It will stop at the first instruction of "bar()" and then set
> a BP on the return address and continue to it, then continue with the
> source level single step over you started with (if there are any
> instructions left after the return BP is hit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150311/c547ea6e/attachment.html>

More information about the lldb-dev mailing list