2004-08-13 Michael Chastain <mec.gnu@mindspring.com>
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index a93ddbf8dd8755eb8698f15a0bca7d42652eaeef..c167cc46bc09f88ab3ca5aea43b5270ee0329c24 100644 (file)
@@ -350,6 +350,33 @@ print_scalar_formatted (void *valaddr, struct type *type, int format, int size,
   LONGEST val_long = 0;
   unsigned int len = TYPE_LENGTH (type);
 
+  if (len > sizeof(LONGEST) &&
+      (TYPE_CODE (type) == TYPE_CODE_INT
+       || TYPE_CODE (type) == TYPE_CODE_ENUM))
+    {
+      switch (format)
+       {
+       case 'o':
+         print_octal_chars (stream, valaddr, len);
+         return;
+       case 'u':
+       case 'd':
+         print_decimal_chars (stream, valaddr, len);
+         return;
+       case 't':
+         print_binary_chars (stream, valaddr, len);
+         return;
+       case 'x':
+         print_hex_chars (stream, valaddr, len);
+         return;
+       case 'c':
+         print_char_chars (stream, valaddr, len);
+         return;
+       default:
+         break;
+       };
+    }
+
   if (format != 'f')
     val_long = unpack_long (type, valaddr);
 
@@ -2119,18 +2146,18 @@ but no count or size letter (see \"x\" command).", NULL));
 environment, the value is printed in its own window.");
   set_cmd_completer (c, location_completer);
 
-  add_show_from_set (
-                add_set_cmd ("max-symbolic-offset", no_class, var_uinteger,
-                             (char *) &max_symbolic_offset,
+  deprecated_add_show_from_set
+    (add_set_cmd ("max-symbolic-offset", no_class, var_uinteger,
+                 (char *) &max_symbolic_offset,
        "Set the largest offset that will be printed in <symbol+1234> form.",
-                             &setprintlist),
-                     &showprintlist);
-  add_show_from_set (
-                     add_set_cmd ("symbol-filename", no_class, var_boolean,
-                                  (char *) &print_symbol_filename,
-          "Set printing of source filename and line number with <symbol>.",
-                                  &setprintlist),
-                     &showprintlist);
+                 &setprintlist),
+     &showprintlist);
+  deprecated_add_show_from_set
+    (add_set_cmd ("symbol-filename", no_class, var_boolean,
+                 (char *) &print_symbol_filename, "\
+Set printing of source filename and line number with <symbol>.",
+                 &setprintlist),
+     &showprintlist);
 
   /* For examine/instruction a single byte quantity is specified as
      the data.  This avoids problems with value_at_lazy() requiring a
This page took 0.024652 seconds and 4 git commands to generate.