How to use compile & execute function in GDB

高国胜 guosheng_gao@realsil.com.cn
Wed Apr 15 05:45:00 GMT 2015


I have install gcc-5.0, and copy libcc1.so to current work space.
When I try the compile & execute function in gdb, The following error occurred:

(gdb) b main
Breakpoint 1 at 0x80483dd: file test.c, line 5.
(gdb) r
Starting program: /home/guosheng_gao/gdb-7.9/obj/test

Breakpoint 1, main () at test.c:5
5         a = 1;
(gdb) compile code int z=5;c=z;
cc1: error: unrecognized command line option "-std=gnu11"
cc1: error: unrecognized command line option "-fplugin=libcc1plugin"
cc1: error: unrecognized command line option "-fplugin-arg-libcc1plugin-fd=6"
Compilation failed.
(gdb)

Any advices will be wonderful!


More information about the Gdb mailing list