Files
clang-p2996/lldb/test/API/tools/lldb-dap/extendedStackTrace/main.m
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

29 lines
574 B
Objective-C

#import <dispatch/dispatch.h>
#include <stdio.h>
void one() {
printf("one...\n"); // breakpoint 1
}
void two() {
printf("two...\n");
one();
}
void three() {
printf("three...\n");
two();
}
int main(int argc, char *argv[]) {
printf("main...\n");
// Nest from main queue > global queue > main queue.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
^{
dispatch_async(dispatch_get_main_queue(), ^{
three();
});
});
dispatch_main();
}