This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Conditionally drop the discriminant field in quirk_rust_enum


*** TEST RESULTS FOR COMMIT bedda9aced2b3a8ab05e0fbf1372e394e32afbde ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: bedda9aced2b3a8ab05e0fbf1372e394e32afbde

Conditionally drop the discriminant field in quirk_rust_enum

While debugging the crash that Jan reported, I noticed that in some
situations we could end up with a situation where one branch of a Rust
enum type ended up with a field count of -1.

The fix is simple: only conditionally drop the discriminant field when
rewriting the enum variants.

I couldn't find a way to test this; I only noticed it while debugging
the DWARF reader.

2018-04-17  Tom Tromey  <tom@tromey.com>

	* dwarf2read.c (quirk_rust_enum): Conditionally drop the
	discriminant field.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]