From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: printfs output in wrong order in MI
Date: Wed, 12 Apr 2006 16:54:00 -0000 [thread overview]
Message-ID: <e1j893$lse$1@sea.gmane.org> (raw)
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.
I'm trying to use 'printf' in order to obtain addresses of all local
variables in one command, without round-trips for every local variable.
This behaviour of 'printfs' seems to prevent my trick from working.
Any ideas why "printf" is so special?
- Volodya
next reply other threads:[~2006-04-12 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 16:54 Vladimir Prus [this message]
2006-04-13 8:02 ` Vladimir Prus
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='e1j893$lse$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