[MI] -exec-return or CLI 'return' do not trigger MI events

Marc Khouzam marc.khouzam@ericsson.com
Thu Feb 11 19:50:00 GMT 2010


Hi,

I just noticed that GDB 7.0.1 does not issue MI events 
*running and *stopped for the CLI 'return' command.
This is the relevant output, while the whole (small)
session is after.

(gdb) -exec-return
^done,frame={level="0",addr="0x08048412",func="foo",args=[],file="a.cc",fullname="/local/lmckhou/testing/a.cc",line="6"}
(gdb) return
&"return\n"
~"#0  main () at a.cc:9\n"
~"9\t    return 0;\n"
^done

Do you want me to write a bug?

Thanks

Marc

~"GNU gdb (GDB) 7.0.1\n"
~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\".\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>...\n"
~"Reading symbols from /local/lmckhou/testing/a.out..."
~"done.\n"
(gdb) 
l
&"l\n"
~"1\tvoid foo1() {\n"
~"2\t    return;\n"
~"3\t}\n"
~"4\tvoid foo() {\n"
~"5\t    foo1();\n"
~"6\t}\n"
~"7\tint main() {\n"
~"8\t    foo();\n"
~"9\t    return 0;\n"
~"10\t}\n"
^done
(gdb) 
start
&"start\n"
~"Temporary breakpoint 1 at 0x8048422: file a.cc, line 8.\n"
~"Starting program: /local/lmckhou/testing/a.out \n"
=thread-group-created,id="2173"
=thread-created,id="1",group-id="2173"
^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="/usr/lib/libstdc++.so.6",target-name="/usr/lib/libstdc++.so.6",host-name="/usr/lib/libstdc++.so.6",symbols-loaded="0"
=library-loaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-name="/lib/libm.so.6",symbols-loaded="0"
=library-loaded,id="/lib/libgcc_s.so.1",target-name="/lib/libgcc_s.so.1",host-name="/lib/libgcc_s.so.1",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"
~"\n"
~"Temporary breakpoint 1, main () at a.cc:8\n"
~"8\t    foo();\n"
*stopped,frame={addr="0x08048422",func="main",args=[],file="a.cc",fullname="/local/lmckhou/testing/a.cc",line="8"},thread-id="1",stopped-threads="all"
(gdb) 
s
&"s\n"
^running
*running,thread-id="all"
(gdb) 
~"foo () at a.cc:5\n"
~"5\t    foo1();\n"
*stopped,frame={addr="0x0804840d",func="foo",args=[],file="a.cc",fullname="/local/lmckhou/testing/a.cc",line="5"},thread-id="1",stopped-threads="all"
(gdb) 
s
&"s\n"
^running
*running,thread-id="all"
(gdb) 
~"foo1 () at a.cc:3\n"
~"3\t}\n"
*stopped,frame={addr="0x08048407",func="foo1",args=[],file="a.cc",fullname="/local/lmckhou/testing/a.cc",line="3"},thread-id="1",stopped-threads="all"
(gdb) 
-exec-return
^done,frame={level="0",addr="0x08048412",func="foo",args=[],file="a.cc",fullname="/local/lmckhou/testing/a.cc",line="6"}
(gdb) 
return
&"return\n"
~"#0  main () at a.cc:9\n"
~"9\t    return 0;\n"
^done
(gdb) 



More information about the Gdb mailing list