This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

variable displayed twice when using GDB/MI


Hello,

I'm using a simple C program:

void main() {
        int i=0;
}

When debugging with MI interpreter, I want to display variable i:

(gdb)
-break-insert main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000000040049b",func="main",file="foo.c",fullname="/tmp/foo.c",line="2",thread-groups=["i1"],times="0",original-location="main"}
(gdb)
-exec-run
[...]
display i
&"display i\n"
~"1: i = 0"
~"\n"
^done
(gdb)

If I do a 'next':

(gdb)
n
&"n\n"
^running
*running,thread-id="all"
(gdb)
~"1: i = 0"
~"\n"
~"3\t}\n"
~"1: i = 0"
~"\n"
[...]
(gdb)

The variable i is displayed twice, is it expected ? Using CLI interpreter it's displayed only once so I'm wondering if this is expected or not ?

Regards.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]