* [rfc] Remove ptrace-based Alpha OSF support
@ 2007-04-28 19:28 Ulrich Weigand
2007-04-28 19:55 ` Mark Kettenis
2007-04-28 20:29 ` Daniel Jacobowitz
0 siblings, 2 replies; 10+ messages in thread
From: Ulrich Weigand @ 2007-04-28 19:28 UTC (permalink / raw)
To: gdb-patches
Hello,
after the AIX conversion, there is a single inftrace.c target
remaining: alpha-osf. I don't have access to such a system,
so it's hard for me to convert the configuration to inf-ptrace.
However, I'm wondering whether this is actually necessary at
this point. Looking at the OSF targets, there is an interesting
twist: they attempt to use *either* ptrace *or* procfs.
Do do that, alpha-osf2.mh and alpha-osf3.mh include *both*
procfs.o and infptrace.o in their NATDEPFILES. I had been
wondering how this could possibly work, seeing as this would
lead to two targets both responding to the target_can_run
query, which should cause find_default_run_target to fail.
However, once upon a time that indeed appears to have worked,
due to this piece of code in inftarg.c (_initialize_inftarg):
#ifdef HAVE_OPTIONAL_PROC_FS
char procname[32];
int fd;
/* If we have an optional /proc filesystem (e.g. under OSF/1),
don't add ptrace support if we can access the running GDB via /proc. */
#ifndef PROC_NAME_FMT
#define PROC_NAME_FMT "/proc/%05d"
#endif
sprintf (procname, PROC_NAME_FMT, getpid ());
fd = open (procname, O_RDONLY);
if (fd >= 0)
{
close (fd);
return;
}
#endif
and a corresponding piece in procfs.c (_initialize_procfs):
#ifdef HAVE_OPTIONAL_PROC_FS
char procname[MAX_PROC_NAME_SIZE];
int fd;
/* If we have an optional /proc filesystem (e.g. under OSF/1),
don't add procfs support if we cannot access the running
GDB via /proc. */
sprintf (procname, STATUS_PROC_NAME_FMT, getpid ());
if ((fd = open (procname, O_RDONLY)) < 0)
return;
close (fd);
#endif
So the idea was that exactly one of inftarg and procfs would refuse
to register its target, and then the other one would be used.
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 ...
What does that mean? Well, if the OSF system *does* support procfs,
it does't matter: the infptrace code is still there, thus the ptrace
target will not be registered and GDB will use procfs.
However, in the situation where procfs is *not* present, we would
now get both infptrace and procfs registered, completely breaking
debugging.
Since GDB has been in this state for over 7 years now and apparently
nobody noticed, that would imply that either nobody uses GDB on OSF,
or else OSF actually always provides procfs support and the ptrace
fallback isn't really needed.
In either case, I suggest this means it would be OK to remove that
fallback from GDB sources, and just always use procfs on OSF.
The only hitch is OSF/1-1.x, which *only* supports ptrace. But I
guess this configuration is so old it could be safely obsoleted.
That would allow us to finally get rid of inftarg.c / infptrace.c.
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?
Bye,
Ulrich
ChangeLog:
* configure.host (alpha*-*-osf1*): Remove support.
* NEWS: Mention removed configuration.
* config/alpha/alpha-osf1.mh: Delete file.
* config/alpha/alpha-osf2.mh (NATDEPFILES): Remove inftarg.o
and infptrace.o.
* config/alpha/alpha-osf3.mh: Likewise.
* config/alpha/nm-osf.h (U_REGS_OFFSET): Do not define.
* config/alpha/nm-osf2.h (USE_PROC_FS): Do not define.
(HAVE_OPTIONAL_PROC_FS): Likewise.
(KERNEL_U_SIZE, kernel_u_size): Remove.
* 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-28 19:25:19.115567362 +0200
+++ gdb-head/gdb/alpha-nat.c 2007-04-28 19:28:01.327093486 +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 <sys/ptrace.h>, 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 <sys/procfs.h>
-
/* 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
\f
/* 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 2004-08-05 20:18:17.000000000 +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 2004-08-05 20:18:17.000000000 +0200
+++ gdb-head/gdb/config/alpha/alpha-osf2.mh 2007-04-28 19:22:31.282920293 +0200
@@ -1,5 +1,5 @@
# 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 \
+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/alpha-osf3.mh gdb-head/gdb/config/alpha/alpha-osf3.mh
--- gdb-orig/gdb/config/alpha/alpha-osf3.mh 2004-08-05 20:18:17.000000000 +0200
+++ gdb-head/gdb/config/alpha/alpha-osf3.mh 2007-04-28 19:22:39.913023781 +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-01-11 20:58:02.000000000 +0100
+++ gdb-head/gdb/config/alpha/nm-osf2.h 2007-04-28 19:21:07.891160748 +0200
@@ -21,10 +21,6 @@
/* 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'
@@ -38,7 +34,3 @@
#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-osf.h gdb-head/gdb/config/alpha/nm-osf.h
--- gdb-orig/gdb/config/alpha/nm-osf.h 2007-04-26 01:12:31.000000000 +0200
+++ gdb-head/gdb/config/alpha/nm-osf.h 2007-04-28 19:20:50.632958913 +0200
@@ -25,7 +25,3 @@
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-27 15:17:42.000000000 +0200
+++ gdb-head/gdb/configure.host 2007-04-28 19:24:07.083775827 +0200
@@ -13,6 +13,7 @@
# The default is $host_cpu.
case $host in
+ alpha*-*-osf1* | \
hppa*-*-hiux* | \
i[34567]86-ncr-* | \
i[34567]86-*-dgux* | \
@@ -60,7 +61,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 ;;
diff -urNp gdb-orig/gdb/NEWS gdb-head/gdb/NEWS
--- gdb-orig/gdb/NEWS 2007-04-13 19:13:45.000000000 +0200
+++ gdb-head/gdb/NEWS 2007-04-28 19:43:43.699135294 +0200
@@ -91,6 +91,7 @@ qXfer:features:read:
Support for these obsolete configurations has been removed.
+alpha*-*-osf1*
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-04-28 19:28 [rfc] Remove ptrace-based Alpha OSF support Ulrich Weigand
@ 2007-04-28 19:55 ` Mark Kettenis
2007-04-28 20:29 ` Daniel Jacobowitz
1 sibling, 0 replies; 10+ messages in thread
From: Mark Kettenis @ 2007-04-28 19:55 UTC (permalink / raw)
To: uweigand; +Cc: gdb-patches
> Date: Sat, 28 Apr 2007 20:50:37 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
>
> What do you think? Is this reasonable? Did I miss something
> in the above analysis?
Seems entirely reasonable to me.
> ChangeLog:
>
> * configure.host (alpha*-*-osf1*): Remove support.
> * NEWS: Mention removed configuration.
>
> * config/alpha/alpha-osf1.mh: Delete file.
> * config/alpha/alpha-osf2.mh (NATDEPFILES): Remove inftarg.o
> and infptrace.o.
> * config/alpha/alpha-osf3.mh: Likewise.
> * config/alpha/nm-osf.h (U_REGS_OFFSET): Do not define.
> * config/alpha/nm-osf2.h (USE_PROC_FS): Do not define.
> (HAVE_OPTIONAL_PROC_FS): Likewise.
> (KERNEL_U_SIZE, kernel_u_size): Remove.
>
> * 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)".
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-04-28 19:28 [rfc] Remove ptrace-based Alpha OSF support Ulrich Weigand
2007-04-28 19:55 ` Mark Kettenis
@ 2007-04-28 20:29 ` Daniel Jacobowitz
2007-04-28 23:36 ` Ulrich Weigand
1 sibling, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2007-04-28 20:29 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches
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.
> 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?
Someone told me while I was obsoleting targets that osf1 and probably
osf2 could go. I don't recall who.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-04-28 20:29 ` Daniel Jacobowitz
@ 2007-04-28 23:36 ` Ulrich Weigand
2007-04-29 7:08 ` Joel Brobecker
0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Weigand @ 2007-04-28 23:36 UTC (permalink / raw)
To: Daniel Jacobowitz, brobecker; +Cc: gdb-patches
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 <sys/ptrace.h>, 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 <sys/procfs.h>
-
/* 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
\f
/* 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-04-28 23:36 ` Ulrich Weigand
@ 2007-04-29 7:08 ` Joel Brobecker
2007-04-30 12:34 ` Ulrich Weigand
2007-05-05 4:24 ` Joel Brobecker
0 siblings, 2 replies; 10+ messages in thread
From: Joel Brobecker @ 2007-04-29 7:08 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Daniel Jacobowitz, gdb-patches
> > 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?
Absolutely! I'm away at the moment, but I'll be back on Tuesday,
so I'll schedule a round of testing first thing when I get back.
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-04-29 7:08 ` Joel Brobecker
@ 2007-04-30 12:34 ` Ulrich Weigand
2007-05-05 4:24 ` Joel Brobecker
1 sibling, 0 replies; 10+ messages in thread
From: Ulrich Weigand @ 2007-04-30 12:34 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Daniel Jacobowitz, gdb-patches
Joel Brobecker wrote:
> > > 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?
>
> Absolutely! I'm away at the moment, but I'll be back on Tuesday,
> so I'll schedule a round of testing first thing when I get back.
Excellent, thanks!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-04-29 7:08 ` Joel Brobecker
2007-04-30 12:34 ` Ulrich Weigand
@ 2007-05-05 4:24 ` Joel Brobecker
2007-05-06 21:09 ` Ulrich Weigand
1 sibling, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2007-05-05 4:24 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Daniel Jacobowitz, gdb-patches
Ulrich,
> > > 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?
>
> Absolutely! I'm away at the moment, but I'll be back on Tuesday,
> so I'll schedule a round of testing first thing when I get back.
Sorry, Ulrich, I have been unable to make expect work on any of
the Tru64 machines that we have. On one machine, it looks like
we're exhausting within a few tests the pool of pseudo-ttys. And
on the other machine, I have what looks like an echo issue that
completely confuses the testsuite. I tried the obvious tricks
of re-installing newer versions of tcl and expect, but to no avail.
Something is weird, because I *thought* I had it working on one
of the machines before...
Eventually, we will end up testing this patch somewhat, because we
maintain internally a tree that contains our latest changes merged
to a recent snapshot of the FSF head, and we test it nightly against
our in-house testsuite (which does not use expect/dejagnu). We will
bitterly complain and start pointing fingers if something broke :-P.
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-05-05 4:24 ` Joel Brobecker
@ 2007-05-06 21:09 ` Ulrich Weigand
2007-05-06 22:37 ` Joel Brobecker
0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Weigand @ 2007-05-06 21:09 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Daniel Jacobowitz, gdb-patches
Joel Brobecker wrote:
> Sorry, Ulrich, I have been unable to make expect work on any of
> the Tru64 machines that we have. On one machine, it looks like
> we're exhausting within a few tests the pool of pseudo-ttys. And
> on the other machine, I have what looks like an echo issue that
> completely confuses the testsuite. I tried the obvious tricks
> of re-installing newer versions of tcl and expect, but to no avail.
> Something is weird, because I *thought* I had it working on one
> of the machines before...
Thanks anyway for you efforts! Could you at least verify that
GDB builds and survives a "break main; run" test with the patch?
If that's the case, I guess I'll apply it ...
> Eventually, we will end up testing this patch somewhat, because we
> maintain internally a tree that contains our latest changes merged
> to a recent snapshot of the FSF head, and we test it nightly against
> our in-house testsuite (which does not use expect/dejagnu). We will
> bitterly complain and start pointing fingers if something broke :-P.
Sure, I'll be happy to help if you find problems later on ;-)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-05-06 21:09 ` Ulrich Weigand
@ 2007-05-06 22:37 ` Joel Brobecker
2007-05-06 23:05 ` Ulrich Weigand
0 siblings, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2007-05-06 22:37 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: Daniel Jacobowitz, gdb-patches
> Thanks anyway for you efforts! Could you at least verify that
> GDB builds and survives a "break main; run" test with the patch?
> If that's the case, I guess I'll apply it ...
Sure! I just finished rebuilding and "break main; run" worked like
a charm.
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [rfc] Remove ptrace-based Alpha OSF support
2007-05-06 22:37 ` Joel Brobecker
@ 2007-05-06 23:05 ` Ulrich Weigand
0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Weigand @ 2007-05-06 23:05 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Daniel Jacobowitz, gdb-patches
Joel Brobecker wrote:
> > Thanks anyway for you efforts! Could you at least verify that
> > GDB builds and survives a "break main; run" test with the patch?
> > If that's the case, I guess I'll apply it ...
>
> Sure! I just finished rebuilding and "break main; run" worked like
> a charm.
Thanks! I've committed the patch now.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-05-06 23:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-28 19:28 [rfc] Remove ptrace-based Alpha OSF support Ulrich Weigand
2007-04-28 19:55 ` Mark Kettenis
2007-04-28 20:29 ` Daniel Jacobowitz
2007-04-28 23:36 ` Ulrich Weigand
2007-04-29 7:08 ` Joel Brobecker
2007-04-30 12:34 ` Ulrich Weigand
2007-05-05 4:24 ` Joel Brobecker
2007-05-06 21:09 ` Ulrich Weigand
2007-05-06 22:37 ` Joel Brobecker
2007-05-06 23:05 ` Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox