public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFA 0/3] Discriminated unions
@ 2018-02-20 19:06 Tom Tromey
  2018-02-20 19:06 ` [RFA 2/3] Convert Rust to use discriminated unions Tom Tromey
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Tom Tromey @ 2018-02-20 19:06 UTC (permalink / raw)
  To: gdb-patches

This series provides a minimal implementation of DW_TAG_variant and
DW_TAG_variant_part reading for gdb.  It also converts the Rust
language support to use this new approach.  The Rust changes are
motivated by some work to change how the Rust compiler emits enums;
see:

    https://github.com/rust-lang/rust/issues/32920

A DW_TAG_variant is represented in gdb as a union with some extra
information about how to compute the discriminant and thus find the
active variant part.

I have intentionally omitted a few things you might expect to find in
this series:

* Support for DW_AT_discr_list.  This was not needed by Rust.

* Support for multiple members in a single variant.  This was also not
  needed by Rust.

* Special handling in c-varobj.c and c-valprint.c.  These constructs
  can't appear in C, and I think it's useful to be able to "set lang c"
  and see the underlying bits.

I think these holes can be filled in later, as needed, without too
much difficulty.

Regression tested by the buildbot; but I also ran the DWARF and Rust
tests locally.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-02-22 16:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-20 19:06 [RFA 0/3] Discriminated unions Tom Tromey
2018-02-20 19:06 ` [RFA 2/3] Convert Rust to use discriminated unions Tom Tromey
2018-02-21  5:08   ` Joel Brobecker
2018-02-21 16:30     ` Tom Tromey
2018-02-22  3:49       ` Joel Brobecker
2018-02-20 19:06 ` [RFA 1/3] Initial support for variant parts Tom Tromey
2018-02-21  5:03   ` Joel Brobecker
2018-02-21 15:51     ` Tom Tromey
2018-02-21 17:34       ` Tom Tromey
2018-02-22  3:47       ` Joel Brobecker
2018-02-22 16:07         ` Tom Tromey
2018-02-20 19:06 ` [RFA 3/3] Handle DW_TAG_variant_part and DW_TAG_variant Tom Tromey
2018-02-21  5:12   ` Joel Brobecker
2018-02-21 17:30     ` Tom Tromey
2018-02-21  4:44 ` [RFA 0/3] Discriminated unions Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).