From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118925 invoked by alias); 24 Jan 2017 03:36:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 118751 invoked by uid 89); 24 Jan 2017 03:36:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*RU:74.125.83.66, Hx-spam-relays-external:74.125.83.66, H*MI:sk:b17de54, H*i:sk:b17de54 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pg0-f66.google.com Received: from mail-pg0-f66.google.com (HELO mail-pg0-f66.google.com) (74.125.83.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Jan 2017 03:36:32 +0000 Received: by mail-pg0-f66.google.com with SMTP id 204so15358712pge.2; Mon, 23 Jan 2017 19:36:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fxtZzsZS1xUTFJRVYHxlKvQO9gpm91UVZKub5F0A5Y0=; b=dXFuhVEk7pqIyuOHP/p0gAIbN0XTLjvxrgPRShFjDRRdcSUwPs50lSjb9W3X3xlUOo FPNm8XNs58/k2m/kWJErCFX45AiMk495U/GNmmEIUwHGqU6yssijnvfn8eixkzkFyBv3 6Y0N8PZ81Pqo0qhpny7PGdgaU39royncC+eEX4XZWRByO693YVKF0erEISmPpBPz25Sx U86JUVsz2dkIkLIyfvbjxeELx/VmZ6mCgAmDMKVhBWABD6iJl12mFf7HNK8MJ9xGSB6q sjLhbfgkcqTroF3SyibSGexRqyFHHH2Uap4WPu7UT9aXVulCmBfqt7b4QaF0IkyNCQjM b47w== X-Gm-Message-State: AIkVDXK03J0YnAclY29HQKQOdxAZc2Muup+k4oBp8psBs612+Iwd463EHAH8F5hRoIXJ0A== X-Received: by 10.98.33.131 with SMTP id o3mr35643600pfj.86.1485228990853; Mon, 23 Jan 2017 19:36:30 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-160-71-80.tyqh2.lon.bigpond.net.au. [58.160.71.80]) by smtp.gmail.com with ESMTPSA id e129sm21617160pfe.8.2017.01.23.19.36.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 19:36:30 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 17BB4C007E; Tue, 24 Jan 2017 14:06:26 +1030 (ACDT) Date: Tue, 24 Jan 2017 03:36:00 -0000 From: Alan Modra To: Peter Bergner Cc: Pedro Alves , Eli Zaretskii , nickc@redhat.com, gdb-patches@sourceware.org, uweigand@de.ibm.com, binutils@sourceware.org Subject: Re: [PATCH 1/2] Add support for setting disassembler-options in GDB for POWER, ARM and S390 Message-ID: <20170124033625.GI28669@bubble.grove.modra.org> References: <83eg28dcjk.fsf@gnu.org> <019eaf5d-9ace-539e-8501-feb3cb0eed6c@vnet.ibm.com> <20170124015651.GH28669@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2017-01/txt/msg00486.txt.bz2 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