aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/d-valprint.c')
-rw-r--r--gdb/d-valprint.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c
index 1869754..cb90289 100644
--- a/gdb/d-valprint.c
+++ b/gdb/d-valprint.c
@@ -28,9 +28,8 @@
TYPE is a dynamic array, non-zero otherwise. */
static int
-dynamic_array_type (struct type *type,
- LONGEST embedded_offset, CORE_ADDR address,
- struct ui_file *stream, int recurse,
+dynamic_array_type (struct type *type, LONGEST embedded_offset,
+ CORE_ADDR address, struct ui_file *stream, int recurse,
struct value *val,
const struct value_print_options *options)
{
@@ -38,8 +37,7 @@ dynamic_array_type (struct type *type,
&& type->field (0).type ()->code () == TYPE_CODE_INT
&& strcmp (type->field (0).name (), "length") == 0
&& strcmp (type->field (1).name (), "ptr") == 0
- && !value_bits_any_optimized_out (val,
- TARGET_CHAR_BIT * embedded_offset,
+ && !value_bits_any_optimized_out (val, TARGET_CHAR_BIT * embedded_offset,
TARGET_CHAR_BIT * type->length ()))
{
CORE_ADDR addr;
@@ -54,9 +52,9 @@ dynamic_array_type (struct type *type,
ptr_type = type->field (1).type ();
elttype = check_typedef (ptr_type->target_type ());
- addr = unpack_pointer (ptr_type,
- valaddr + type->field (1).loc_bitpos () / 8
- + embedded_offset);
+ addr
+ = unpack_pointer (ptr_type, valaddr + type->field (1).loc_bitpos () / 8
+ + embedded_offset);
true_type = check_typedef (elttype);
true_type = lookup_array_range_type (true_type, 0, length - 1);
@@ -80,15 +78,15 @@ d_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
struct type *type = check_typedef (value_type (val));
switch (type->code ())
{
- case TYPE_CODE_STRUCT:
- ret = dynamic_array_type (type, value_embedded_offset (val),
- value_address (val),
- stream, recurse, val, options);
- if (ret == 0)
- break;
- /* Fall through. */
- default:
- c_value_print_inner (val, stream, recurse, options);
+ case TYPE_CODE_STRUCT:
+ ret = dynamic_array_type (type, value_embedded_offset (val),
+ value_address (val), stream, recurse, val,
+ options);
+ if (ret == 0)
break;
+ /* Fall through. */
+ default:
+ c_value_print_inner (val, stream, recurse, options);
+ break;
}
}