From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26522 invoked by alias); 24 Jan 2017 02:39:37 -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 26497 invoked by uid 89); 24 Jan 2017 02:39:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:328ba2d, s390-dis.c, UD:s390-dis.c, s390disc X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Jan 2017 02:39:35 +0000 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v0O2d9op012176 for ; Mon, 23 Jan 2017 21:39:32 -0500 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 285r3pv90y-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 23 Jan 2017 21:39:32 -0500 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jan 2017 19:39:31 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 23 Jan 2017 19:39:27 -0700 Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 0712D3E4003E; Mon, 23 Jan 2017 19:39:26 -0700 (MST) Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v0O2dQHi42467448; Tue, 24 Jan 2017 02:39:26 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E5BD124044; Mon, 23 Jan 2017 21:39:26 -0500 (EST) Received: from otta.local (unknown [9.80.203.250]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id EF2E7124035; Mon, 23 Jan 2017 21:39:25 -0500 (EST) Subject: Re: [PATCH 1/2] Add support for setting disassembler-options in GDB for POWER, ARM and S390 To: Alan Modra References: <83eg28dcjk.fsf@gnu.org> <019eaf5d-9ace-539e-8501-feb3cb0eed6c@vnet.ibm.com> <20170124015651.GH28669@bubble.grove.modra.org> Cc: Pedro Alves , Eli Zaretskii , nickc@redhat.com, gdb-patches@sourceware.org, uweigand@de.ibm.com, binutils@sourceware.org From: Peter Bergner Date: Tue, 24 Jan 2017 02:39:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170124015651.GH28669@bubble.grove.modra.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17012402-0008-0000-0000-00000701470C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006487; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000200; SDB=6.00811798; UDB=6.00395834; IPR=6.00589216; BA=6.00005084; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014019; XFM=3.00000011; UTC=2017-01-24 02:39:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17012402-0009-0000-0000-00003F41D2B8 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-24_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701240027 X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00484.txt.bz2 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? Peter