I am doing an audit of a C++ app running on Windows, compiled against multithreaded debug DLL. It has a lot of third party dependencies which can spawn threads. I need to track why each thread is there and how much stack space it is allocating.
What is a good way to trace back to the start of a thread's creation so I can see where it is spawned?
Update: I should point out I have the source code to the entire app outside of Microsoft dependencies. However, a lot of the threads have callstacks that exist exclusively inside of libraries that ship with the OS such as ntdll.dll and kernel32.dll.