a5f3be8594
easier to patch the output of autoconf, also create gdb/configure with the changes from configure.in directly, removing the build dependency on autoconf.
26 lines
723 B
Text
26 lines
723 B
Text
$NetBSD: patch-ad,v 1.2 2006/03/14 00:47:50 joerg Exp $
|
|
|
|
--- gdb/bsd-kvm.c.orig 2004-07-03 13:17:33.000000000 +0000
|
|
+++ gdb/bsd-kvm.c
|
|
@@ -33,7 +33,9 @@
|
|
#include <nlist.h>
|
|
#include "readline/readline.h"
|
|
#include <sys/param.h>
|
|
+#if !defined(__DragonFly__)
|
|
#include <sys/proc.h>
|
|
+#endif
|
|
#include <sys/user.h>
|
|
|
|
#include "bsd-kvm.h"
|
|
@@ -228,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));
|