public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: Ada's formats
@ 2004-08-04  9:04 Paul Hilfinger
  2004-08-04 14:41 ` Andrew Cagney
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Hilfinger @ 2004-08-04  9:04 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: brobecker, gdb


Andrew,

You wrote:
> Can "we" (I hate this abuse of the Queens English) delete the existing, 
> broken code then? With that resolved, its possible to move onto the next 
> Ada problem. 

Joel wrote:
> Could you explain which part of the code you're refering to? 

You then wrote:
> Uses of the struct language_format_info in core GDB (which 
> translates to local_.*_format macros). Rip that out and I suspect that 
> you'll find adding ada's formatting using method rather than 
> printf formats is trivial.

I've finally been able to look at this seriously, and am
afraid we're still not clear on what is "broken" that needs fixing.
AFAICS, the language_format_info approach generally works in a purely
functional sense, and back when we (briefly) used it to apply Ada's
language formats for hex and octal strings, it worked just fine for
us.  (Currently, I see that m2-lang.c and scm-lang.c use non-C-like
values for their language_format_info entries; is the mechanism working for 
them?)

So I am assuming that you are referring mainly to a bogosity in the
design aesthetics.  I am willing to do the necessary cleanup here as
community service, even though we have no need of it for the Ada
language module, but first I would like to make quite sure I have a
clear picture of what your idea of the right solution is.  Is it
simply a matter of replacing the language_format_info format strings
with functions, or did you have something else entirely in mind?

Paul

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Ada's formats
@ 2004-07-08 22:25 Andrew Cagney
  2004-07-09  1:56 ` Paul Hilfinger
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Cagney @ 2004-07-08 22:25 UTC (permalink / raw)
  To: Paul Hilfinger, Joel Brobecker; +Cc: gdb

Joel, Paul, I'm looking at this:

#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

Would replacing the printf formats with ada specific functions similar 
to paddr, paddr_nz et.al. or even a single function with multiple 
parameters solve this problem?

Andrew

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-09-03 21:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-04  9:04 Ada's formats Paul Hilfinger
2004-08-04 14:41 ` Andrew Cagney
2004-08-11 10:38   ` Paul Hilfinger
     [not found]     ` <411AA0A9.3060506@gnu.org>
     [not found]       ` <55713.204.151.174.7.1094055261.squirrel@websd.u-strasbg.fr>
2004-09-02  7:16         ` Paul Hilfinger
2004-09-03 21:30     ` Andrew Cagney
2004-09-03 21:54       ` Paul Hilfinger
  -- strict thread matches above, loose matches on Subject: below --
2004-07-08 22:25 Andrew Cagney
2004-07-09  1:56 ` Paul Hilfinger
2004-07-14 20:00   ` Andrew Cagney
2004-07-16  1:14     ` Joel Brobecker
2004-07-16  2:02       ` Andrew Cagney
2004-07-16  4:09         ` Joel Brobecker
2004-07-16 14:20           ` Andrew Cagney
2004-07-16 16:27             ` Joel Brobecker
2004-07-16 21:54               ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).