diff options
author | Geoffrey Noer <noer@cygnus> | 1997-04-10 20:24:42 +0000 |
---|---|---|
committer | Geoffrey Noer <noer@cygnus> | 1997-04-10 20:24:42 +0000 |
commit | 234a732de0f8970e9ca58cfe1071585f9a5205ee (patch) | |
tree | 9ea3d5157fc3da71129a61d78645b05ccce94f0d /gdb/config | |
parent | fc8d57c2dc87d5bf307a6bfb52af755f1fa65e32 (diff) | |
download | gdb-234a732de0f8970e9ca58cfe1071585f9a5205ee.zip gdb-234a732de0f8970e9ca58cfe1071585f9a5205ee.tar.gz gdb-234a732de0f8970e9ca58cfe1071585f9a5205ee.tar.bz2 |
Thu Apr 10 13:20:53 1997 Geoffrey Noer <noer@cygnus.com>
* procfs.c: Substantial (but incomplete) changes to support
sysv4.2mp procfs as implemented in UnixWare 2.1. The procinfo
struct now has substructs like struct flt_ctl instead of
just a fltset_t and has a ctl_fd, status_fd, as_fd, and
map_fd instead of a single fd. Non-sysv4.2mp procfs models
still have the structs and multiple fds, but don't use the
entire struct and the four fds all point to the same thing.
We use PROCFS_USE_READ_WRITE to decide whether to talk to
procfs with reads/writes or use ioctl instead. We use
HAVE_MULTIPLE_PROC_FDS to determine whether procfs really has
multiple fds or not. PROC_NAME_FMT is split out into
CTL_PROC_NAME_FMT, AS_PROC_NAME_FMT, MAP_PROC_NAME_FMT,
STATUS_PROC_NAME_FMT.
(procfs_notice_signals): now a necessary wrapper around
(notice_signals): which are the new guts for noticing signals
(open_proc_file): gets a new flag arg used in sysv4.2mp to
determine whether or not to attempt to open the ctl_fd.
(procfs_read_status): new local function, reads procfs status
(procfs_write_pcwstop): new local function, writes a PCWSTOP
(procfs_write_pckill): new local function, writes a PCKILL
(unconditionally_kill_inferior): remove signo since we now
just call procfs_write_pckill().
(procfs_xfer_memory): call lseek with SEEK_SET rather than 0
(proc_iterate_over_mappings): the whole function is ifdefed
on UNIXWARE to keep things readable.
Expanded the syscall_table to include new potential sysv4.2mp
members. Note that all ifdefs of UNIXWARE should be eliminated
if possible or renamed to describe what's being selected for a
bit better. Sysv4.2mp and IRIX both have SYS_sproc so the
IRIX specific code now also checks it's not UNIXWARE.
* config/i386/tm-i386v42mp.h: also define HAVE_PSTATUS_T,
HAVE_NO_PRRUN_T, PROCFS_USE_READ_WRITE, and UNIXWARE
* config/mips/nm-irix4.h: set CTL_PROC_NAME_FMT et al to
"/debug/%d" as PROC_NAME_FMT used to be
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/i386/tm-i386v42mp.h | 21 | ||||
-rw-r--r-- | gdb/config/mips/nm-irix4.h | 5 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h index 951a05a..b8b093d 100644 --- a/gdb/config/i386/tm-i386v42mp.h +++ b/gdb/config/i386/tm-i386v42mp.h @@ -25,10 +25,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "i386/tm-i386v4.h" -/* proc on this architecture has multiple fds (ctl, as, map, status) */ -/* including a control fd */ +/* procfs on this architecture has multiple fds (ctl, as, map, status) + including a control fd */ #define HAVE_MULTIPLE_PROC_FDS -#define HAVE_CONTROL_PROC_FD + +/* procfs on this architecture has a pstatus_t instead of prstatus_t */ + +#define HAVE_PSTATUS_T + +/* procfs on this architecture has no prrun_t */ +#define HAVE_NO_PRRUN_T + +/* procfs on this architecture communicates with read/write instead + of ioctl */ + +#define PROCFS_USE_READ_WRITE + +/* define to select for other sysv4.2mp weirdness */ + +#define UNIXWARE #endif /* ifndef TM_I386V42MP_H */ diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h index c4227ba..017695c 100644 --- a/gdb/config/mips/nm-irix4.h +++ b/gdb/config/mips/nm-irix4.h @@ -23,7 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * with ptrace(), which seems *extremely* fragile, anyway. */ #define USE_PROC_FS -#define PROC_NAME_FMT "/debug/%d" +#define CTL_PROC_NAME_FMT "/debug/%d" +#define AS_PROC_NAME_FMT "/debug/%d" +#define MAP_PROC_NAME_FMT "/debug/%d" +#define STATUS_PROC_NAME_FMT "/debug/%d" /* Don't need special routines for the SGI -- we can use infptrace.c */ #undef FETCH_INFERIOR_REGISTERS |