summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils/gdb')
-rw-r--r--gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c5
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c5
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c
index 5c28908..6da1a8e 100644
--- a/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/alpha/kvm-fbsd.c
@@ -19,6 +19,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* $FreeBSD$ */
+
/*
* This works like "remote" but, you use it like this:
* target kcore /dev/mem
@@ -37,6 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <signal.h>
#include <fcntl.h>
#include <kvm.h>
+#include <paths.h>
#include "defs.h"
#include "gdb_string.h"
@@ -110,7 +113,7 @@ initial_pcb()
return (0);
/* If this is NOT /dev/mem try for dumppcb. */
- if (strncmp(core_file, "/dev/", 5)) {
+ if (strncmp(core_file, _PATH_DEV, sizeof _PATH_DEV - 1)) {
sym = lookup_minimal_symbol("dumppcb", NULL, NULL);
if (sym != NULL) {
addr = SYMBOL_VALUE_ADDRESS(sym);
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
index 2608e3c..a08254d 100644
--- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
@@ -17,11 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
#include "defs.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
+#include <paths.h>
#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/time.h>
@@ -540,7 +543,7 @@ kvm_open (efile, cfile, sfile, perm, errout)
&& stb.st_rdev == makedev (2, 0))
{
devmem = 1;
- kfd = open ("/dev/kmem", perm, 0);
+ kfd = open (_PATH_KMEM, perm, 0);
}
if (lookup_minimal_symbol("mp_ncpus", NULL, NULL)) {
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
index 2608e3c..a08254d 100644
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
@@ -17,11 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
#include "defs.h"
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
+#include <paths.h>
#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/time.h>
@@ -540,7 +543,7 @@ kvm_open (efile, cfile, sfile, perm, errout)
&& stb.st_rdev == makedev (2, 0))
{
devmem = 1;
- kfd = open ("/dev/kmem", perm, 0);
+ kfd = open (_PATH_KMEM, perm, 0);
}
if (lookup_minimal_symbol("mp_ncpus", NULL, NULL)) {
OpenPOWER on IntegriCloud