Community
cancel
Showing results for 
Search instead for 
Did you mean: 
eric_lee1
Beginner
64 Views

How can I obtain the content of another Logic CPU's register?

In a hyper-threading processor, are there any ways to get the content of another logic CPU's register at runtime? For example, in a hyper-threading processor, is there any ways that the foreground thread can obtain the register content of background thread?

Thanks!
0 Kudos
2 Replies
robert-reed
Valued Contributor II
64 Views

Quoting - eric_lee
In a hyper-threading processor, are there any ways to get the content of another logic CPU's register at runtime? For example, in a hyper-threading processor, is there any ways that the foreground thread can obtain the register content of background thread?

Thanks!

Not really. The processors are logically distinct but they are distinct none the less. There is no foreground or background thread--they are truly peers that share physical hardware with sufficient status to preserve theirlogical separation.

Dmitry_Vyukov
Valued Contributor I
64 Views

Quoting - eric_lee
In a hyper-threading processor, are there any ways to get the content of another logic CPU's register at runtime? For example, in a hyper-threading processor, is there any ways that the foreground thread can obtain the register content of background thread?

Thanks!

On Windows you can always suspend thread with SuspendThread(), and then receive thread context with GetThreadContext(). From obtained CONTEXT structure you can get contents of any register. However I'm not sure whether it's what you are looking for or not.

Reply