qemu-e2k/linux-user
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
..
alpha Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
arm Fix compiler warnings in nwfpe code. 2009-05-04 15:19:04 +01:00
cris CRIS: Add a bunch of syscall numbers. 2009-01-07 19:47:53 +00:00
i386 Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
m68k Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
microblaze microblaze: Add syscall, signal and termbits defs for linux-user. 2009-05-26 21:10:21 +02:00
mips MIPS signal handling fixes. 2009-04-21 01:41:10 +00:00
mips64
mipsn32
ppc linux-user: ppc signal handling 2009-05-16 01:36:12 +04:00
sh4
sparc Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
sparc64 Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
x86_64
elfload32.c
elfload.c microblaze: linux-user support. 2009-05-26 21:10:28 +02:00
envlist.c linux-user: Add generic env variable handling 2009-01-30 19:59:17 +00:00
envlist.h linux-user: Add generic env variable handling 2009-01-30 19:59:17 +00:00
errno_defs.h Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
flat.h
flatload.c Replace gcc variadic macro extension with C99 version 2009-05-13 17:53:17 +00:00
ioctls.h
linux_loop.h
linuxload.c
m68k-sim.c Fix more FSF addresses 2009-01-05 18:11:53 +00:00
main.c microblaze: linux-user support. 2009-05-26 21:10:28 +02:00
mmap.c Partialy fix mmap at EOF for large pagesize targets in user-mode. 2009-02-03 23:06:34 +00:00
path.c linux-user: don't crash with null name 2009-01-30 19:48:07 +00:00
qemu-types.h
qemu.h Avoid implicit truncation compiler warnings 2009-05-19 15:42:39 +01:00
signal.c microblaze: linux-user support. 2009-05-26 21:10:28 +02:00
socket.h
strace.c Use the ARRAY_SIZE() macro where appropriate. 2008-12-22 20:33:55 +00:00
strace.list linux-user: Added posix message queue syscalls except mq_notify 2009-04-15 16:11:43 +00:00
syscall_defs.h microblaze: linux-user support. 2009-05-26 21:10:28 +02:00
syscall_types.h
syscall.c fix gdbstub support for multiple threads in usermode, v3 2009-06-04 10:04:49 +01:00
uaccess.c
vm86.c Convert references to logfile/loglevel to use qemu_log*() macros 2009-01-15 22:34:14 +00:00