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: [PATCH 1/2] Add support for setting disassembler-options in GDB for POWER, ARM and S390


On Mon, Jan 23, 2017 at 08:39:25PM -0600, Peter Bergner wrote:
> On 1/23/17 7:56 PM, Alan Modra wrote:
> >On Mon, Jan 23, 2017 at 05:34:36PM -0600, Peter Bergner wrote:
> >> The following S/390 specific disassembler options are supported for use\n\
> >> with the -M switch (multiple options should be separated by commas):\n"));
> >>
> >>-  fprintf (stream, _("  esa         Disassemble in ESA architecture mode\n"));
> >>-  fprintf (stream, _("  zarch       Disassemble in z/Architecture mode\n"));
> >>-  fprintf (stream, _("  insnlength  Print unknown instructions according "
> >>-		     "to length from first two bits\n"));
> >>+  for (i = 0; sizeof (options) / sizeof (options[0]); i++)
> >>+    {
> >>+      unsigned int len = strlen (options[i].name);
> >>+      if (max_len < len)
> >>+	max_len = len;
> >>+    }
> >>+
> >>+  for (i = 0, max_len++; sizeof (options) / sizeof (options[0]); i++)
> >>+    fprintf (stream, "  %s%*c %s",
> >>+	     options[i].name,
> >>+	     (int)(max_len - strlen (options[i].name)), ' ',
> >>+	     options[i].description);
> >> }
> >
> >This appears to have lost translation of the help strings.
> 
> They're stored in:
> 
> diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c
> index 328ba2d..6b455aa 100644
> --- a/opcodes/s390-dis.c
> +++ b/opcodes/s390-dis.c
> [snip]
> +static const options_t options[] =
> +{
> +  { "esa" ,       "Disassemble in ESA architecture mode" },
> +  { "zarch",      "Disassemble in z/Architecture mode" },
> +  { "insnlength", "Print unknown instructions according to "
> +		  "length from first two bits" }
> +};
> 
> ...and outputted via the loops above.  Or do you mean
> language translation?

Yes, I meant the support for language translation.

-- 
Alan Modra
Australia Development Lab, IBM


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