Add tm-i386v4.h and xm-i386v4.h to Sanitize, add i386/SVR4 to configuration

file, recognize names beginning with '.' as compiler generated "fake" tags
for anonymous structures, unions and enums.  Add target dependent functions
for SVR4 /proc register interface (i386-tdep.c).
This commit is contained in:
Fred Fish 1991-11-30 04:46:50 +00:00
parent 05b261a334
commit 8c6e9f05f2
7 changed files with 99 additions and 3 deletions

View File

@ -201,6 +201,7 @@ tm-hp300bsd.h
tm-hp300hpux.h
tm-i386v-g.h
tm-i386v.h
tm-i386v4.h
tm-i960.h
tm-irix3.h
tm-isi.h
@ -254,6 +255,7 @@ xm-hp300hpux.h
xm-i386mach.h
xm-i386sco.h
xm-i386v.h
xm-i386v4.h
xm-i386v32.h
xm-irix3.h
xm-isi.h

View File

@ -1,5 +1,23 @@
Fri Nov 29 16:59:25 1991 Fred Fish (fnf at cygnus.com)
* configure.in: Add SVR4 i386 configurations.
* config/mh-i386v4, config/mt-i386v4, tm-i386v4.h, xm-i386v4.h:
New files for i386/SVR4.
* tm-i386v.h: Allow START_INFERIOR_TRAPS_EXPECTED and
DECR_PC_AFTER_BREAK to be predefined by files including
tm-i386v.h.
* i386-tdep.c: Add supply_gregset(), fill_gregset(),
supply_fpregset(), and fill_fpregset() functions, which are
target dependent support functions for the SVR4 /proc register
interface.
* dwarfread.c (enum_type, struct_type): Expand recognized
compiler generated tags to include symbols beginning with '.' as
well as '~'.
* symtab.c (sources_info): Change simple printf of error message
to call to error().

View File

@ -86,6 +86,7 @@ i386)
case "${host_os}" in
sysv) gdb_host=i386v ;;
sysv32) gdb_host=i386v32 ;;
svr4) gdb_host=i386v4 ;;
mach) gdb_host=i386mach ;;
esac
;;
@ -242,6 +243,7 @@ i386)
case "${target_os}" in
sysv) gdb_target=i386v ;;
sysv32) gdb_target=i386v32 ;;
svr4) gdb_target=i386v4 ;;
mach) gdb_target=i386mach ;;
coff) gdb_target=i386v ;;
aout) gdb_target=i386aout ;;

View File

@ -926,7 +926,9 @@ DEFUN(struct_type, (dip, thisdie, enddie),
}
/* Some compilers try to be helpful by inventing "fake" names for anonymous
enums, structures, and unions, like "~0fake". Thanks, but no thanks. */
if (dip -> at_name == NULL || *dip -> at_name == '~')
if (dip -> at_name == NULL
|| *dip -> at_name == '~'
|| *dip -> at_name == '.')
{
tpart2 = "{...}";
}
@ -1345,7 +1347,9 @@ DEFUN(enum_type, (dip), struct dieinfo *dip)
tpart1 = "enum ";
/* Some compilers try to be helpful by inventing "fake" names for anonymous
enums, structures, and unions, like "~0fake". Thanks, but no thanks. */
if (dip -> at_name == NULL || *dip -> at_name == '~')
if (dip -> at_name == NULL
|| *dip -> at_name == '~'
|| *dip -> at_name == '.')
{
tpart2 = "{...}";
} else {

View File

@ -1,4 +1,4 @@
/* Macro defintions for i386.
/* Macro definitions for i386, Unix System V.
Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
@ -42,7 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
* to run an inferior, and when we finally get to
* the inferior code. This is 2 on most implementations.
*/
#ifndef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 4
#endif
/* Offset from address of function to start of its code.
Zero on most machines. */
@ -78,7 +80,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
This is often the number of bytes in BREAKPOINT
but not always. */
#ifndef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 1
#endif
/* Nonzero if instruction at PC is a return instruction. */

38
gdb/tm-i386v4.h Normal file
View File

@ -0,0 +1,38 @@
/* Macro definitions for GDB on an Intel i386 running SVR4.
Copyright (C) 1991, Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygint)
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Use the alternate method of determining valid frame chains. */
#define FRAME_CHAIN_VALID_ALTERNATE
/* number of traps that happen between exec'ing the shell
* to run an inferior, and when we finally get to
* the inferior code. This is 2 on most implementations.
*/
#define START_INFERIOR_TRAPS_EXPECTED 2
#include "tm-svr4.h"
#include "tm-i386v.h"
/* We can't tell how many args there are
now that the C compiler delays popping them. */
#undef FRAME_NUM_ARGS
#define FRAME_NUM_ARGS(val,fi) (val = -1)

28
gdb/xm-i386v4.h Normal file
View File

@ -0,0 +1,28 @@
/* Macro definitions for GDB on an Intel i386 running SVR4.
Copyright (C) 1991, Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support (fnf@cygint)
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Pick up most of what we need from the generic i386 host include file. */
#include "xm-i386v.h"
/* Pick up more stuff from the generic SVR4 host include file. */
#include "xm-svr4.h"