aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-proc.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2003-06-19 22:52:04 +0000
committerMichael Snyder <msnyder@vmware.com>2003-06-19 22:52:04 +0000
commit0274a8cedbd446865a1e5fdec8057f4a327e19aa (patch)
tree65a8a30cdbc33868844ea760ca2628bf9e87535a /gdb/linux-proc.c
parentadf5f719da64a54fa206ad15a5eebde9abbe2666 (diff)
downloadgdb-0274a8cedbd446865a1e5fdec8057f4a327e19aa.zip
gdb-0274a8cedbd446865a1e5fdec8057f4a327e19aa.tar.gz
gdb-0274a8cedbd446865a1e5fdec8057f4a327e19aa.tar.bz2
2003-06-19 Michael Snyder <msnyder@redhat.com>
* linux-nat.h: New file. * linux-nat.c: Include linux-nat.h. * lin-lwp.c: Include linux-nat.h. Move struct lwp_info def to linux-nat.h. * linux-proc.c: Include linux-nat.h. (linux_make_note_section): Iterate over lwps instead of threads. (linux_do_thread_registers): Use lwp instead of merged pid. * config/nm-linux.h: Move miscelaneous def'ns to linux-nat.h. * Makefile.in (lin-lwp.o, linux-proc.o, linux-nat.o): Add dependency on linux_nat_h.
Diffstat (limited to 'gdb/linux-proc.c')
-rw-r--r--gdb/linux-proc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index a951296..e4ea747 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -35,6 +35,8 @@
#include "cli/cli-decode.h" /* for add_info */
#include "gdb_string.h"
+#include "linux-nat.h"
+
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
@@ -171,13 +173,13 @@ linux_do_thread_registers (bfd *obfd, ptid_t ptid,
#ifdef FILL_FPXREGSET
gdb_fpxregset_t fpxregs;
#endif
- unsigned long merged_pid = ptid_get_tid (ptid) << 16 | ptid_get_pid (ptid);
+ unsigned long lwp = ptid_get_lwp (ptid);
fill_gregset (&gregs, -1);
note_data = (char *) elfcore_write_prstatus (obfd,
note_data,
note_size,
- merged_pid,
+ lwp,
stop_signal, &gregs);
fill_fpregset (&fpregs, -1);
@@ -210,7 +212,7 @@ struct linux_corefile_thread_data
*/
static int
-linux_corefile_thread_callback (struct thread_info *ti, void *data)
+linux_corefile_thread_callback (struct lwp_info *ti, void *data)
{
struct linux_corefile_thread_data *args = data;
ptid_t saved_ptid = inferior_ptid;
@@ -268,7 +270,7 @@ linux_make_note_section (bfd *obfd, int *note_size)
thread_args.note_data = note_data;
thread_args.note_size = note_size;
thread_args.num_notes = 0;
- iterate_over_threads (linux_corefile_thread_callback, &thread_args);
+ iterate_over_lwps (linux_corefile_thread_callback, &thread_args);
if (thread_args.num_notes == 0)
{
/* iterate_over_threads didn't come up with any threads;