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]

Re: How to use compile & execute function in GDB


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


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