From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24070 invoked by alias); 28 Apr 2007 23:34:31 -0000 Received: (qmail 24056 invoked by uid 22791); 28 Apr 2007 23:34:29 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 29 Apr 2007 00:34:25 +0100 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id l3SNYMH2030120 for ; Sat, 28 Apr 2007 23:34:22 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l3SNYMDj3530808 for ; Sun, 29 Apr 2007 01:34:22 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l3SNYLjL011558 for ; Sun, 29 Apr 2007 01:34:22 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l3SNYLX3011555; Sun, 29 Apr 2007 01:34:21 +0200 Message-Id: <200704282334.l3SNYLX3011555@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sun, 29 Apr 2007 01:34:21 +0200 Subject: Re: [rfc] Remove ptrace-based Alpha OSF support To: drow@false.org (Daniel Jacobowitz), brobecker@adacore.com Date: Sat, 28 Apr 2007 23:36:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20070428195500.GA6695@caradoc.them.org> from "Daniel Jacobowitz" at Apr 28, 2007 03:55:00 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00388.txt.bz2 Daniel Jacobowitz wrote: > On Sat, Apr 28, 2007 at 08:50:37PM +0200, Ulrich Weigand wrote: > > However, this has been broken a long time ago: CVS revision 1.2 > > of procfs.c already no longer has the #ifdef HAVE_OPTIONAL_PROC_FS > > support. In fact, I'm not quite sure what happened there: > > > > revision 1.2 > > date: 2000/02/16 08:02:57; author: cagney; state: Exp; lines: +4540 -5031 > > From Rodney Brown: Define MERGEPID when needed. > > > > as this revision is basically a re-write of the whole file, which doesn't > > really match the log entry ... > > This bit I can explain. The diff between 1.1 and 1.2 is not > interesting; the diff between the last revision on the 1.1.1.x vendor > branch is. A number of GDB snapshots were imported to create the > sourceware repository, and CVS's handling of imports is quirky. Hmm, so it looks like the support actually got lost by this import: revision 1.1.1.10 date: 2000/01/06 03:06:41; author: jsm; state: Exp; lines: +4512 -5217 import gdb-2000-01-05 snapshot which doesn't tell me a lot more ;-) Well, I guess history doesn't really matter at this point ... > > The following patch implements the above suggestion. It's not > > really tested as I don't have access to an OSF system, but it > > appears to compile (modulo procfs headers), and the configuration > > changes seem to work ... > > > > > > What do you think? Is this reasonable? Did I miss something > > in the above analysis? > > This all seems reasonable to me. I believe that Joel has access to an > OSF system at AdaCore; maybe he can test the patch for you? Joel, would that be possible? > Someone told me while I was obsoleting targets that osf1 and probably > osf2 could go. I don't recall who. I think that was Mark: http://sourceware.org/ml/gdb/2006-12/msg00157.html If osf2 should go as well (and that probably makes sense, there's no point in trying to maintain a separate target for an obsolete configuration that nobody can test), the updated patch below should do that. Bye, Ulrich ChangeLog: * configure.host (alpha*-*-osf[12]*): Remove support. * NEWS: Mention removed configurations. * config/alpha/alpha-osf1.mh: Delete file. * config/alpha/alpha-osf2.mh: Delete file. * config/alpha/alpha-osf3.mh (NATDEPFILES): Remove inftarg.o and infptrace.o. * config/alpha/nm-osf.h: Delete file. * config/alpha/nm-osf2.h: Delete file. * config/alpha/nm-osf3.h: Do not include "nm-osf2.h". (START_INFERIOR_TRAPS_EXPECTED): Copy from nm-osf.h. (PROCFS_DONT_TRACE_FAULTS): Copy from nm-osf2.h. * alpha-nat.c (ALPHA_UNIQUE_PTRACE_ADDR): Do not define. (register_addr, kernel_u_size): Remove. Do not check for "defined(USE_PROC_FS) || defined(HAVE_GREGSET_T)". diff -urNp gdb-orig/gdb/alpha-nat.c gdb-head/gdb/alpha-nat.c --- gdb-orig/gdb/alpha-nat.c 2007-04-29 01:06:59.998542000 +0200 +++ gdb-head/gdb/alpha-nat.c 2007-04-29 01:08:56.359524458 +0200 @@ -117,34 +117,7 @@ fetch_osf_core_registers (char *core_reg } -/* Map gdb internal register number to a ptrace ``address''. - These ``addresses'' are defined in , with - the exception of ALPHA_UNIQUE_PTRACE_ADDR. */ - -#define ALPHA_UNIQUE_PTRACE_ADDR 0 - -CORE_ADDR -register_addr (int regno, CORE_ADDR blockend) -{ - if (regno == PC_REGNUM) - return PC; - if (regno == ALPHA_UNIQUE_REGNUM) - return ALPHA_UNIQUE_PTRACE_ADDR; - if (regno < FP0_REGNUM) - return GPR_BASE + regno; - else - return FPR_BASE + regno - FP0_REGNUM; -} - -int -kernel_u_size (void) -{ - return (sizeof (struct user)); -} - -#if defined(USE_PROC_FS) || defined(HAVE_GREGSET_T) #include - /* Prototypes for supply_gregset etc. */ #include "gregset.h" @@ -192,7 +165,6 @@ fill_fpregset (gdb_fpregset_t *fpregsetp /* FPCR is in slot 32. */ alpha_fill_fp_regs (regno, regp, regp + 31); } -#endif /* Register that we are able to handle alpha core file formats. */ diff -urNp gdb-orig/gdb/config/alpha/alpha-osf1.mh gdb-head/gdb/config/alpha/alpha-osf1.mh --- gdb-orig/gdb/config/alpha/alpha-osf1.mh 2007-04-29 01:07:00.001542000 +0200 +++ gdb-head/gdb/config/alpha/alpha-osf1.mh 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -# Host: Little-endian Alpha running OSF/1-1.x -NAT_FILE= nm-osf.h -NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \ - solib-osf.o solib.o diff -urNp gdb-orig/gdb/config/alpha/alpha-osf2.mh gdb-head/gdb/config/alpha/alpha-osf2.mh --- gdb-orig/gdb/config/alpha/alpha-osf2.mh 2007-04-29 01:07:00.005541000 +0200 +++ gdb-head/gdb/config/alpha/alpha-osf2.mh 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -# Host: Little-endian Alpha running OSF/1-2.x using procfs -NAT_FILE= nm-osf2.h -NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \ - solib-osf.o solib.o procfs.o proc-api.o proc-events.o proc-flags.o \ - proc-why.o diff -urNp gdb-orig/gdb/config/alpha/alpha-osf3.mh gdb-head/gdb/config/alpha/alpha-osf3.mh --- gdb-orig/gdb/config/alpha/alpha-osf3.mh 2007-04-29 01:07:00.009541000 +0200 +++ gdb-head/gdb/config/alpha/alpha-osf3.mh 2007-04-29 01:08:56.382521186 +0200 @@ -1,5 +1,5 @@ # Host: Little-endian Alpha running OSF/1-3.x and higher using procfs NAT_FILE= nm-osf3.h -NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \ +NATDEPFILES= corelow.o alpha-nat.o fork-child.o \ solib-osf.o solib.o procfs.o proc-api.o proc-events.o proc-flags.o \ proc-why.o diff -urNp gdb-orig/gdb/config/alpha/nm-osf2.h gdb-head/gdb/config/alpha/nm-osf2.h --- gdb-orig/gdb/config/alpha/nm-osf2.h 2007-04-29 01:07:00.013540000 +0200 +++ gdb-head/gdb/config/alpha/nm-osf2.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,44 +0,0 @@ -/* Native definitions for alpha running OSF/1-2.x, using procfs. - Copyright 1995, 1996, 2000, 2007 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. */ - -/* Get generic OSF/1 definitions. */ -#include "alpha/nm-osf.h" - -/* OSF/1-2.x has optional /proc support, try to use it instead of ptrace. */ -#define USE_PROC_FS -#define HAVE_OPTIONAL_PROC_FS - -/* Don't trace faults under OSF/1, rely on the posting of the appropriate - signal if fault tracing is disabled. - Tracing T_IFAULT under Alpha OSF/1 causes a `floating point enable' - fault from which we cannot continue (except by disabling the - tracing). - And as OSF/1 doesn't provide the standard fault definitions, the - mapping of faults to appropriate signals in procfs_wait is difficult. */ -#define PROCFS_DONT_TRACE_FAULTS - -/* Work around some peculiarities in the OSF/1 procfs implementation. */ -#define PROCFS_NEED_PIOCSSIG_FOR_KILL -#define PROCFS_DONT_PIOCSSIG_CURSIG - -/* Return sizeof user struct to callers in less machine dependent routines */ - -#define KERNEL_U_SIZE kernel_u_size() -extern int kernel_u_size (void); diff -urNp gdb-orig/gdb/config/alpha/nm-osf3.h gdb-head/gdb/config/alpha/nm-osf3.h --- gdb-orig/gdb/config/alpha/nm-osf3.h 2007-01-11 20:58:02.000000000 +0100 +++ gdb-head/gdb/config/alpha/nm-osf3.h 2007-04-29 01:11:18.291856640 +0200 @@ -18,10 +18,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* OSF/1-3.x fixes some OSF/1-2.x procfs peculiarities and adds - a new one. */ -#include "alpha/nm-osf2.h" +/* Number of traps that happen between exec'ing the shell + to run an inferior, and when we finally get to + the inferior code. This is 2 on most implementations. */ +#define START_INFERIOR_TRAPS_EXPECTED 3 -#undef PROCFS_NEED_PIOCSSIG_FOR_KILL -#undef PROCFS_DONT_PIOCSSIG_CURSIG +/* Don't trace faults under OSF/1, rely on the posting of the appropriate + signal if fault tracing is disabled. + Tracing T_IFAULT under Alpha OSF/1 causes a `floating point enable' + fault from which we cannot continue (except by disabling the + tracing). + And as OSF/1 doesn't provide the standard fault definitions, the + mapping of faults to appropriate signals in procfs_wait is difficult. */ +#define PROCFS_DONT_TRACE_FAULTS + +/* Work around some peculiarities in the OSF/1 procfs implementation. */ #define PROCFS_NEED_CLEAR_CURSIG_FOR_KILL diff -urNp gdb-orig/gdb/config/alpha/nm-osf.h gdb-head/gdb/config/alpha/nm-osf.h --- gdb-orig/gdb/config/alpha/nm-osf.h 2007-04-29 01:07:00.016540000 +0200 +++ gdb-head/gdb/config/alpha/nm-osf.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,31 +0,0 @@ -/* Native definitions for alpha running OSF/1. - - Copyright 1993, 1994, 1995, 1998, 2000, 2004, 2007 - 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. */ - -/* Number of traps that happen between exec'ing the shell - to run an inferior, and when we finally get to - the inferior code. This is 2 on most implementations. */ -#define START_INFERIOR_TRAPS_EXPECTED 3 - -/* ptrace register ``addresses'' are absolute. */ - -#define U_REGS_OFFSET 0 - diff -urNp gdb-orig/gdb/configure.host gdb-head/gdb/configure.host --- gdb-orig/gdb/configure.host 2007-04-29 01:07:14.596591000 +0200 +++ gdb-head/gdb/configure.host 2007-04-29 01:09:40.691994411 +0200 @@ -13,6 +13,8 @@ # The default is $host_cpu. case $host in + alpha*-*-osf1* | \ + alpha*-*-osf2* | \ hppa*-*-hiux* | \ i[34567]86-ncr-* | \ i[34567]86-*-dgux* | \ @@ -60,8 +62,6 @@ esac case "${host}" in -alpha*-*-osf1*) gdb_host=alpha-osf1 ;; -alpha*-*-osf2*) gdb_host=alpha-osf2 ;; alpha*-*-osf[3456789]*) gdb_host=alpha-osf3 ;; alpha*-*-linux*) gdb_host=alpha-linux ;; alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) diff -urNp gdb-orig/gdb/NEWS gdb-head/gdb/NEWS --- gdb-orig/gdb/NEWS 2007-04-29 01:07:14.553597000 +0200 +++ gdb-head/gdb/NEWS 2007-04-29 01:09:03.708676298 +0200 @@ -91,6 +91,8 @@ qXfer:features:read: Support for these obsolete configurations has been removed. +alpha*-*-osf1* +alpha*-*-osf2* d10v-*-* hppa*-*-hiux* i[34567]86-ncr-* -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com