473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Reading a threads program counter in C#


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.

Aug 16 '06 #1
2 1752
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<jo**************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>
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.

Aug 16 '06 #2

<jo**************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
|
| 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.
Aug 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: fishfry | last post by:
I'm learning about threads and I noticed there are two different ways I can implement a runnable object. In one way, I have one object and two threads; in the other way, I have two objects and two...
3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
5
by: Mike Goatly | last post by:
Hi, I need to be able to read the amount of processor time a thread has taken up. So far I've found the following methods open to me: 1) Find the relevant ProcessThread in the current...
34
by: Kovan Akrei | last post by:
Hi, I would like to know how to reuse an object of a thread (if it is possible) in Csharp? I have the following program: using System; using System.Threading; using System.Collections; ...
3
by: mjheitland | last post by:
Hi, I like to know how many threads are used by a Threading.Timer object. When I create a Threading.Timer object calling a short running method every 5 seconds I expected to have one additional...
3
by: Ritesh Raj Sarraf | last post by:
Hi, I have a small application, written in Python, that uses threads. The application uses function foo() to download files from the web. As it reads data from the web server, it runs a progress...
16
by: WATYF | last post by:
Hi there... I have a huge text file that needs to be processed. At the moment, I'm loading it into memory in small chunks (x amount of lines) and processing it that way. I'd like the process to be...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
1
by: GarySharma | last post by:
Program should accept user input and do appropriate actions. But program hangs after creating 60 threads, that is after 60 transaction even if user submits input it doesn't take. I read that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.