[RFA 2/2] Support ptype/o in Rust
Simon Marchi
simon.marchi@polymtl.ca
Tue Jun 26 19:08:00 GMT 2018
On 2018-06-23 16:22, Tom Tromey wrote:
> @@ -674,16 +683,41 @@ rust_print_struct_def (struct type *type, const
> char *varstring,
>
> if (TYPE_NFIELDS (type) == 0 && !is_tuple)
> return;
> - if (for_rust_enum)
> + if (for_rust_enum && !flags->print_offsets)
> fputs_filtered (is_tuple_struct ? "(" : "{", stream);
> else
> fputs_filtered (is_tuple_struct ? " (\n" : " {\n", stream);
>
> + // When printing offsets, we rearrange the fields into storage
> + // order. This lets us show holes more clearly. We work using
> + // field indices here because it simplifies calls to
> + // print_offset_data::update below.
Use /**/ comments.
Otherwise, both patches LGTM.
Simon
More information about the Gdb-patches
mailing list