aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-07-14 15:12:05 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-07-14 15:12:05 +0000
commit5af4f5f6f13163c6d9a516fc7cf7383d824d14b4 (patch)
treeb126a6a9fc89606345b6c1fb61b41425b2e7cb2b /gdb/stabsread.c
parentb2eed00fa9d4dbee676d1f96dda1fce088eee5bf (diff)
downloadgdb-5af4f5f6f13163c6d9a516fc7cf7383d824d14b4.zip
gdb-5af4f5f6f13163c6d9a516fc7cf7383d824d14b4.tar.gz
gdb-5af4f5f6f13163c6d9a516fc7cf7383d824d14b4.tar.bz2
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.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 7e8f10a..a31427a 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -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);