From 6e8cb14ae5bbf686d99416c8f9681d10a95e0548 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 23 May 2000 07:49:05 +0000 Subject: [PATCH] IRIX GCC fixes from 5.0 branch. --- gdb/ChangeLog | 11 +++++++++++ gdb/TODO | 12 ++++-------- gdb/configure.in | 2 +- gdb/proc-api.c | 6 ++++++ 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9bc8ef13aee..f14b47fd3ef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +Tue May 23 17:44:18 2000 Andrew Cagney + + From Mon May 8 14:49:51 2000 Andrew Cagney + (gdb 5.0): From Michael Paddon : + * configure.in (AC_CHECK_HEADERS): Check for . + * configure: Re-generate. + * proc-api.c: Only include when available. + (ioctl_table): Check that PIOCGETPR and PIOCGETU are defined. + + * TODO: Update. + 2000-05-17 Andrew Cagney * GDB 5.0 released. diff --git a/gdb/TODO b/gdb/TODO index 6eefc009786..f9205f3971a 100644 --- a/gdb/TODO +++ b/gdb/TODO @@ -15,16 +15,12 @@ release. -- -GDB doesn't build under IRIX6.4 +GDB requires GCC to build under IRIX -Benjamin Gamsa wrote: +IRIX, being more pedantic than GCC reports as errors certain +assignments that GCC treats as warnings. -Has anyone successfully built the latest (from cvs) gdb on IRIX6.4 or -later? The first problem I hit is that proc-api.c includes -sys/user.h, which no longer exists under IRIX6.4. If I comment out -that include, the next problem I hit is that PIOCGETPR and PIOCGETU -are no longer defined in IRIX6.4 (presumably related to the -disappearance of user.h). +This can be worked around by building GDB with the GCC compiler. -- diff --git a/gdb/configure.in b/gdb/configure.in index 468a07e2b2d..c58eb355041 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -102,7 +102,7 @@ AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h thread_db.h proc_service.h \ string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ term.h termio.h termios.h unistd.h wait.h sys/wait.h \ wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ - time.h sys/ioctl.h) + time.h sys/ioctl.h sys/user.h) AC_HEADER_STAT AC_C_CONST diff --git a/gdb/proc-api.c b/gdb/proc-api.c index 771a28e6374..cf12d424d65 100644 --- a/gdb/proc-api.c +++ b/gdb/proc-api.c @@ -36,7 +36,9 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include /* for struct proc */ +#ifdef HAVE_SYS_USER_H #include /* for struct user */ +#endif #include /* for O_RDWR etc. */ #include @@ -118,8 +120,12 @@ static struct trans ioctl_table[] = { { PIOCGETPTIMER, "PIOCGETPTIMER", "get process timers" }, #endif /* irix event counters */ { PIOCGENTRY, "PIOCGENTRY", "get traced syscall entry set" }, +#if defined (PIOCGETPR) { PIOCGETPR, "PIOCGETPR", "read struct proc" }, +#endif +#if defined (PIOCGETU) { PIOCGETU, "PIOCGETU", "read user area" }, +#endif #if defined (PIOCGETUTK) && (defined(KERNEL) || defined(SHOW_UTT)) /* osf */ { PIOCGETUTK, "PIOCGETUTK", "get the utask struct" }, #endif -- 2.30.2