This is the mail archive of the gdb-prs@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]

[Bug mi/10079] New: Commands attached to a breakpoint do not execute in MI mode


It works in CLI mode, but not in MI :

1) CLI mode :

>>>>>> cat t.c
#include <stdio.h>

int main()
{
  int i = 34;

  printf ("Hello, i = %d\n", i);
}

>>>>>> cat .gdbinit
break t.c:7
commands
echo "=========== I am here ==========\n
continue
end

>>>>>> gcc --version
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)
Copyright (C) 2006 Free Software Foundation, Inc.
[ . . . . . . ]

>>>>>> gcc -g t.c -o x86.exe

>>>>>> x86-gdb x86.exe
GNU gdb (GDB) 6.8.50.20090417-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
[ . . . . . . ]
Breakpoint 1 at 0x804839c: file t.c, line 7.
(gdb) run
Starting program: /home/maxim/W/BUGS/MI_DAVE/x86.exe

Breakpoint 1, main () at t.c:7
7         printf ("Hello, i = %d\n", i);
"=========== I am here ==========
Hello, i = 34

Program exited with code 016.


2) MI mode

>>>>>> cat MI_CMD
-interpreter-exec console echo
-gdb-show prompt
-exec-run
kill
-gdb-exit

>>>>>> x86-gdb x86.exe -i=mi <MI_CMD
~"GNU gdb (GDB) 6.8.50.20090417-cvs\n"
~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
[ . . . . . . ]
(gdb)
^done
(gdb)
^done,value="(gdb) "
(gdb)
=thread-group-created,id="17693"
=thread-created,id="1",group-id="17693"
^running
*running,thread-id="all"
(gdb)
=library-loaded,id="/lib/ld-linux.so.2",target-name="/lib/ld-linux.so.2",host-name="/lib/ld-linux.so.2",symbols-loaded="0"
=library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0"
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0804839c",func="main",args=[],file="t.c",fullname="/home/maxim/W/BUGS/MI_DAVE/t.c",line="7"},thread-id="1",stopped-threads="all"
(gdb)
&"kill\n"
~"Kill the program being debugged? (y or n) [answered Y; input not from terminal]\n"
=thread-exited,id="1",group-id="17693"
=thread-group-exited,id="17693"
^done
(gdb)
^exit

-- 
           Summary: Commands attached to a breakpoint do not execute in MI
                    mode
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: maxim2405 at gmail dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10079

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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