Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: Gaius Mulley <gaius@glam.ac.uk>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Unbounded array support implemented (for Modula-2)
Date: Thu, 26 Jul 2007 07:36:00 -0000	[thread overview]
Message-ID: <46A847CE.7030907@de.ibm.com> (raw)
In-Reply-To: <874pjs57zg.fsf@j228-gm.comp.glam.ac.uk>

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


  reply	other threads:[~2007-07-26  7:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  7:07 Gaius Mulley
2007-07-26  7:36 ` Markus Deuling [this message]
2007-07-27 12:26   ` Gaius Mulley
2007-07-27 20:22     ` Eli Zaretskii
2007-07-30  8:29       ` Gaius Mulley
2007-07-30 23:34         ` Jim Blandy
2007-07-31  3:01         ` Jim Blandy
2007-07-31 16:47           ` Gaius Mulley
2007-07-31 16:48             ` Jim Blandy
2007-08-01 14:01               ` Gaius Mulley
2007-07-31 19:18             ` Jim Blandy
2007-10-16 16:59               ` Gaius Mulley
2007-10-16 22:04                 ` Jim Blandy
2007-07-26 22:58 ` Pierre Muller
2007-07-27 13:17   ` Gaius Mulley
2007-07-27 13:28     ` Pierre Muller
2007-07-28  0:59   ` Jim Blandy
2007-07-30  6:29     ` Gaius Mulley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A847CE.7030907@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=gaius@glam.ac.uk \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox