Files
clang-p2996/lldb/test/API/tools/lldb-vscode/optimized/main.cpp
Jeffrey Tan 46c1f77e16 Add [opt] suffix to optimized stack frame in lldb-vscode
To help user identify optimized code This diff adds a "[opt]" suffix to
optimized stack frames in lldb-vscode. This provides consistent experience
as command line lldb.

It also adds a new "optimized" attribute to DAP stack frame object so that
it is easy to identify from telemetry than parsing trailing "[opt]".

Differential Revision: https://reviews.llvm.org/D126013
2022-05-23 10:03:13 -07:00

17 lines
384 B
C++

#include <stdio.h>
#include <string>
int foo(int x, int y) {
printf("Got input %d, %d\n", x, y);
return x + y + 3; // breakpoint 1
}
int main(int argc, char const *argv[]) {
int optimized = argc > 1 ? std::stoi(argv[1]) : 0;
printf("argc: %d, optimized: %d\n", argc, optimized);
int result = foo(argc, 20);
printf("result: %d\n", result); // breakpoint 2
return 0;
}