forked from Imagelibrary/binutils-gdb
Tue Jul 13 14:03:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* stabsread.c (define_symbol): Make the caddr_t hack apply to `function returning foo' as well as `pointer to foo'. * remote.c [REMOTE_BREAKPOINT]: Use for breakpoint insn if defined. * config/m68k/tm-m68k.h: Define it. * mem-break.c, breakpoint.c: Improve comments. Tue Jul 13 13:35:31 1993 Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr) * config/m68k/tm-dpx2.h: Replace "tm-68k.h" with "m68k/tm-m68k.h". * config/m68k/xm-dpx2.h: Define HAVE_TERMIOS not HAVE_TERMIO.
This commit is contained in:
@@ -1037,25 +1037,27 @@ define_symbol (valu, string, desc, type, objfile)
|
||||
|
||||
if (TYPE_NAME (SYMBOL_TYPE (sym)) == NULL)
|
||||
{
|
||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR)
|
||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
|
||||
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)
|
||||
{
|
||||
/* If we are giving a name to a type such as "pointer
|
||||
to foo", we better not set the TYPE_NAME. If the
|
||||
program contains "typedef char *caddr_t;", we don't
|
||||
want all variables of type char * to print as
|
||||
caddr_t. This is not just a consequence of GDB's
|
||||
type management; PCC and GCC (at least through
|
||||
version 2.4) both output variables of either type
|
||||
char * or caddr_t with the type number defined in
|
||||
the 't' symbol for caddr_t. If a future compiler
|
||||
cleans this up it GDB is not ready for it yet, but
|
||||
if it becomes ready we somehow need to disable this
|
||||
check (without breaking the PCC/GCC2.4 case).
|
||||
/* If we are giving a name to a type such as "pointer to
|
||||
foo" or "function returning foo", we better not set
|
||||
the TYPE_NAME. If the program contains "typedef char
|
||||
*caddr_t;", we don't want all variables of type char
|
||||
* to print as caddr_t. This is not just a
|
||||
consequence of GDB's type management; PCC and GCC (at
|
||||
least through version 2.4) both output variables of
|
||||
either type char * or caddr_t with the type number
|
||||
defined in the 't' symbol for caddr_t. If a future
|
||||
compiler cleans this up it GDB is not ready for it
|
||||
yet, but if it becomes ready we somehow need to
|
||||
disable this check (without breaking the PCC/GCC2.4
|
||||
case).
|
||||
|
||||
Sigh.
|
||||
|
||||
Fortunately, this check seems not to be necessary
|
||||
for anything except pointers. */
|
||||
for anything except pointers or functions. */
|
||||
}
|
||||
else
|
||||
TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_NAME (sym);
|
||||
|
||||
Reference in New Issue
Block a user