diff options
author | Stu Grossman <grossman@cygnus> | 1992-03-05 20:20:27 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1992-03-05 20:20:27 +0000 |
commit | 407a8389b40fa7af08cae8f1eb347c67cc2436ad (patch) | |
tree | 406cb28847fadd93989dfe892e36c65eb1dc65de /gdb/procfs.c | |
parent | d7eddc517782bf0673e4bcd15c4159ae5799a247 (diff) | |
download | gdb-407a8389b40fa7af08cae8f1eb347c67cc2436ad.zip gdb-407a8389b40fa7af08cae8f1eb347c67cc2436ad.tar.gz gdb-407a8389b40fa7af08cae8f1eb347c67cc2436ad.tar.bz2 |
* config.sub configure.in config/.Sanitize config/mh-irix4
gdb/.Sanitize gdb/configure.in gdb/mips-tdep.c gdb/mipsread.c
gdb/procfs.c gdb/signame.h gdb/tm-irix3.h gdb/tm-mips.h
gdb/xm-irix4.h gdb/config/.Sanitize gdb/config/mt-irix3
gdb/config/mh-irix4 texinfo/configure.in: Port to SGI Irix-4.x.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index c10ba0a..58e8878 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -36,6 +36,7 @@ regardless of whether or not the actual target has floating point hardware. #ifdef USE_PROC_FS /* Entire file goes away if not using /proc */ +#include <time.h> #include <sys/procfs.h> #include <fcntl.h> #include <errno.h> @@ -466,8 +467,23 @@ proc_set_exec_trap () _exit (127); } premptyset (&exitset); + +/* + * GW: Rationale... + * Not all systems with /proc have all the exec* syscalls with the same + * names. On the SGI, for example, there is no SYS_exec, but there + * *is* a SYS_execv. So, we try to account for that. + */ +#ifdef SYS_exec praddset (&exitset, SYS_exec); +#endif +#ifdef SYS_execve praddset (&exitset, SYS_execve); +#endif +#ifdef SYS_execv + praddset(&exitset, SYS_execv); +#endif + if (ioctl (fd, PIOCSEXIT, &exitset) < 0) { perror (procname); @@ -886,8 +902,21 @@ proc_wait (statloc) { statval = (what << 8) | 0177; } - else if ((why == PR_SYSEXIT) && - (what == SYS_exec || what == SYS_execve)) + else if ((why == PR_SYSEXIT) + && + ( +#ifdef SYS_exec + what == SYS_exec +#else + 0 == 0 +#endif +#ifdef SYS_execve + || what == SYS_execve +#endif +#ifdef SYS_execv + || what == SYS_execv +#endif + )) { statval = (SIGTRAP << 8) | 0177; } |