jchsonez
jchsonez

Reputation: 11

gdb in tui mode doesn't display properly at some case

I use gdb with 'layout src' command and it is very useful. by the way, I met one issue like below.

Here is my sample code

#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

Answers (1)

Andrew
Andrew

Reputation: 4771

It is not the display, it is the printf in your test program. You are seeing this known gdb bug.

Upvotes: 3

Related Questions