diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdb/d-valprint.c | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | binutils-users/simark/clang-format.zip binutils-users/simark/clang-format.tar.gz binutils-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/d-valprint.c')
-rw-r--r-- | gdb/d-valprint.c | 32 |
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; } } |