This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Ada's formats
- From: Paul Hilfinger <hilfingr at EECS dot Berkeley dot EDU>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: Joel Brobecker <brobecker at gnat dot com>, gdb at sources dot redhat dot com
- Date: Thu, 08 Jul 2004 18:56:40 -0700
- Subject: Re: Ada's formats
Andrew,
> #if 0
> {"8#%lo#", "8#", "o", "#"}, /* Octal format info */
> {"%ld", "", "d", ""}, /* Decimal format info */
> {"16#%lx#", "16#", "x", "#"}, /* Hex format info */
> #else
> /* Copied from c-lang.c. */
> {"0%lo", "0", "o", ""}, /* Octal format info */
> {"%ld", "", "d", ""}, /* Decimal format info */
> {"0x%lx", "0x", "x", ""}, /* Hex format info */
> #endif
The problem reflected by the conditionalization here was aesthetic
internal disagreement as to whether we wanted Ada's literal format for
hex numbers (e.g., 16#deadbeef#) or C's. GDB sometimes refers to the
language vector and sometimes does not, so that if our purpose was to
be kind to the hypothetical GNAT user (i.e., one who believes that "C"
is just the third letter of the alphabet), we would not only fail, but
perhaps sow further confusion. The two options remain in the source
code, however, to indicate the embarrassing fact that we are not of
one mind on the issue.
If on the other hand you are asking whether I think that (in general),
it would improve the abstraction to "functionalize" this part of the
language vector, my answer is a firm ... could be.
Paul