* valarith.c (value_x_unop): Use builtin_type_int8 as type for
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:25:49 +0000 (14:25 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:25:49 +0000 (14:25 +0000)
UNOP_POSTINCREMENT/UNOP_POSTDECREMENT constant 0 argument.
(value_bit_index): Use extract_unsigned_integer
instead of unpack_long to read single byte.

gdb/ChangeLog
gdb/valarith.c

index eb61a50fe2c90103f6a904f4ddfae4ca12c90365..46c9d943cc83febddef63ab5313933990222015b 100644 (file)
@@ -1,3 +1,10 @@
+2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * valarith.c (value_x_unop): Use builtin_type_int8 as type for
+       UNOP_POSTINCREMENT/UNOP_POSTDECREMENT constant 0 argument.
+       (value_bit_index): Use extract_unsigned_integer
+       instead of unpack_long to read single byte.
+
 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * infcall.c (value_arg_coerce): Add GDBARCH parameter.  Use its
index b9b36570fe2bcebb4ee62fa85c799b540fff9436..59f67d3ed6f7b0a666aa5f31fb1826e9ce0bb75f 100644 (file)
@@ -546,13 +546,13 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
       break;
     case UNOP_POSTINCREMENT:
       strcpy (ptr, "++");
-      argvec[2] = value_from_longest (builtin_type_int, 0);
+      argvec[2] = value_from_longest (builtin_type_int8, 0);
       argvec[3] = 0;
       nargs ++;
       break;
     case UNOP_POSTDECREMENT:
       strcpy (ptr, "--");
-      argvec[2] = value_from_longest (builtin_type_int, 0);
+      argvec[2] = value_from_longest (builtin_type_int8, 0);
       argvec[3] = 0;
       nargs ++;
       break;
@@ -1563,8 +1563,7 @@ value_bit_index (struct type *type, const gdb_byte *valaddr, int index)
   if (index < low_bound || index > high_bound)
     return -1;
   rel_index = index - low_bound;
-  word = unpack_long (builtin_type_unsigned_char,
-                     valaddr + (rel_index / TARGET_CHAR_BIT));
+  word = extract_unsigned_integer (valaddr + (rel_index / TARGET_CHAR_BIT), 1);
   rel_index %= TARGET_CHAR_BIT;
   if (gdbarch_bits_big_endian (current_gdbarch))
     rel_index = TARGET_CHAR_BIT - 1 - rel_index;
This page took 0.040687 seconds and 4 git commands to generate.