From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28167 invoked by alias); 15 Oct 2010 23:12:23 -0000 Received: (qmail 28159 invoked by uid 22791); 15 Oct 2010 23:12:23 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Oct 2010 23:12:18 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o9FNCEju073166 for ; Sat, 16 Oct 2010 01:12:15 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms7.u-strasbg.fr [IPv6:2001:660:2402:d::16]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o9FNCEL7083151 for ; Sat, 16 Oct 2010 01:12:14 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o9FNCD84069441 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sat, 16 Oct 2010 01:12:14 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [PATCH]p-typeprint.c Fix printing of type of method arguments Date: Fri, 15 Oct 2010 23:12:00 -0000 Message-ID: <001001cb6cbe$68d09fc0$3a71df40$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2010-10/txt/msg00257.txt.bz2 The printing of the type of the arguments of methods was sometimes messed up... It appeared that a local variable LEN was not correctly reset for the next argument. I committed the patch below that fixes this problem. Pierre Muller Pascal language support maintainer for GDB gdb/ChangeLog entry: 2010-10-16 Pierre Muller * p-typeprint.c (pascal_type_print_method_args): Fix problem in display of type of method arguments. Index: p-typeprint.c =================================================================== RCS file: /cvs/src/src/gdb/p-typeprint.c,v retrieving revision 1.34 diff -u -p -r1.34 p-typeprint.c --- p-typeprint.c 21 Jun 2010 18:01:51 -0000 1.34 +++ p-typeprint.c 15 Oct 2010 23:04:43 -0000 @@ -165,14 +165,15 @@ pascal_type_print_method_args (char *phy if (physname && (*physname != 0)) { - int i = 0; - int len = 0; - char storec; - char *argname; fputs_filtered (" (", stream); /* we must demangle this */ while (isdigit (physname[0])) { + int len = 0; + int i; + char storec; + char *argname; + while (isdigit (physname[len])) { len++;