From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31095 invoked by alias); 13 Mar 2004 13:07:31 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30885 invoked from network); 13 Mar 2004 13:07:28 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 13 Mar 2004 13:07:28 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2DD7QRa000625 for ; Sat, 13 Mar 2004 14:07:26 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2DD7QES007176 for ; Sat, 13 Mar 2004 14:07:26 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i2DD7P4K007173; Sat, 13 Mar 2004 14:07:25 +0100 (CET) Date: Fri, 19 Mar 2004 00:09:00 -0000 Message-ID: <200403131307.i2DD7P4K007173@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Unify FreeBSD and OpenBSD nm.h files X-SW-Source: 2004-03/txt/msg00299.txt.bz2 Message-ID: <20040319000900.zcbK_Wo98FLxsFRZx5mGZDUD6ZZPV9xzvbmyoJKNoEM@z> This patch creates a config/nm-bsd.h for things common to the various BSD's, and uses it for the various FreeBSD and OpenBSD ports. We should probably use this file for NetBSD too, but the current NetBSD stuff has: #define PTRACE_ARG3_TYPE char* instead of #define PTRACE_ARG3_TYPE caddr_t The two should be equivalent, but I'd like to do a bit of testing first. Committed to mainline. Mark Index: ChangeLog from Mark Kettenis * config/i386/nm-fbsd.h: Include "config/nm-bsd.h". (PTRACE_ARG3_TYPE, FETCH_INFERIOR_REGISTERS, ATTACH_DETACH): Remove defines. * config/i386/nm-fbsd64.h: Likewise. * config/i386/nm-obsd.h: Likewise. * config/sparc/nm-fbsd.h: Likewise. Update copyright year. * config/alpha/nm-fbsd.h: Likewise. Update copyright year. Index: config/nm-bsd.h =================================================================== RCS file: config/nm-bsd.h diff -N config/nm-bsd.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ config/nm-bsd.h 13 Mar 2004 13:06:29 -0000 @@ -0,0 +1,29 @@ +/* Native-dependent definitions for *BSD. + + Copyright 2001, 2004 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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. */ + +/* Type of the third argument to the `ptrace' system call. */ +#define PTRACE_ARG3_TYPE caddr_t + +/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ +#define FETCH_INFERIOR_REGISTERS + +/* We can attach and detach. */ +#define ATTACH_DETACH Index: config/alpha/nm-fbsd.h =================================================================== RCS file: /cvs/src/src/gdb/config/alpha/nm-fbsd.h,v retrieving revision 1.5 diff -u -p -r1.5 nm-fbsd.h --- config/alpha/nm-fbsd.h 16 Aug 2003 18:57:37 -0000 1.5 +++ config/alpha/nm-fbsd.h 13 Mar 2004 13:06:29 -0000 @@ -1,5 +1,6 @@ /* Native-dependent definitions for FreeBSD/Alpha. - Copyright 1986, 1987, 1989, 1992, 1996, 2000 + + Copyright 1986, 1987, 1989, 1992, 1996, 2000, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -22,14 +23,8 @@ #ifndef NM_FBSD_H #define NM_FBSD_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS - -/* We can attach and detach. */ -#define ATTACH_DETACH +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* The Alpha does not step over a breakpoint. */ #define CANNOT_STEP_BREAKPOINT 1 Index: config/sparc/nm-fbsd.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/nm-fbsd.h,v retrieving revision 1.2 diff -u -p -r1.2 nm-fbsd.h --- config/sparc/nm-fbsd.h 21 Aug 2003 20:38:46 -0000 1.2 +++ config/sparc/nm-fbsd.h 13 Mar 2004 13:06:29 -0000 @@ -1,6 +1,6 @@ /* Native-dependent definitions for FreeBSD/sparc64. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by David E. O'Brien . This file is part of GDB. @@ -22,15 +22,8 @@ #ifndef NM_FBSD_H #define NM_FBSD_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS - -/* We can attach and detach. */ -#define ATTACH_DETACH - +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Shared library support. */ Index: config/i386/nm-fbsd.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/nm-fbsd.h,v retrieving revision 1.8 diff -u -p -r1.8 nm-fbsd.h --- config/i386/nm-fbsd.h 22 Feb 2004 16:20:22 -0000 1.8 +++ config/i386/nm-fbsd.h 13 Mar 2004 13:06:29 -0000 @@ -52,20 +52,14 @@ extern void i386bsd_dr_reset_addr (int r extern unsigned long i386bsd_dr_get_status (void); -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Override child_resume in `infptrace.c' to work around a kernel bug. */ #define CHILD_RESUME /* Override child_pid_to_exec_file in 'inftarg.c'. */ #define CHILD_PID_TO_EXEC_FILE - -/* We can attach and detach. */ -#define ATTACH_DETACH /* Support for the user struct. */ Index: config/i386/nm-fbsd64.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/nm-fbsd64.h,v retrieving revision 1.2 diff -u -p -r1.2 nm-fbsd64.h --- config/i386/nm-fbsd64.h 22 Feb 2004 16:20:22 -0000 1.2 +++ config/i386/nm-fbsd64.h 13 Mar 2004 13:06:29 -0000 @@ -22,16 +22,10 @@ #ifndef NM_FBSD64_H #define NM_FBSD64_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Override child_pid_to_exec_file in 'inftarg.c'. */ #define CHILD_PID_TO_EXEC_FILE - -/* We can attach and detach. */ -#define ATTACH_DETACH #endif /* nm-fbsd64.h */ Index: config/i386/nm-obsd.h =================================================================== RCS file: /cvs/src/src/gdb/config/i386/nm-obsd.h,v retrieving revision 1.2 diff -u -p -r1.2 nm-obsd.h --- config/i386/nm-obsd.h 22 Feb 2004 16:20:22 -0000 1.2 +++ config/i386/nm-obsd.h 13 Mar 2004 13:06:29 -0000 @@ -22,15 +22,8 @@ #ifndef NM_OBSD_H #define NM_OBSD_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS - -/* We can attach and detach. */ -#define ATTACH_DETACH - +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Support for the user struct. */