diff options
author | Nathan J. Williams <nathanw@wasabisystems.com> | 2004-08-07 21:52:15 +0000 |
---|---|---|
committer | Nathan J. Williams <nathanw@wasabisystems.com> | 2004-08-07 21:52:15 +0000 |
commit | da7d81e3861d91b055a4bc75a5d1372f0c025e36 (patch) | |
tree | 42e97b64580bd9db9af356592a54b0cf4ddc943a /gdb/bsd-kvm.c | |
parent | 7f245d65f70913f51bfd1cb4f49822801ca6ecc9 (diff) | |
download | gdb-da7d81e3861d91b055a4bc75a5d1372f0c025e36.zip gdb-da7d81e3861d91b055a4bc75a5d1372f0c025e36.tar.gz gdb-da7d81e3861d91b055a4bc75a5d1372f0c025e36.tar.bz2 |
* configure.in: Test for struct lwp in <sys/lwp.h>
* bsd-kvm.c (bsd_kvm_proc_cmd): If HAVE_STRUCT_LWP is defined, use
the offset of l_addr in struct lwp.
Diffstat (limited to 'gdb/bsd-kvm.c')
-rw-r--r-- | gdb/bsd-kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c index 45ce561..083bc92 100644 --- a/gdb/bsd-kvm.c +++ b/gdb/bsd-kvm.c @@ -230,7 +230,11 @@ bsd_kvm_proc_cmd (char *arg, int fromtty) error ("No kernel memory image."); addr = parse_and_eval_address (arg); +#ifdef HAVE_STRUCT_LWP + addr += offsetof (struct lwp, l_addr); +#else addr += offsetof (struct proc, p_addr); +#endif if (kvm_read (core_kd, addr, &bsd_kvm_paddr, sizeof bsd_kvm_paddr) == -1) error ("%s", kvm_geterr (core_kd)); |