Reading a threads program counter in C#

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
W

Willy Denoyette [MVP]

|
| 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top