diff options
author | Pedro Alves <pedro@codesourcery.com> | 2009-02-27 20:34:40 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2009-02-27 20:34:40 +0000 |
commit | cee93b972b71faa6c0e9e72fcd03e90a67377875 (patch) | |
tree | 16312a405c3f06fb911d6357f3de4d816ddd40ce /gdb/proc-service.c | |
parent | 6a6b10af0464c935770d19210a7b595ae439b927 (diff) | |
download | gdb-cee93b972b71faa6c0e9e72fcd03e90a67377875.tar.gz |
* gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
with a ptid_t field.
* linux-thread-db.c (thread_get_info_callback): Build the ptid
using the pid stored in proc_handle.ptid.
(thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
(check_for_thread_db, thread_db_detach, check_event)
(thread_db_mourn_inferior, find_new_threads_callback)
(thread_db_find_new_threads_1): Adjust.
* proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
(ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
Diffstat (limited to 'gdb/proc-service.c')
-rw-r--r-- | gdb/proc-service.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/proc-service.c b/gdb/proc-service.c index 425afd9b0fb..dc0544054f9 100644 --- a/gdb/proc-service.c +++ b/gdb/proc-service.c @@ -97,7 +97,7 @@ ps_xfer_memory (const struct ps_prochandle *ph, psaddr_t addr, int ret; CORE_ADDR core_addr = ps_addr_to_core_addr (addr); - inferior_ptid = pid_to_ptid (ph->pid); + inferior_ptid = ph->ptid; if (write) ret = target_write_memory (core_addr, buf, len); @@ -257,7 +257,7 @@ ps_lgetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, prgregset_t gregset) struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); target_fetch_registers (regcache, -1); @@ -276,7 +276,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, const prgregset_t gregset) struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); supply_gregset (regcache, (const gdb_gregset_t *) gregset); @@ -296,7 +296,7 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); target_fetch_registers (regcache, -1); @@ -316,7 +316,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, struct cleanup *old_chain = save_inferior_ptid (); struct regcache *regcache; - inferior_ptid = BUILD_LWP (lwpid, ph->pid); + inferior_ptid = BUILD_LWP (lwpid, ptid_get_pid (ph->ptid)); regcache = get_thread_regcache (inferior_ptid); supply_fpregset (regcache, (const gdb_fpregset_t *) fpregset); @@ -332,7 +332,7 @@ ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, pid_t ps_getpid (gdb_ps_prochandle_t ph) { - return ph->pid; + return ptid_get_pid (ph->ptid); } /* Provide a prototype to silence -Wmissing-prototypes. */ |