aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-03-20 10:14:51 -0600
committerTom Tromey <tromey@adacore.com>2023-03-24 10:20:52 -0600
commit4bfcb286dd1f85f74616f169b4ca9db7677fab5b (patch)
treec039b0a57a6c26a63c486e19b31819880f4796a7 /gdb/gdbtypes.c
parent84bc96de16b64ae67460bf4896379a7543cecfd3 (diff)
downloadgdb-4bfcb286dd1f85f74616f169b4ca9db7677fab5b.zip
gdb-4bfcb286dd1f85f74616f169b4ca9db7677fab5b.tar.gz
gdb-4bfcb286dd1f85f74616f169b4ca9db7677fab5b.tar.bz2
Preserve name of range types
The type-allocation patches introduced a small regression that was picked up by the AdaCore internal test suite. Previously, the name of a range type was preserved by resolve_dynamic_range, but now it is not. This patch changes this code to preserve the name. Reviewed-By: Bruno Larsen <blarsen@redhat.com>
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index b25b0ce..44b0692 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -2230,6 +2230,7 @@ resolve_dynamic_range (struct type *dyn_range_type,
static_range_type = create_range_type_with_stride
(alloc, static_target_type,
&low_bound, &high_bound, bias, &stride, byte_stride_p);
+ static_range_type->set_name (dyn_range_type->name ());
static_range_type->bounds ()->flag_bound_evaluated = 1;
return static_range_type;
}