diff options
author | Daniel Jacobowitz <dan@debian.org> | 2005-07-13 15:02:49 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2005-07-13 15:02:49 +0000 |
commit | 9582bfeef4fa973e11c2e8375d5f5b2879add19b (patch) | |
tree | 410509d2fdf706ac17de2b11de04e4a060568e39 /gdb/gdbserver/remote-utils.c | |
parent | 90e2d78a8e7c46c21b3818f6ecdbc5ffd9209bdb (diff) | |
download | gdb-9582bfeef4fa973e11c2e8375d5f5b2879add19b.tar.gz |
* inferiors.c (struct thread_info): Add gdb_id.
(add_thread): Add gdb_id argument.
(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
* linux-low.c (linux_create_inferior, linux_attach_lwp): Update
calls to add_thread.
* remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
* server.c (handle_query): Use thread_to_gdb_id.
(handle_v_cont, main): Use gdb_id_to_thread_id.
* server.h (add_thread): Update prototype.
(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
prototypes.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 79792a502fb..f85d26210f5 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -683,6 +683,8 @@ prepare_resume_reply (char *buf, char status, unsigned char signo) { /* FIXME right place to set this? */ thread_from_wait = ((struct inferior_list_entry *)current_inferior)->id; + unsigned int gdb_id_from_wait = thread_to_gdb_id (current_inferior); + if (debug_threads) fprintf (stderr, "Writing resume reply for %ld\n\n", thread_from_wait); /* This if (1) ought to be unnecessary. But remote_wait in GDB @@ -692,7 +694,7 @@ prepare_resume_reply (char *buf, char status, unsigned char signo) if (1 || old_thread_from_wait != thread_from_wait) { general_thread = thread_from_wait; - sprintf (buf, "thread:%lx;", thread_from_wait); + sprintf (buf, "thread:%x;", gdb_id_from_wait); buf += strlen (buf); old_thread_from_wait = thread_from_wait; } |