Debugger steps deeper when trying to step out of C++11 std lib

后端 未结 2 1639
情话喂你
情话喂你 2020-12-19 01:17

I\'m using (Apple) LLVM 4.1 within Xcode 4.5 (but I saw the same thing in an earlier beta). I have it targeting C++11 and am using libc++ (the new, C++11 enabled, LLVM versi

相关标签:
2条回答
  • 2020-12-19 01:50

    lldb in Xcode 4.5 doesn't handle stepping over inlined functions. The libc++ standard library has many functions that are always inlined, even when built at -O0, which makes this a problem. It looks like Jim Ingham worked on this about a month ago, e.g. see the first patch http://llvm.org/viewvc/llvm-project?view=rev&revision=163044 and several follow-on patches over the following week or two, but of course those aren't in a released version of lldb yet. You can build and use a command line version of lldb from the public site, http://lldb.llvm.org/ (see in particular http://lldb.llvm.org/build.html ), the only tricky bit is to remember to follow the code signing instructions in lldb/docs/code-signing.txt.

    0 讨论(0)
  • 2020-12-19 01:50

    I've seen this too, and not only with libc++, also with libstdc++ (the GNU C++ standard library, used by GCC and by clang in C++03-mode). I've always figured it's due to inlining, which I guess sometimes happens in debug builds too.

    0 讨论(0)
提交回复
热议问题