summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-02-07 02:29:55 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-02-07 02:29:55 +0000
commit23067f406ea4ee21380cffd950ae239575b43169 (patch)
tree8660402c63431509e04a04d12ffb9672a86b5aee /gnu
parent879ea1a11b4e9024d1d81ce52647180a17f43871 (diff)
downloadFreeBSD-src-23067f406ea4ee21380cffd950ae239575b43169.zip
FreeBSD-src-23067f406ea4ee21380cffd950ae239575b43169.tar.gz
Introduce a new proc service routine ps_linfo() to get LWP info.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gdb/libgdb/fbsd-threads.c14
1 files changed, 14 insertions, 0 deletions
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;
+}
OpenPOWER on IntegriCloud