This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
gdbtypes.c: new type predicate
- To: gdb-patches@sourceware.cygnus.com
- Subject: gdbtypes.c: new type predicate
- From: Jim Blandy <jimb@cygnus.com>
- Date: Thu, 15 Jul 1999 13:24:41 -0500 (EST)
This is part of the initial set of changes to support the HP PA 2.0
architecture in "wide" (64-bit) mode. I've committed it to devo.
1999-07-15 Jim Blandy <jimb@cris.red-bean.com>
* gdbtypes.c (is_integral_type): New function.
* gdbtypes.h: Prototype for above.
Index: gdbtypes.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtypes.c,v
retrieving revision 2.93
diff -c -r2.93 gdbtypes.c
*** gdbtypes.c 1999/07/07 23:51:08 2.93
--- gdbtypes.c 1999/07/15 18:21:25
***************
*** 1620,1625 ****
--- 1620,1639 ----
&& TYPE_CODE (TYPE_TARGET_TYPE (t)) != TYPE_CODE_VOID);
}
+ int
+ is_integral_type (t)
+ struct type *t;
+ {
+ CHECK_TYPEDEF (t);
+ return
+ ((t != NULL)
+ && ((TYPE_CODE(t) == TYPE_CODE_INT)
+ || (TYPE_CODE(t) == TYPE_CODE_ENUM)
+ || (TYPE_CODE(t) == TYPE_CODE_CHAR)
+ || (TYPE_CODE(t) == TYPE_CODE_RANGE)
+ || (TYPE_CODE(t) == TYPE_CODE_BOOL)));
+ }
+
/* Chill varying string and arrays are represented as follows:
struct { int __var_length; ELEMENT_TYPE[MAX_SIZE] __var_data};
Index: gdbtypes.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtypes.h,v
retrieving revision 2.74
diff -c -r2.74 gdbtypes.h
*** gdbtypes.h 1999/07/07 23:51:08 2.74
--- gdbtypes.h 1999/07/15 18:21:28
***************
*** 1142,1147 ****
--- 1142,1149 ----
extern int can_dereference PARAMS ((struct type *));
+ extern int is_integral_type PARAMS ((struct type *));
+
extern void maintenance_print_type PARAMS ((char *, int));
/* typeprint.c */