[lldb-dev] Problem unwinding from inside of a CRT function
Hafiz Abid Qadeer
hafiz_abid at mentor.com
Tue Jan 20 04:21:09 PST 2015
On 16/01/15 21:53:00, Greg Clayton wrote:
> How about:
>
> 2 for (int i=0; i<100; i++)
> 3 -> printf ("i = %i\n", i); //
> 4 printf ("this won't be executed after line 3 except for the
> last
> time\n");
>
> If you set a breakpoint on line 4 after line 3 when you will fail to
> return to line 3 when single stepping.
>
> How about:
>
> 2 -> goto carp;
> 3 puts("won't ever be executed");
> 4 carp:
> 5 puts("will get executed");
>
> If you set a breakpoint at line 3 you won't stop.
>
> Another:
>
> 2 -> throw foo();
> 3 puts("this will never get hit");
>
> If you set a breakpoint at line 3 you will never hit it.
>
> Please trust that we know what we are doing when it comes to single
> stepping. I am glad you are thinking about how things are done, but
> just be sure think about the problem in a wider scope than "the code
> I
> am thinking about is linear" and think about all sorts of single
> stepping and what you would expect to happen.
In a properietary debugger that we developed in house, we spent quite a
bit of effort on making this work mixing emulation and symbol
information. It made a real improvements when debuggign remote
targets using slow connections. There was always the fall back on
stepping individual instruction when it did not work.
GDB also has range stepping thing now.
https://sourceware.org/ml/gdb-patches/2013-03/msg00450.html
Regards,
Abid
More information about the lldb-dev
mailing list