aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2/read.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ddd831e..d64f572 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-06-30 Tom Tromey <tromey@adacore.com>
+ * dwarf2/read.c (quirk_rust_enum): Correctly call
+ alloc_rust_variant for default-less enum.
+
+2020-06-30 Tom Tromey <tromey@adacore.com>
+
PR build/26183:
* ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
gdb::to_string.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 4dc9ad6..b097f62 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -9691,7 +9691,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile)
}
/* Indicate that this is a variant type. */
- alloc_rust_variant (&objfile->objfile_obstack, type, 0, 1,
+ alloc_rust_variant (&objfile->objfile_obstack, type, 0, -1,
gdb::array_view<discriminant_range> (ranges,
n_fields - 1));
}