aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-05-17 20:13:50 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-05-17 20:13:50 +0000
commit9c036bd836f66747ccd35f6a21a2758f0f2cb8fc (patch)
tree70899574fb9676d917fe7ce6b6a24f3ffca34ab5 /gdb/gdbtypes.c
parentee8b83460016b61902117b463dfdd6d0323ce3ac (diff)
downloadgdb-9c036bd836f66747ccd35f6a21a2758f0f2cb8fc.zip
gdb-9c036bd836f66747ccd35f6a21a2758f0f2cb8fc.tar.gz
gdb-9c036bd836f66747ccd35f6a21a2758f0f2cb8fc.tar.bz2
* utils.c (vfprintf_maybe_filtered, vfprintf_unfiltered): Call
fputs_unfiltered and exit directly, rather than fatal. The latter calls vfprintf_unfiltered! * gdbtypes.h, gdbtypes.c (can_dereference): New function. * value.h, printcmd.c (print_value_flags): Move from here... * annotate.c: ...to here, and make it use can_dereference.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 06bada5..b891237 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1146,6 +1146,17 @@ lookup_fundamental_type (objfile, typeid)
return (*typep);
}
+int
+can_dereference (t)
+ struct type *t;
+{
+ /* FIXME: Should we return true for references as well as pointers? */
+ return
+ (t != NULL
+ && TYPE_CODE (t) == TYPE_CODE_PTR
+ && TYPE_CODE (TYPE_TARGET_TYPE (t)) != TYPE_CODE_VOID);
+}
+
#if MAINTENANCE_CMDS
static void