From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9883 invoked by alias); 26 Jul 2007 07:07:42 -0000 Received: (qmail 9749 invoked by uid 22791); 26 Jul 2007 07:07:40 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 07:07:38 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id l6Q77ZUe112722 for ; Thu, 26 Jul 2007 07:07:35 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.4) with ESMTP id l6Q77Ztb2015298 for ; Thu, 26 Jul 2007 09:07:35 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l6Q77SUi030962 for ; Thu, 26 Jul 2007 09:07:28 +0200 Received: from bbkeks.boeblingen.de.ibm.com (dyn-9-152-248-39.boeblingen.de.ibm.com [9.152.248.39]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l6Q77Qn1030823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 26 Jul 2007 09:07:28 +0200 Message-ID: <46A847CE.7030907@de.ibm.com> Date: Thu, 26 Jul 2007 07:36:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.5 (X11/20070716) MIME-Version: 1.0 To: Gaius Mulley CC: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Unbounded array support implemented (for Modula-2) References: <874pjs57zg.fsf@j228-gm.comp.glam.ac.uk> In-Reply-To: <874pjs57zg.fsf@j228-gm.comp.glam.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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: 2007-07/txt/msg00282.txt.bz2 Hi Gaius, Gaius Mulley schrieb: > Hi, > > The patch below allows users debugging Modula-2 programs to print > unbounded parameter contents, ptype the parameter declaration and > perform unbounded array subscript queries. It also adds TSIZE > (pseudonym for SIZE) and implements HIGH (yields the last legal index > for an unbounded array). > > Wondering whether this is okay to commit? Feel free to suggest > improvements etc, > > regards, > Gaius > > I've run check-gdb and get the following final results: > > # of expected passes 11389 > # of unexpected failures 78 > # of unexpected successes 2 > # of expected failures 41 > # of known failures 39 > # of unresolved testcases 1 > # of untested testcases 8 > # of unsupported tests 14 > > ... build-gdb/gdb/testsuite/../../gdb/gdb version > # 6.6.50.20070724-cvs -nx > > do you build GDB on x86? These are my results: # of expected passes­···­·······11554 # of unexpected failures­·······29 # of unexpected successes­······1 # of expected failures­·­·······42 # of unknown successes­·­·······6 # of known failures­····­·······44 # of unresolved testcases­······1 # of untested testcases­­·······8 # of unsupported tests­·­·······16 /home/deuling/gdb/dev/build/gdb/testsuite/../../gdb/gdb version 6.6.50.20070725-cvs -nx Maybe you should compare test results with and without your patch to see if your patch introduces regressions. It also would be nice to have a new test case to test the new features. > @@ -203,13 +239,15 @@ > && TYPE_CODE (elttype) == TYPE_CODE_INT > && (format == 0 || format == 's') > && addr != 0) > - return val_print_string (addr, -1, TYPE_LENGTH (elttype), stream); > + return val_print_string (addr, -1, TYPE_LENGTH (elttype), > + stream); > > return 0; > } This seems to be unnecessary. The current line is < 80 chars. > @@ -235,6 +273,49 @@ > fputs_filtered ("???", stream); > } > > + > +/* > + * m2_print_array_contents - prints out the contents of an > + * array up to a max_print values. > + * It prints arrays of char as a string > + * and all other data types as comma > + * separated values. > + */ The final */ should in the same line as "separated values." with two spaces between. There are some more of that. > +static struct value * > +evaluate_subexp_modula2 (struct type *expect_type, struct expression *exp, > + int *pos, enum noside noside) > +{ > + int pc = *pos; > + int i; > + char *name; > + enum exp_opcode op = exp->elts[*pos].opcode; > + struct value *arg1; > + struct value *arg2; > + struct type *type; > + switch (op) I think "int i", "char *name" and "int pc" are unneeded in this function? There should be an empty line after variable declaration to seperate it from the code. Regards, -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com