This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Enhanced language support for Modula-2
> Cc: gdb-patches@sources.redhat.com
> From: Gaius Mulley <gaius@glam.ac.uk>
> Date: 21 Feb 2006 10:24:46 +0000
>
> here is a reworking of my patch which includes a new version of the
> set reading code in gdb/dwarf2read.c. Also contained is a patch to
> gdb/doc/gdb.texinfo reflecting the enhancements to the Modula-2 mode.
Thanks. My comments are below.
> + error (_("type not handled in m2_type_print_varspec_prefix()"));
Please don't append "()" to indicate that you are talking about a
function; just name the function. "foo()" looks like a call to `foo'
with no arguments, which is not what you want to say.
> + error (_("type not handled in m2_type_print_varspec_suffix()"));
Same here.
Btw, isn't it better to tell what type was not handled?
> + fprintf_filtered(stream, "SET OF %s", _("<unknown>"));
It is better to include "SET OF" in the string to be translated:
fprintf_filtered(stream, "%s", _("SET OF <unknown>"));
This way, the translator will see the whole phrase, and will be able
to translate "unknown" to a correct grammatical form (e.g., wrt
gender). If you think "SET OF" should not be left verbatim, you can
put an i18n comment there:
/* i18n: Do not translate the "SET OF" part! */
These specially formatted comments will be extracted to the message
catalog, so the translators will see them right next to the string
they need to translate.
> + fprintf_filtered (stream, "CASE %s OF\n", _("<variant>"));
Same here.
> + fprintf_filtered (stream, "struct %s", _("<unknown>"));
And here.
> + fprintf_filtered (stream, "<%s %d>",
> + _("invalid type code"), TYPE_CODE (type));
And here.
> --- latest-cvs-gdb/src-cvs/gdb/doc/gdb.texinfo 2006-02-10 03:54:33.000000000 +0000
> +++ latest-cvs-gdb/src-m2/gdb/doc/gdb.texinfo 2006-02-21 10:10:41.000000000 +0000
The documentation patch is approved, but please take care of the
following minor issues:
> +@cindex Modula-2 types
> +@node M2 Types
The @cindex entry should come _after_ the @node, not before it.
> +@subsubsection Types
"Types" is too general a name here: this is just about Module-2 types;
there are quite a few other languages supported by GDB that have
types. So I suggest to rename to "Modula-2 Types".
> +Values of these types may also be printed. So for example, if the
^^
Two spaces after each period that ends a sentence, please.
> +@example
> +VAR
> + s: SET OF CHAR ;
> + r: [20..40] ;
> +@end example
> +
> +@value{GDBN} could be requested to interrogate the type and value of
This last line is a continuation of the sentence from before the
@example, so please put @noindent before this line, to prevent its
indentation as if it were a new paragraph.
> +@example
> +VAR
> + s: SET ['A'..'Z'] ;
> +@end example
> +
> +the user can query the type of @code{s} via:
Same here (and elsewhere, there are a few more like this).
> +It is advisable to use the following compile flags on the @code{gm2}
> +command line @code{-g -gdwarf-2}.
First, if there's only one command-line option you want to advise, why
use plural ``flags''? And second, command-line options should be in
@option, not in @code.
> +(gdb) print s
Please use (@value{GDBP}) instead of a literal (gdb) (it's for the
same reason we use @value{GDBN} instead of a literal GDB.
I also agree with Jim's comments.