Closed ggarra13 closed 2 months ago
Hi, you can generate a trace from any thread and tracing is thread-safe. Currently cpptrace doesn't support any way to generate a trace for another thread, if that's what you refer to. I've looked into supporting that but it's tricky, this also came up in #135.
I'll go ahead and close for now, please let me know if there's anything else!
I'll quickly add, if you are interested in getting the stacktrace of another thread on linux, most implementations I've seen for this involve sending SIGUSR1/SIGUSR2 to the thread you want to trace with pthread_kill
. It should be possible to use cpptrace's signal-safe trace support in this handler, though there are a lot of choices for how one could go about trying to do the resolution and pass information around.
I am mainly interested in Linux, but Windows support would be nice too.