public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 2/2] Support ptype/o in Rust
Date: Tue, 26 Jun 2018 19:08:00 -0000	[thread overview]
Message-ID: <264bed6a37ca5474bfb51565789905bf@polymtl.ca> (raw)
In-Reply-To: <20180623202227.17259-3-tom@tromey.com>

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

  reply	other threads:[~2018-06-26 19:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-23 20:22 [RFA 0/2] " Tom Tromey
2018-06-23 20:22 ` [RFA 1/2] Move ptype/o printing code to typeprint.c Tom Tromey
2018-06-23 23:51   ` Sergio Durigan Junior
2018-06-26 20:54     ` Tom Tromey
2018-06-23 20:22 ` [RFA 2/2] Support ptype/o in Rust Tom Tromey
2018-06-26 19:08   ` Simon Marchi [this message]
2018-06-26 20:55     ` Tom Tromey
2018-06-23 23:44 ` [RFA 0/2] " Sergio Durigan Junior
2018-06-27  2:59   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=264bed6a37ca5474bfb51565789905bf@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).