[Lldb-commits] [PATCH] D64769: [lldb][test_suite] change the test main.cpp to avoid expression reschedule

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 17 08:27:39 PDT 2019

davide added a comment.

That real

In D64769#1587992 <https://reviews.llvm.org/D64769#1587992>, @kusmour wrote:

> In D64769#1587318 <https://reviews.llvm.org/D64769#1587318>, @labath wrote:
> > The change is fine, but for my own education, could you elaborate on what this "delayed calculation" is, and how does it make the test fail?
> The test set the breakpoint to the return statement, even thought the compiler flag `-O0` was set, the first hit to that bp showed that `g_common_1 = 0` which actually should be 21. The test assume when we hit the return statement, the value should already be calculated, but that's not the case for NDK20 clang.
> So we reproduce the test manually, turned out that the value was calculated later. lldb first hit the return statement then jump back to line 20. By looking at the assembly that clang provided, it indeed jump back and forth.
> It's possible that the jumping behavior is caused by optimization, considering there're some other tests having similar problem, and the behavior changed a lot from NDK 19 to 20. I made this change because this is irrelevant to testing global variables.

that really sounds like a DebugInfo problem. Can you reproduce on ToT?




More information about the lldb-commits mailing list