This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: processor threads


nagaraju.m wrote:
Hi Michael,

I mean to say that we are having 4 hardware threads. Our company has its own processor on which we will be working. The processor currently we are working has 4 threads in it.

Each thread has it own set of registers (ex: program counter).

Currently the GDB which we are using is supporting only single thread (ex: thread 0).
Now we trying to use GDB for remaining threads.


My Question is does GDB handles hardware threads??

Good, thank you for the clarification.


The answer is "yes and no".  GDB supports threads, per se, but
it doesn't have any special knowledge about hardware threads
as opposed to any other kind of threads.

What you can do (and what others have done successfully before),
is just teach your remote server/stub/agent to tell gdb
"I have four threads, and here are their register sets".

Gdb will then just think of them as ordinary threads.
Should be enough for you to get the job done, with maybe
a few extra tweaks that can be snuck in as off-band
monitor commands.

Good luck,
Michael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]