Reading a threads program counter in C#

  • Thread starter Thread starter joseandremorales
  • Start date Start date
J

joseandremorales

HI everyone, Im hoping you can help me with this question.

I have written an app in C# .NET to enumerate all currently running
processes in a pocketpc, i choose a process and then enumerate all of
it's associated threads. Im stuck on figuring out how I can read a
specific thread's R15 (program counter) to find out the next
instruction it is going to execute from within my c# program, any ideas
on this would be paramount and i thank for your time.

Jose.
 
Jose,

To what end are you trying to do this? For something like this, I don't
even know if it is possible to throttle threads like this. It would require
a custom hosting environment (custom CLR host) for sure, at the least, if it
even is possible.
 
|
| HI everyone, Im hoping you can help me with this question.
|
| I have written an app in C# .NET to enumerate all currently running
| processes in a pocketpc, i choose a process and then enumerate all of
| it's associated threads. Im stuck on figuring out how I can read a
| specific thread's R15 (program counter) to find out the next
| instruction it is going to execute from within my c# program, any ideas
| on this would be paramount and i thank for your time.
|
| Jose.
|

Absolutely impossible from within the running application, even a debugger
cannot do this without stopping the running target thread. What are you
trying to achieve?

Willy.
 
Back
Top