From 2c7ab4ca35418cfcecce16d8311bb16599b085cd Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Mon, 21 Jun 1993 23:46:49 +0000 Subject: [PATCH] * config/i386/*aix*, i386aix-nat.c: New files. * configure.in: Use them. * alldeps.mak: List them. * coffread.c (decode_base_type): Deal with anonymous enum type. * i387-tdep.c (print_387_status_word): Add comment re "top". * i386-tdep.c [I386_AIX_TARGET] (i386_extract_return_value): New func. * dbxread.c: Use SEEK_SET and SEEK_CUR, not L_*. Define them if and only if not defined by a header file. * mipsread.c: Don't define L_SET or L_INCR. --- gdb/.Sanitize | 1 + gdb/ChangeLog | 9 ++++++++- gdb/alldeps.mak | 1 + gdb/configure.in | 2 ++ gdb/dbxread.c | 21 ++++++++++++--------- gdb/i387-tdep.c | 5 ++++- 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/gdb/.Sanitize b/gdb/.Sanitize index 20e638f5872..b4f45e130de 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -115,6 +115,7 @@ hppah-nat.c i386-pinsn.c i386-stub.c i386-tdep.c +i386aix-nat.c i386b-nat.c i386mach-nat.c i386v-nat.c diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7b42aac797c..8a59ba40d4d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,7 +1,14 @@ Mon Jun 21 16:09:46 1993 Jim Kingdon (kingdon@cygnus.com) - * config/i386/*aix*: New files. + * config/i386/*aix*, i386aix-nat.c: New files. + * configure.in: Use them. * alldeps.mak: List them. + * coffread.c (decode_base_type): Deal with anonymous enum type. + * i387-tdep.c (print_387_status_word): Add comment re "top". + * i386-tdep.c [I386_AIX_TARGET] (i386_extract_return_value): New func. + * dbxread.c: Use SEEK_SET and SEEK_CUR, not L_*. Define them if and + only if not defined by a header file. + * mipsread.c: Don't define L_SET or L_INCR. Mon Jun 21 15:10:07 1993 Fred Fish (fnf@cygnus.com) diff --git a/gdb/alldeps.mak b/gdb/alldeps.mak index 6d61d2a80db..fad897835ec 100644 --- a/gdb/alldeps.mak +++ b/gdb/alldeps.mak @@ -33,6 +33,7 @@ ${srcdir}/i386-tdep.c\ ${srcdir}/i386b-nat.c\ ${srcdir}/i386mach-nat.c\ ${srcdir}/i386v-nat.c\ +${srcdir}/i386aix-nat.c\ ${srcdir}/i386v4-nat.c\ ${srcdir}/i387-tdep.c\ ${srcdir}/i960-pinsn.c\ diff --git a/gdb/configure.in b/gdb/configure.in index c56d9b0fe73..b3642fec701 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -37,6 +37,7 @@ hppa*-hp-hpux*) gdb_host=hppahpux ;; i[34]86-ncr-*) gdb_host=ncr3000 ;; i[34]86-sequent-*) gdb_host=symmetry ;; +i[34]86-*-aix*) gdb_host=i386aix ;; i[34]86-*-bsd*) gdb_host=i386bsd ;; i[34]86-*-go32) gdb_host=go32 ;; i[34]86-*-linux) gdb_host=linux ;; @@ -168,6 +169,7 @@ i[34]86-*-aout) gdb_target=i386aout ;; i[34]86-*-coff) gdb_target=i386v ;; i[34]86-*-elf) gdb_target=i386v ;; +i[34]86-*-aix*) gdb_target=i386aix ;; i[34]86-*-bsd*) gdb_target=i386bsd ;; i[34]86-*-go32) gdb_target=i386aout ;; i[34]86-*-lynxos*) gdb_target=i386lynx diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 345dd759c00..65a9fec5c48 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -38,8 +38,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if defined(USG) || defined(__CYGNUSCLIB__) #include #include -#define L_SET 0 -#define L_INCR 1 #endif #include @@ -68,6 +66,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "aout/aout64.h" #include "aout/stab_gnu.h" /* We always use GNU stabs, not native, now */ +#if !defined (SEEK_SET) +#define SEEK_SET 0 +#define SEEK_CUR 1 +#endif + /* Each partial symbol table entry contains a pointer to private data for the read_symtab() function to use when expanding a partial symbol table entry to a full symbol table entry. @@ -455,7 +458,7 @@ dbx_symfile_read (objfile, section_offsets, mainline) int val; sym_bfd = objfile->obfd; - val = bfd_seek (objfile->obfd, DBX_SYMTAB_OFFSET (objfile), L_SET); + val = bfd_seek (objfile->obfd, DBX_SYMTAB_OFFSET (objfile), SEEK_SET); if (val < 0) perror_with_name (objfile->name); @@ -572,7 +575,7 @@ dbx_symfile_init (objfile) } else { - val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, L_SET); + val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, SEEK_SET); if (val < 0) perror_with_name (name); @@ -612,7 +615,7 @@ dbx_symfile_init (objfile) /* Now read in the string table in one big gulp. */ - val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, L_SET); + val = bfd_seek (sym_bfd, STRING_TABLE_OFFSET, SEEK_SET); if (val < 0) perror_with_name (name); val = bfd_read (DBX_STRINGTAB (objfile), DBX_STRINGTAB_SIZE (objfile), 1, @@ -1232,7 +1235,7 @@ dbx_psymtab_to_symtab_1 (pst) symbol_size = SYMBOL_SIZE (pst); /* Read in this file's symbols */ - bfd_seek (pst->objfile->obfd, SYMBOL_OFFSET (pst), L_SET); + bfd_seek (pst->objfile->obfd, SYMBOL_OFFSET (pst), SEEK_SET); read_ofile_symtab (pst); sort_symtab_syms (pst->symtab); @@ -1331,7 +1334,7 @@ read_ofile_symtab (pst) would slow down initial readin, so we look for it here instead. */ if (!processing_acc_compilation && sym_offset >= (int)symbol_size) { - bfd_seek (symfile_bfd, sym_offset - symbol_size, L_INCR); + bfd_seek (symfile_bfd, sym_offset - symbol_size, SEEK_CUR); fill_symbuf (abfd); bufp = &symbuf[symbuf_idx++]; SWAP_SYMBOL (bufp, abfd); @@ -1363,7 +1366,7 @@ read_ofile_symtab (pst) /* The N_SO starting this symtab is the first symbol, so we better not check the symbol before it. I'm not this can happen, but it doesn't hurt to check for it. */ - bfd_seek (symfile_bfd, sym_offset, L_INCR); + bfd_seek (symfile_bfd, sym_offset, SEEK_CUR); processing_gcc_compilation = 0; } @@ -1990,7 +1993,7 @@ elfstab_build_psymtabs (objfile, section_offsets, mainline, /* Now read in the string table in one big gulp. */ - val = bfd_seek (sym_bfd, stabstroffset, L_SET); + val = bfd_seek (sym_bfd, stabstroffset, SEEK_SET); if (val < 0) perror_with_name (name); val = bfd_read (DBX_STRINGTAB (objfile), stabstrsize, 1, sym_bfd); diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index b0f00880bd1..560050727e7 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -107,6 +107,9 @@ print_387_status_word (status) (status & 0x0400) != 0, (status & 0x0200) != 0, (status & 0x0100) != 0); - + + /* FIXME: Someone claims this should be 7 - (status >> 11) & 7 for AIX. + What's the story? Is the following just wrong or are differing + notations in use? */ printf ("top %d\n", (status >> 11) & 7); } -- 2.30.2