From fbd000da7c05ea751f47a678936de706733ea6e3 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 9 Oct 2015 14:10:18 -0700 Subject: [PATCH] use gdb_byte in ada-lang.c::ada_value_primitive_packed_val... ... instead of "unsigned char". gdb/Changelog: * ada-lang.c (ada_value_primitive_packed_val): Change the type of local variables src and unpacked to "gdb_type *" instead of "unsigned char *". --- gdb/ChangeLog | 6 ++++++ gdb/ada-lang.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 02e9e4069a5..ff3e7d5298c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-10-09 Joel Brobecker + + * ada-lang.c (ada_value_primitive_packed_val): Change the type + of local variables src and unpacked to "gdb_type *" instead of + "unsigned char *". + 2015-10-09 Joel Brobecker * ada-lang.c (ada_value_primitive_packed_val): Make the name diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 60639521f1c..a5e68d52a9e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2406,8 +2406,8 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, unusedLS, /* Number of bits in next significant byte of source that are unused */ accumSize; /* Number of meaningful bits in accum */ - unsigned char *src; /* First byte containing data to unpack */ - unsigned char *unpacked; + gdb_byte *src; /* First byte containing data to unpack */ + gdb_byte *unpacked; unsigned long accum; /* Staging area for bits being transferred */ unsigned char sign; int src_len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8; @@ -2420,7 +2420,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, if (obj == NULL) { v = allocate_value (type); - src = (unsigned char *) valaddr + offset; + src = (gdb_byte *) valaddr + offset; } else if (VALUE_LVAL (obj) == lval_memory && value_lazy (obj)) { @@ -2443,7 +2443,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, else { v = allocate_value (type); - src = (unsigned char *) value_contents (obj) + offset; + src = (gdb_byte *) value_contents (obj) + offset; } if (obj != NULL) @@ -2466,7 +2466,7 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, } else set_value_bitsize (v, bit_size); - unpacked = (unsigned char *) value_contents (v); + unpacked = (gdb_byte *) value_contents (v); srcBitsLeft = bit_size; src_bytes_left = src_len; -- 2.30.2