mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
* 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.
This commit is contained in:
parent
7f245d65f7
commit
da7d81e386
@ -1,3 +1,9 @@
|
||||
2004-08-07 Nathan J. Williams <nathanw@wasabisystems.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2004-08-07 Nathan J. Williams <nathanw@wasabisystems.com>
|
||||
|
||||
* bsd-kvm.c: Include "gdbcore.h"
|
||||
|
@ -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));
|
||||
|
@ -553,6 +553,16 @@ if test $gdb_cv_struct_thread_td_pcb = yes; then
|
||||
[Define to 1 if your system has td_pcb in struct thread.])
|
||||
fi
|
||||
|
||||
# See if <sys/lwp.h> defines `struct lwp`.
|
||||
AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
|
||||
[AC_TRY_COMPILE([#include <sys/param.h>
|
||||
#include <sys/lwp.h>], [struct lwp l;],
|
||||
gdb_cv_struct_lwp=yes, gdb_cv_struct_lwp=no)])
|
||||
if test $gdb_cv_struct_lwp = yes; then
|
||||
AC_DEFINE(HAVE_STRUCT_LWP, 1,
|
||||
[Define to 1 if your system has struct lwp.])
|
||||
fi
|
||||
|
||||
# See if <machine/reg.h> degines `struct reg'.
|
||||
AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
|
Loading…
Reference in New Issue
Block a user