I'm debugging a program in vs 2008. There is a thread list with thread IDs. Is the any way or tool that I can use to identify the parent thread of a given thread ID? Thanks.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
相关文章
- How to show location of errors, references to memb
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- How to track MongoDB requests from a console appli
- C++ default constructor does not initialize pointe
- Difference between Thread#run and Thread#wakeup?
- Selecting only the first few characters in a strin
I dont think you can do that, but I cant give you good explanation why. Just never heard of it as possible. I looked into Process Explorer, and it can give you only Start Address, but I doubt you can deduce parent thread ID from it.
If you need to do this in your app, then it should not be very difficult to implement, maybe it is even possible to hook system function to do that, but if SysInternals is not doing this then maybe this is not possible.
are you looking for programmatic way, or an external tool? if the later, try processExplorer. you can download it for free from MS, and it gives you the thread thread hierarchy plus a lot of other cool stuff.
There is no API, at least standard and documented, to obtain a creator thread ID for a given thread. Neither Performance Monitor, Visual Studio IDE, Process Explorer nor Spy++ provide this information. Once started, a thread is not dependent on its creator any longer and runs independently; there is no parent-child relation in particular.
I think Spy++ (it's called spyxx.exe and is located in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools on my machine) will give such information but it's hard work, however I am sure that sys internals do a much better version of process information