Thu Nov 20 04:11:27 1997 Geoffrey Noer <noer@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / typeprint.c
index 92e26140bb7799e4f7d22e5ae1c47019f2110626..6b1c6de1d19649c9c1a4f483c74e3e38b79a9ece 100644 (file)
@@ -15,7 +15,7 @@ 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.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "obstack.h"
@@ -31,7 +31,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "language.h"
 #include "demangle.h"
 
-#include <string.h>
+#include "gdb_string.h"
 #include <errno.h>
 
 static void
@@ -72,7 +72,7 @@ whatis_exp (exp, show)
      int show;
 {
   struct expression *expr;
-  register value val;
+  register value_ptr val;
   register struct cleanup *old_chain = NULL;
 
   if (exp)
@@ -180,6 +180,8 @@ print_type_scalar (type, val, stream)
   unsigned int i;
   unsigned len;
 
+  CHECK_TYPEDEF (type);
+
   switch (TYPE_CODE (type))
     {
 
@@ -214,6 +216,10 @@ print_type_scalar (type, val, stream)
       fprintf_filtered (stream, val ? "TRUE" : "FALSE");
       break;
 
+    case TYPE_CODE_RANGE:
+      print_type_scalar (TYPE_TARGET_TYPE (type), val, stream);
+      return;
+
     case TYPE_CODE_UNDEF:
     case TYPE_CODE_PTR:
     case TYPE_CODE_ARRAY:
@@ -223,7 +229,6 @@ print_type_scalar (type, val, stream)
     case TYPE_CODE_FLT:
     case TYPE_CODE_VOID:
     case TYPE_CODE_SET:
-    case TYPE_CODE_RANGE:
     case TYPE_CODE_STRING:
     case TYPE_CODE_ERROR:
     case TYPE_CODE_MEMBER:
@@ -249,7 +254,7 @@ maintenance_print_type (typename, from_tty)
      char *typename;
      int from_tty;
 {
-  register value val;
+  register value_ptr val;
   register struct type *type;
   register struct cleanup *old_chain;
   struct expression *expr;
This page took 0.024251 seconds and 4 git commands to generate.