* defs.h (extract_signed_integer, extract_unsigned_integer,
[deliverable/binutils-gdb.git] / gdb / p-lang.c
index e743a6f812c584ff953b9a386e7d2044509063bd..1722c0f4e03a04781c85403e3f6a05bb2595c9ee 100644 (file)
@@ -217,6 +217,7 @@ pascal_printstr (struct ui_file *stream, struct type *type,
                 int force_ellipses,
                 const struct value_print_options *options)
 {
+  enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
   unsigned int i;
   unsigned int things_printed = 0;
   int in_quotes = 0;
@@ -227,7 +228,8 @@ pascal_printstr (struct ui_file *stream, struct type *type,
      the last byte of it is a null, we don't print that, in traditional C
      style.  */
   if ((!force_ellipses) && length > 0
-       && extract_unsigned_integer (string + (length - 1) * width, width) == 0)
+       && extract_unsigned_integer (string + (length - 1) * width, width,
+                                    byte_order) == 0)
     length--;
 
   if (length == 0)
@@ -253,13 +255,14 @@ pascal_printstr (struct ui_file *stream, struct type *type,
          need_comma = 0;
        }
 
-      current_char = extract_unsigned_integer (string + i * width, width);
+      current_char = extract_unsigned_integer (string + i * width, width,
+                                              byte_order);
 
       rep1 = i + 1;
       reps = 1;
       while (rep1 < length 
-            && extract_unsigned_integer (string + rep1 * width, width
-               == current_char)
+            && extract_unsigned_integer (string + rep1 * width, width,
+                                         byte_order) == current_char)
        {
          ++rep1;
          ++reps;
This page took 0.025386 seconds and 4 git commands to generate.