Exactly this.
I didn't try this, and I suppose that some low level pointer rewriting would be necessary to do this.
I'm not sure if it's expensive though, maybe you can replace the pointers without resolving the stacktrace.
When I debug multithreaded programs, the stacktrace of a breakpoint usually ends somewhere in a worker thread.
What I want is that the worker thread's stacktrace part is replaced by the one who put the work into it.
Kinda like the program wasn't multithreaded at all.
A question:
Would it be possible to pass the stacktrace of the current thread to another, so that the stacktrace would be traceable across threadpools or worker threads?