From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [patch/rfc] Build inf-ptrace.o when ptrace available
Date: Fri, 01 Oct 2004 20:40:00 -0000 [thread overview]
Message-ID: <415DC09D.2070407@gnu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 119 bytes --]
Hello,
This modifies GDB's configure to build inf-ptrace.o whenever the ptrace
call is available. Thoughts?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 8293 bytes --]
2004-10-01 Andrew Cagney <cagney@gnu.org>
* configure.in: Check for the function ptrace. If present, add in
inf-ptrace.o / inf-ptrace.c.
* configure, config.in: Re-generate.
* config/vax/obsd.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/vax/nbsdelf.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/vax/nbsdaout.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/powerpc/nbsd.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/obsdaout.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/obsd64.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/obsd.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/nbsdelf.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/nbsdaout.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/nbsd64.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/fbsd64.mh (NATDEPFILES): Remove inf-ptrace.o.
* config/i386/fbsd.mh (NATDEPFILES): Remove inf-ptrace.o.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.175
diff -p -u -r1.175 configure.in
--- configure.in 28 Sep 2004 20:17:32 -0000 1.175
+++ configure.in 1 Oct 2004 20:34:38 -0000
@@ -469,6 +469,13 @@ AC_CHECK_FUNCS(syscall)
AC_CHECK_FUNCS(ttrace)
AC_CHECK_FUNCS(wborder)
+# Check for ptrace, and and if present build inf-ptrace.
+AC_CHECK_FUNCS(ptrace)
+if test x"$ac_cv_func_ptrace" = xyes; then
+ CONFIG_OBS="$CONFIG_OBS inf-ptrace.o"
+ CONFIG_SRCS="$CONFIG_SRCS inf-ptrace.c"
+fi
+
# Check the return and argument types of ptrace. No canned test for
# this, so roll our own.
gdb_ptrace_headers='
@@ -532,6 +539,9 @@ if test -n "$[5]"; then
[Define to the type of arg 5 for ptrace.])
fi
+dnl If there is ptrace, add inf-ptrace to the compile list.
+
+
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
if test "$cross_compiling" = no; then
Index: config/i386/fbsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/fbsd.mh,v
retrieving revision 1.19
diff -p -u -r1.19 fbsd.mh
--- config/i386/fbsd.mh 1 Oct 2004 17:26:12 -0000 1.19
+++ config/i386/fbsd.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,5 @@
# Host: FreeBSD/i386
-NATDEPFILES= fork-child.o inf-ptrace.o \
+NATDEPFILES= fork-child.o \
fbsd-nat.o i386-nat.o i386bsd-nat.o i386fbsd-nat.o \
gcore.o bsd-kvm.o
NAT_FILE= nm-fbsd.h
Index: config/i386/fbsd64.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/fbsd64.mh,v
retrieving revision 1.11
diff -p -u -r1.11 fbsd64.mh
--- config/i386/fbsd64.mh 1 Oct 2004 17:26:13 -0000 1.11
+++ config/i386/fbsd64.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,5 @@
# Host: FreeBSD/amd64
-NATDEPFILES= fork-child.o inf-ptrace.o \
+NATDEPFILES= fork-child.o \
fbsd-nat.o amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o \
gcore.o bsd-kvm.o
Index: config/i386/nbsd64.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nbsd64.mh,v
retrieving revision 1.7
diff -p -u -r1.7 nbsd64.mh
--- config/i386/nbsd64.mh 1 Oct 2004 17:26:13 -0000 1.7
+++ config/i386/nbsd64.mh 1 Oct 2004 20:34:39 -0000
@@ -1,3 +1,2 @@
# Host: NetBSD/amd64
-NATDEPFILES= fork-child.o inf-ptrace.o \
- amd64-nat.o amd64bsd-nat.o amd64nbsd-nat.o
+NATDEPFILES= fork-child.o amd64-nat.o amd64bsd-nat.o amd64nbsd-nat.o
Index: config/i386/nbsdaout.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nbsdaout.mh,v
retrieving revision 1.7
diff -p -u -r1.7 nbsdaout.mh
--- config/i386/nbsdaout.mh 1 Oct 2004 17:26:13 -0000 1.7
+++ config/i386/nbsdaout.mh 1 Oct 2004 20:34:39 -0000
@@ -1,6 +1,5 @@
# Host: NetBSD/i386 a.out
-NATDEPFILES= fork-child.o inf-ptrace.o \
- i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o \
+NATDEPFILES= fork-child.o i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o \
solib.o solib-sunos.o
NAT_FILE= nm-nbsdaout.h
Index: config/i386/nbsdelf.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nbsdelf.mh,v
retrieving revision 1.21
diff -p -u -r1.21 nbsdelf.mh
--- config/i386/nbsdelf.mh 1 Oct 2004 17:26:13 -0000 1.21
+++ config/i386/nbsdelf.mh 1 Oct 2004 20:34:39 -0000
@@ -1,6 +1,5 @@
# Host: NetBSD/i386 ELF
-NATDEPFILES= fork-child.o inf-ptrace.o \
- i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o
NAT_FILE= config/nm-nbsd.h
LOADLIBES= -lkvm
Index: config/i386/obsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/obsd.mh,v
retrieving revision 1.13
diff -p -u -r1.13 obsd.mh
--- config/i386/obsd.mh 1 Oct 2004 17:26:13 -0000 1.13
+++ config/i386/obsd.mh 1 Oct 2004 20:34:39 -0000
@@ -1,6 +1,5 @@
# Host: OpenBSD/i386 ELF
-NATDEPFILES= fork-child.o inf-ptrace.o \
- i386bsd-nat.o i386obsd-nat.o i386nbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o i386bsd-nat.o i386obsd-nat.o i386nbsd-nat.o bsd-kvm.o
NAT_FILE= nm-obsd.h
LOADLIBES= -lkvm
Index: config/i386/obsd64.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/obsd64.mh,v
retrieving revision 1.8
diff -p -u -r1.8 obsd64.mh
--- config/i386/obsd64.mh 1 Oct 2004 17:26:13 -0000 1.8
+++ config/i386/obsd64.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,4 @@
# Host: OpenBSD/amd64
-NATDEPFILES= fork-child.o inf-ptrace.o \
- amd64-nat.o amd64bsd-nat.o amd64obsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o amd64-nat.o amd64bsd-nat.o amd64obsd-nat.o bsd-kvm.o
LOADLIBES= -lkvm
Index: config/i386/obsdaout.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/obsdaout.mh,v
retrieving revision 1.6
diff -p -u -r1.6 obsdaout.mh
--- config/i386/obsdaout.mh 1 Oct 2004 17:26:13 -0000 1.6
+++ config/i386/obsdaout.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,5 @@
# Host: OpenBSD/i386 a.out
-NATDEPFILES= fork-child.o inf-ptrace.o \
+NATDEPFILES= fork-child.o \
i386bsd-nat.o i386nbsd-nat.o i386obsd-nat.o bsd-kvm.o \
solib.o solib-sunos.o
NAT_FILE= nm-obsd.h
Index: config/powerpc/nbsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/nbsd.mh,v
retrieving revision 1.15
diff -p -u -r1.15 nbsd.mh
--- config/powerpc/nbsd.mh 1 Oct 2004 17:26:14 -0000 1.15
+++ config/powerpc/nbsd.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,5 @@
# Host: PowerPC, running NetBSD
-NATDEPFILES= fork-child.o inf-ptrace.o infptrace.o ppcnbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o infptrace.o ppcnbsd-nat.o bsd-kvm.o
NAT_FILE= config/nm-nbsd.h
LOADLIBES= -lkvm
Index: config/vax/nbsdaout.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/nbsdaout.mh,v
retrieving revision 1.4
diff -p -u -r1.4 nbsdaout.mh
--- config/vax/nbsdaout.mh 1 Oct 2004 17:26:14 -0000 1.4
+++ config/vax/nbsdaout.mh 1 Oct 2004 20:34:39 -0000
@@ -1,7 +1,5 @@
# Host: NetBSD/vax a.out
-NATDEPFILES= fork-child.o inf-ptrace.o \
- vaxbsd-nat.o bsd-kvm.o \
- solib.o solib-sunos.o
+NATDEPFILES= fork-child.o vaxbsd-nat.o bsd-kvm.o solib.o solib-sunos.o
NAT_FILE= nm-nbsdaout.h
LOADLIBES= -lkvm
Index: config/vax/nbsdelf.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/nbsdelf.mh,v
retrieving revision 1.7
diff -p -u -r1.7 nbsdelf.mh
--- config/vax/nbsdelf.mh 1 Oct 2004 17:26:14 -0000 1.7
+++ config/vax/nbsdelf.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,4 @@
# Host: NetBSD/vax ELF
-NATDEPFILES= fork-child.o inf-ptrace.o \
- vaxbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o vaxbsd-nat.o bsd-kvm.o
LOADLIBES= -lkvm
Index: config/vax/obsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/obsd.mh,v
retrieving revision 1.5
diff -p -u -r1.5 obsd.mh
--- config/vax/obsd.mh 1 Oct 2004 17:26:14 -0000 1.5
+++ config/vax/obsd.mh 1 Oct 2004 20:34:39 -0000
@@ -1,5 +1,4 @@
# Host: OpenBSD/vax
-NATDEPFILES= fork-child.o inf-ptrace.o \
- vaxbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o vaxbsd-nat.o bsd-kvm.o
LOADLIBES= -lkvm
next reply other threads:[~2004-10-01 20:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-01 20:40 Andrew Cagney [this message]
2004-10-01 21:54 ` Mark Kettenis
2004-10-04 14:24 ` Andrew Cagney
2004-10-04 14:34 ` Daniel Jacobowitz
2004-10-04 16:27 ` Andrew Cagney
2004-10-04 16:35 ` Daniel Jacobowitz
2004-10-05 22:44 ` Andrew Cagney
2004-10-05 22:59 ` Daniel Jacobowitz
2004-10-05 23:42 ` Andrew Cagney
2004-10-11 17:24 ` Andrew Cagney
2004-10-13 13:54 ` Daniel Jacobowitz
2004-10-14 17:14 ` Mark Kettenis
2004-10-04 17:20 ` Mark Kettenis
2004-10-04 17:51 ` Andrew Cagney
2004-10-04 18:23 ` Mark Kettenis
2004-10-03 14:50 ` Daniel Jacobowitz
2004-10-04 14:31 ` Andrew Cagney
2004-10-04 14:34 ` Daniel Jacobowitz
2004-10-04 16:18 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=415DC09D.2070407@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox