Reputation: 11
I use gdb with 'layout src' command and it is very useful. by the way, I met one issue like below.
#include <stdio.h>
int main(int argc, char **argv) {
int i;
for(i = 0; i < 20; i++){
printf("Hello world!\n");
}
}
And after run gdb, I run 'display' command to check i variable and run 'n' command several times. In this case, if the command prompt is at the end of CMD window, the SRC window is displayed improperly. If I run 'refresh' command, it shows properly but I need to run 'refresh' command everytime.
I have attached the captured image file. And I marked my point as red color square. gdb_screenshot
If somebody know this kind of issue, please help me to fix my issue.
Thanks.
Upvotes: 0
Views: 1651
Reputation: 4771
It is not the display
, it is the printf
in your test program. You are seeing this known gdb bug.
Upvotes: 3