Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: GDB List <gdb@sourceware.org>
Subject: Re: GDB printf command
Date: Tue, 17 Oct 2006 13:24:00 -0000	[thread overview]
Message-ID: <20061017132426.GA28323@nevyn.them.org> (raw)
In-Reply-To: <4534C695.2050206@st.com>

On Tue, Oct 17, 2006 at 01:03:33PM +0100, Andrew STUBBS wrote:
> Hi,
> 
> The %ll issue, recently discussed on the patches list, was originally 
> reported to me against GDB 6.4.
> 
> While testing my fix to GDB 6.5 I have discovered that the new version 
> is even more broken than the old one (at least in some respects, no 
> doubt whatever it set out to fix was achieved).

Correct.  It was deliberately made stricter, because the older version
could crash or internal error in more ways.

> Specifically '%lf' is not permitted. This used to work and is permitted 
> by both C90 and C99.

I don't remember what reference I used, but in C99 I see that this is
deliberately ignored and the same as %f.  Seems dumb to me, but there
you go.

> Can anybody tell me why this is the case - it seems deliberate - and 
> what is the intended range of capabilities of this command?
> 
> It would appear to me to be most useful if it can operate on any type 
> the GDB expression parser is capable of handling, regardless of host system.

It seems to me, as I wrote earlier, that the right thing to do would be
to change it to work on target types rather than host types.  It also
seems to me that the right way to do this would be to reuse the printf
format string parser from gnulib.  We will have to map target types on
to host types to get that to work, which will be a little hokey, but it
should be doable for all interesting cases.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-10-17 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17 12:03 Andrew STUBBS
2006-10-17 13:24 ` Daniel Jacobowitz [this message]
2006-10-17 14:10   ` Andrew STUBBS
2006-10-17 14:25     ` Daniel Jacobowitz
2006-10-17 14:43       ` Andrew STUBBS
2006-10-17 14:54         ` Daniel Jacobowitz
2006-10-18 11:24           ` Andrew STUBBS
2006-10-18 13:53             ` Daniel Jacobowitz
2006-10-31 11:43             ` Andrew STUBBS
2006-10-31 13:42               ` Daniel Jacobowitz

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=20061017132426.GA28323@nevyn.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=gdb@sourceware.org \
    /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