Author Topic: C::B debug (gdb) remove Console of my host application  (Read 7744 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5214
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: C::B debug (gdb) remove Console of my host application
« Reply #15 on: June 21, 2011, 07:21:02 am »
The log window has some refresh problems on windows, the messages are almost "realtime".
You have to scroll up-down, so the log window can be refreshed correctly...
This is an annoying behavior I have encountered for several years. :D
I have no idea how to solve this. :(
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11629
    • Travis build status
Re: C::B debug (gdb) remove Console of my host application
« Reply #16 on: June 21, 2011, 08:53:46 am »
I don't think this is correct behavior.  The "\n" in printf() should cause auto flush.
Could this be improved in the future ?
Can you quote the standard, where you've read this?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline kccheng

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: C::B debug (gdb) remove Console of my host application
« Reply #17 on: June 21, 2011, 09:46:02 am »
I don't think this is correct behavior.  The "\n" in printf() should cause auto flush.
Could this be improved in the future ?
Can you quote the standard, where you've read this?

I don't have any standard in hand and don't remember where I got this understanding.
After a quick search of my books ... I found something related to this in
W.Richard Stevens' famous book "Advanced Programming in the UNIX Env."
Ch. 5.4 Buffering

Well, I think maybe it's not printf's standard.  Be correctly, the stdout and stderr
are line buffered I/O stream.  So, the question becomes:

Since C::B Debug log console will capture stdout/stderr from debuggee ...
does C::B Debug log console should also behave like a line buffered I/O stream ?
so the debuggee can have similar expectation with/without C::B.

Regards,
KC

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11629
    • Travis build status
Re: C::B debug (gdb) remove Console of my host application
« Reply #18 on: June 21, 2011, 09:53:58 am »
Since C::B Debug log console will capture stdout/stderr from debuggee ...
does C::B Debug log console should also behave like a line buffered I/O stream ?
so the debuggee can have similar expectation with/without C::B.
The log is line buffered I think. Take a look at PipedProcess if you don't believe me.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]