Remove ioctl-based procfs support on Solaris

Message ID yddtvzotttg.fsf@CeBiTec.Uni-Bielefeld.DE
State New, archived
Headers

Commit Message

Rainer Orth Sept. 27, 2017, 8:43 a.m. UTC
  Hi Pedro,

> This all looks good to me FWIW, with a couple tiny nits below.
>
>>     /proc file system, which is used on many versions of Unix
>>     as a means for debuggers to control other processes.
>
> Could you update this comment in procfs.c to mention Solaris
> explicitly, please?  Likewise the first line of the file.

done, as well as in the Solaris-only proc-*.c files.

>> -   Examples of the systems that use this interface are:
>> -
>> -     Irix
>> -     Solaris
>> -     OSF
>> -     AIX5
>
> ...
>
>> -   There are three methods for doing this function:
>> -   1) Newest: read/write [PCSET/PCRESET/PCUNSET]
>> -      [Sol6, Sol7, UW]
>> -   2) Middle: PIOCSET/PIOCRESET
>> -      [Irix, Sol5]
>> -   3) Oldest: PIOCSFORK/PIOCRFORK/PIOCSRLC/PIOCRRLC
>> -      [OSF, Sol5]
>> -
>> -   Note: Irix does not define PR_ASYNC.
>> -   Note: OSF  does not define PR_KLC.
>> -   Note: OSF  is the only one that can ONLY use the oldest method.
>> + This function is done using read/write [PCSET/PCRESET/PCUNSET] [Sol6,
>> Sol7].
>
> I think the "[Sol6, Sol7]" above referred to Solaris 2.6-7.
> Should we remove that?

Certainly: this was used to refer to structured procfs, I believe.

The following patch on top of the previous one should address all this,
and John's comment as well.

	Rainer
  

Comments

Pedro Alves Sept. 27, 2017, 11:07 a.m. UTC | #1
On 09/27/2017 09:43 AM, Rainer Orth wrote:

> The following patch on top of the previous one should address all this,
> and John's comment as well.

Thanks.  I have no further comments.

Pedro Alves
  

Patch

diff --git a/gdb/common/common.m4 b/gdb/common/common.m4
--- a/gdb/common/common.m4
+++ b/gdb/common/common.m4
@@ -26,7 +26,7 @@  AC_DEFUN([GDB_AC_COMMON], [
   AM_LANGINFO_CODESET
 
   AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl
-		   sys/resource.h sys/socket.h sys/syscall.h dnl
+		   sys/resource.h sys/socket.h dnl
 		   sys/un.h sys/wait.h dnl
 		   thread_db.h wait.h dnl
 		   termios.h termio.h sgtty.h)
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1289,6 +1289,11 @@  AC_CHECK_HEADERS([nlist.h machine/reg.h 
 		  termios.h termio.h \
 		  sgtty.h elf_hp.h \
 		  dlfcn.h])
+AC_CHECK_HEADERS(sys/user.h, [], [],
+[#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
 
 AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h)
 AC_CHECK_HEADERS(term.h, [], [],
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -1,4 +1,4 @@ 
-/* Machine independent support for SVR4 /proc (process file system) for GDB.
+/* Machine independent support for Solaris /proc (process file system) for GDB.
 
    Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
diff --git a/gdb/proc-events.c b/gdb/proc-events.c
--- a/gdb/proc-events.c
+++ b/gdb/proc-events.c
@@ -1,4 +1,4 @@ 
-/* Machine-independent support for SVR4 /proc (process file system)
+/* Machine-independent support for Solaris /proc (process file system)
 
    Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
diff --git a/gdb/proc-flags.c b/gdb/proc-flags.c
--- a/gdb/proc-flags.c
+++ b/gdb/proc-flags.c
@@ -1,4 +1,4 @@ 
-/* Machine independent support for SVR4 /proc (process file system) for GDB.
+/* Machine independent support for Solaris /proc (process file system) for GDB.
    Copyright (C) 1999-2017 Free Software Foundation, Inc.
    Written by Michael Snyder at Cygnus Solutions.
    Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
diff --git a/gdb/proc-why.c b/gdb/proc-why.c
--- a/gdb/proc-why.c
+++ b/gdb/proc-why.c
@@ -1,4 +1,4 @@ 
-/* Machine-independent support for SVR4 /proc (process file system)
+/* Machine-independent support for Solaris /proc (process file system)
 
    Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
diff --git a/gdb/procfs.c b/gdb/procfs.c
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -1,4 +1,4 @@ 
-/* Machine independent support for SVR4 /proc (process file system) for GDB.
+/* Machine independent support for Solaris /proc (process file system) for GDB.
 
    Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
@@ -62,7 +62,8 @@ 
      One that uses the ioctl system call, and another that uses read
      and write system calls.
 
-   This module supports only the read/write interface.  */
+   This module supports only the Solaris version of the read/write
+   interface.  */
 
 #include <sys/types.h>
 #include <dirent.h>	/* opendir/readdir, for listing the LWP's */
@@ -768,7 +769,7 @@  proc_sysargs (procinfo *pi)
       PR_KLC    -- traced process is killed when last /proc file closed.
       PR_ASYNC	-- LWP's get to run/stop independently.
 
-   This function is done using read/write [PCSET/PCRESET/PCUNSET] [Sol6, Sol7].
+   This function is done using read/write [PCSET/PCRESET/PCUNSET].
 
    Arguments:
       pi   -- the procinfo