From 23067f406ea4ee21380cffd950ae239575b43169 Mon Sep 17 00:00:00 2001 From: davidxu Date: Tue, 7 Feb 2006 02:29:55 +0000 Subject: Introduce a new proc service routine ps_linfo() to get LWP info. --- gnu/usr.bin/gdb/libgdb/fbsd-threads.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gnu') diff --git a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c index e9f83a9..b88b73f 100644 --- a/gnu/usr.bin/gdb/libgdb/fbsd-threads.c +++ b/gnu/usr.bin/gdb/libgdb/fbsd-threads.c @@ -1685,3 +1685,17 @@ ps_lcontinue(struct ps_prochandle *ph, lwpid_t lwpid) return PS_ERR; return PS_OK; } + +ps_err_e +ps_linfo(struct ps_prochandle *ph, lwpid_t lwpid, void *info) +{ + if (fbsd_thread_core) { + /* XXX should verify lwpid and make a pseudo lwp info */ + memset(info, 0, sizeof(struct ptrace_lwpinfo)); + return PS_OK; + } + + if (ptrace (PT_LWPINFO, lwpid, info, sizeof(struct ptrace_lwpinfo)) == -1) + return PS_ERR; + return PS_OK; +} -- cgit v1.1