aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-02-06 22:21:26 +0000
committerPedro Alves <palves@redhat.com>2009-02-06 22:21:26 +0000
commit117de6a92498c0dd715fa0fdec577697433f3c5e (patch)
tree67de81ef5cbd1387617306aa3f1d35ab0bb25f6a /gdb/procfs.c
parentd8906c6f0e46480df2c8ad6aec13e57c9af084f9 (diff)
downloadbinutils-117de6a92498c0dd715fa0fdec577697433f3c5e.zip
binutils-117de6a92498c0dd715fa0fdec577697433f3c5e.tar.gz
binutils-117de6a92498c0dd715fa0fdec577697433f3c5e.tar.bz2
* linux-nat.c (linux_nat_wait): Adjust.
(linux_nat_pid_to_str): Adjust. Remove call to thread_db_init. * linux-nat.h (thread_db_init): Delete declaration. * linux-thread-db.c (target_beneath): Delete. (thread_db_init): Delete. (thread_db_detach): Use find_target_beneath. (thread_db_wait): Adjust interface. Use find_target_beneath. (thread_db_mourn_inferior): Use find_target_beneath. (thread_db_can_async_p, thread_db_is_async_p, thread_db_async) (thread_db_async_mask): Delete. (thread_db_pid_to_str): Adjust interface. Use find_target_beneath. (thread_db_get_thread_local_address): Adjust interface. Use find_target_beneath. (init_thread_db_ops): Delete references to delete functions. * target.c (update_current_target): Don't inherit or default to_wait. Don't inherit to_pid_to_str and to_get_thread_local_address. (target_translate_tls_address): Look for a pushed target that implements to_get_thread_local_address, and use it instead of checking for target_get_thread_local_address_p. (target_wait, target_pid_to_str): Reimplement as functions. (dummy_pid_to_str): New. (init_dummy_target): Register it. (debug_to_wait): Delete. * target.h (struct target_ops): Make to_wait, to_pid_to_str and to_get_thread_local_address accept a pointer to struct target_ops. (target_wait): Delete macro, and declare as function. (target_pid_to_str): Likewise. (target_get_thread_local_address) (target_get_thread_local_address_p): Delete. (noprocess): Add NORETURN and ATTR_NORETURN tags. * inf-ptrace.c (inf_ptrace_wait): Adjust. (inf_ptrace_pid_to_str): New. (inf_ptrace_target): Use inf_ptrace_pid_to_str. * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust. * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust. * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str): Adjust. * corelow.c (core_pid_to_str): Adjust. * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust. * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust. * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust. * go32-nat.c (go32_wait, go32_pid_to_str): Adjust. * hpux-thread.c (hpux_thread_wait): Adjust. * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust. * monitor.c (monitor_wait, monitor_pid_to_str): Adjust. * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust. * procfs.c (procfs_pid_to_str): Adjust. * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust. * remote-mips.c (mips_wait): Adjust. * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust. * remote.c (remote_wait, remote_pid_to_str) (remote_get_thread_local_address): Adjust. * rs6000-nat.c (rs6000_wait): Adjust. * sol-thread.c (procfs_pid_to_str): Adjust declaration. (sol_thread_wait, solaris_pid_to_str): Adjust. * spu-linux-nat.c (spu_child_wait): Adjust. * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 4587fdd..bc49ffe 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -126,7 +126,8 @@ static void procfs_kill_inferior (void);
static void procfs_mourn_inferior (struct target_ops *ops);
static void procfs_create_inferior (struct target_ops *, char *,
char *, char **, int);
-static ptid_t procfs_wait (ptid_t, struct target_waitstatus *);
+static ptid_t procfs_wait (struct target_ops *,
+ ptid_t, struct target_waitstatus *);
static int procfs_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
struct mem_attrib *attrib,
struct target_ops *);
@@ -139,7 +140,7 @@ static LONGEST procfs_xfer_partial (struct target_ops *ops,
static int procfs_thread_alive (ptid_t);
void procfs_find_new_threads (void);
-char *procfs_pid_to_str (ptid_t);
+char *procfs_pid_to_str (struct target_ops *, ptid_t);
static int proc_find_memory_regions (int (*) (CORE_ADDR,
unsigned long,
@@ -3969,7 +3970,8 @@ syscall_is_lwp_create (procinfo *pi, int scall)
*/
static ptid_t
-procfs_wait (ptid_t ptid, struct target_waitstatus *status)
+procfs_wait (struct target_ops *ops,
+ ptid_t ptid, struct target_waitstatus *status)
{
/* First cut: loosely based on original version 2.1 */
procinfo *pi;
@@ -5270,7 +5272,7 @@ procfs_thread_alive (ptid_t ptid)
/* Convert PTID to a string. Returns the string in a static buffer. */
char *
-procfs_pid_to_str (ptid_t ptid)
+procfs_pid_to_str (struct target_ops *ops, ptid_t ptid)
{
static char buf[80];