From patchwork Tue May 8 12:15:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 27150 Received: (qmail 63042 invoked by alias); 8 May 2018 12:18:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 60467 invoked by uid 89); 8 May 2018 12:16:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=HContent-Transfer-Encoding:8bit 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, 08 May 2018 12:15:52 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w48C43Dc103786 for ; Tue, 8 May 2018 08:15:51 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hu8kh1hhu-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 May 2018 08:15:50 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 May 2018 13:15:49 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 8 May 2018 13:15:47 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w48CFlUC65601650 for ; Tue, 8 May 2018 12:15:47 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3492452045 for ; Tue, 8 May 2018 12:06:07 +0100 (BST) Received: from oc3748833570.ibm.com (unknown [9.152.213.77]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 213E852047 for ; Tue, 8 May 2018 12:06:07 +0100 (BST) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 2E8D9D804F5; Tue, 8 May 2018 14:15:47 +0200 (CEST) Subject: [pushed] [spu] Fix "info spu event" output formatting To: gdb-patches@sourceware.org Date: Tue, 8 May 2018 14:15:47 +0200 (CEST) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18050812-0040-0000-0000-000004375EA6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050812-0041-0000-0000-0000263B992A Message-Id: <20180508121547.2E8D9D804F5@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-08_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805080118 Hello, the formatting of the output of the "info spu event" command changed, causing spurious test suite failures. Use phex instead of phex_nz to get back the expected format, and fix emission of new line characters. Tested on spu-elf, pushed to mainline. Bye, Ulrich gdb/ChangeLog: 2018-05-08 Ulrich Weigand * spu-tdep.c (info_spu_event_command): Fix output formatting. diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 4a68de0..2567c24 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -2097,9 +2097,11 @@ info_spu_event_command (const char *args, int from_tty) ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoEvent"); current_uiout->text (_("Event Status ")); - current_uiout->field_fmt ("event_status", "0x%s", phex_nz (event_status, 4)); - current_uiout->text (_("\nEvent Mask ")); - current_uiout->field_fmt ("event_mask", "0x%s", phex_nz (event_mask, 4)); + current_uiout->field_fmt ("event_status", "0x%s", phex (event_status, 4)); + current_uiout->text ("\n"); + current_uiout->text (_("Event Mask ")); + current_uiout->field_fmt ("event_mask", "0x%s", phex (event_mask, 4)); + current_uiout->text ("\n"); } static void