This is the mail archive of the gdb-patches@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]

Re: [RFA 2/2] Support ptype/o in Rust


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


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