Files
clang-p2996/lldb/test/API/tools/lldb-dap/stackTrace/main.c
John Harrison 5b4100cc35 [lldb-dap] Improve stackTrace and exceptionInfo DAP request handlers (#105905)
Refactoring `stackTrace` to perform frame look ups in a more on-demand
fashion to improve overall performance.

Additionally adding additional information to the `exceptionInfo`
request to report exception stacks there instead of merging the
exception stack into the stack trace. The `exceptionInfo` request is
only called if a stop event occurs with `reason='exception'`, which
should mitigate the performance of `SBThread::GetCurrentException`
calls.

Adding unit tests for exception handling and stack trace supporting.
2024-09-10 12:40:20 -07:00

14 lines
259 B
C

#include <stdio.h>
#include <unistd.h>
int recurse(int x) {
if (x <= 1)
return 1; // recurse end
return recurse(x - 1) + x; // recurse call
}
int main(int argc, char const *argv[]) {
recurse(40); // recurse invocation
return 0;
}