How to use compile & execute function in GDB
Jan Kratochvil
jan.kratochvil@redhat.com
Wed Apr 15 15:48:00 GMT 2015
On Wed, 15 Apr 2015 07:45:19 +0200, é«å½è wrote:
> I have install gcc-5.0, and copy libcc1.so to current work space.
GDB apparently found libcc1.so but the gcc commmand GDB found is not gcc-5.0,
otherwise it would not complain for '-std=gnu11' etc.
GDB does not search for 'cc' or 'gcc', it uses more complicated pattern:
https://sourceware.org/gdb/current/onlinedocs/gdb/Compiling-and-Injecting-Code.html#Compiling-and-Injecting-Code
17.7.3 Compiler search for the compile command
For example on my system it found (not easy to find out, used 'strace -f -p'
for running GDB during the 'compile code' command):
/usr/lib64/ccache/x86_64-redhat-linux-gcc
I will add there some debug output + filename-enforcing commands.
Thanks for testing compile,
Jan
More information about the Gdb
mailing list