From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: Re: printfs output in wrong order in MI
Date: Thu, 13 Apr 2006 08:02:00 -0000 [thread overview]
Message-ID: <e1kt1v$ssc$1@sea.gmane.org> (raw)
In-Reply-To: <e1j893$lse$1@sea.gmane.org>
Vladimir Prus wrote:
>
> Hi,
> I'm seing strange behaviour of the "printf" command if used in MI:
>
> (gdb)
> print &i
> &"print &i\n"
> ~"$1 = (int *) 0xbfc5f484\n"
> ^done
> (gdb)
> printf "%x", &i
> &"printf \"%x\", &i\n"
> ^done
> (gdb)
> ~"bfc5f484"
> -interpreter-exec console "printf \"%x\", &i"
> ^done
> (gdb)
> ~"bfc5f484"
>
> The output of 'print' appears before "^done", but the output of "printf"
> appears *after* both "^done", and the prompt, which makes it impossible to
> reliably catch the output.
....
> Any ideas why "printf" is so special?
I turns out that using
printf "%x\n", &i
(that is, adding "\n"), fixes the problem. Still looks like a bug to me,
though.
- Volodya
next prev parent reply other threads:[~2006-04-13 7:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 16:54 Vladimir Prus
2006-04-13 8:02 ` Vladimir Prus [this message]
2006-04-13 8:10 ` Eli Zaretskii
2006-04-13 8:20 ` Vladimir Prus
2006-04-13 16:04 ` Eli Zaretskii
2006-04-14 13:38 ` 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='e1kt1v$ssc$1@sea.gmane.org' \
--to=ghost@cs.msu.su \
--cc=gdb@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