From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Remove ioctl-based procfs support on Solaris
Date: Wed, 27 Sep 2017 08:44:00 -0000 [thread overview]
Message-ID: <yddtvzotttg.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <7af9e9eb-62cd-ce53-173b-a12c3d6c0bd5@redhat.com> (Pedro Alves's message of "Tue, 26 Sep 2017 15:03:21 +0100")
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-new-procfs+.patch --]
[-- Type: text/x-patch, Size: 3325 bytes --]
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
next prev parent reply other threads:[~2017-09-27 8:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 12:25 Rainer Orth
2017-09-26 14:03 ` Pedro Alves
2017-09-27 8:44 ` Rainer Orth [this message]
2017-09-27 11:07 ` Pedro Alves
2017-11-30 13:42 ` Rainer Orth
2017-11-30 14:51 ` Pedro Alves
2017-09-26 21:09 ` John Baldwin
2017-09-27 8:48 ` Rainer Orth
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=yddtvzotttg.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=gdb-patches@sourceware.org \
--cc=palves@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