Nathan Froyd 1e9fa73016 fix gdbstub support for multiple threads in usermode, v3
When debugging multi-threaded programs, QEMU's gdb stub would report the
correct number of threads (the qfThreadInfo and qsThreadInfo packets).
However, the stub was unable to actually switch between threads (the T
packet), since it would report every thread except the first as being
dead.  Furthermore, the stub relied upon cpu_index as a reliable means
of assigning IDs to the threads.  This was a bad idea; if you have this
sequence of events:

initial thread created
new thread #1
new thread #2
thread #1 exits
new thread #3

thread #3 will have the same cpu_index as thread #1, which would confuse
GDB.  (This problem is partly due to the remote protocol not having a
good way to send thread creation/destruction events.)

We fix this by using the host thread ID for the identifier passed to GDB
when debugging a multi-threaded userspace program.  The thread ID might
wrap, but the same sort of problems with wrapping thread IDs would come
up with debugging programs natively, so this doesn't represent a
problem.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
2009-06-04 10:04:49 +01:00
2009-05-13 20:54:26 +01:00
2009-05-19 16:17:58 +01:00
2009-05-13 20:54:26 +01:00
2009-05-08 15:24:10 -05:00
2009-03-07 21:48:00 +00:00
2009-05-27 09:46:03 -05:00
2009-03-10 21:43:35 +00:00
2009-04-07 17:57:09 +00:00
2009-04-07 17:57:09 +00:00
2009-05-19 16:17:58 +01:00
2009-05-26 21:10:28 +02:00
2009-05-13 20:54:26 +01:00
2009-05-24 21:24:33 +01:00
2009-05-26 21:10:28 +02:00
2009-05-26 21:10:28 +02:00
2009-05-27 09:46:03 -05:00
2009-05-26 21:10:28 +02:00
2009-03-08 12:41:36 +00:00
2009-05-30 01:59:37 +01:00
2009-05-28 14:00:49 +02:00
2009-05-25 18:56:13 +01:00
2009-05-26 21:10:28 +02:00
2009-05-28 02:14:56 -05:00
2009-05-13 22:21:47 +01:00
2009-05-08 15:51:19 -05:00
2009-05-14 22:35:09 +01:00
2009-05-09 23:22:35 +01:00
2009-05-19 22:29:20 +04:00
2009-05-22 10:50:31 -05:00
2009-05-22 10:50:31 -05:00
2009-05-08 16:11:49 -05:00
2009-05-14 17:03:49 -05:00
2009-04-07 21:47:27 +00:00
2009-05-30 01:59:37 +01:00
2009-05-13 22:21:47 +01:00
2009-05-22 10:50:35 -05:00
2009-05-30 01:59:37 +01:00

Read the documentation in qemu-doc.html.

Fabrice Bellard.
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%