Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* printfs output in wrong order in MI
@ 2006-04-12 16:54 Vladimir Prus
  2006-04-13  8:02 ` Vladimir Prus
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Prus @ 2006-04-12 16:54 UTC (permalink / raw)
  To: gdb


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






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

end of thread, other threads:[~2006-04-14 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-12 16:54 printfs output in wrong order in MI Vladimir Prus
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox