答复: How to use compile & execute function in GDB

Jan Kratochvil jan.kratochvil@redhat.com
Thu Apr 16 11:34:00 GMT 2015


On Thu, 16 Apr 2015 05:35:04 +0200, 高国胜 wrote:
> Ok,it works now. 

Great.


> Can the compile & execute function be used for cross debugging in embed
> system?

You do not say the target triple.  It requires gdbarch_infcall_mmap() which is
currently implemented only by linux-tdep.c, by looking up the "mmap64" symbol.
If you do not have it you should get
	This target does not support inferior memory allocation by mmap.
or
	evaluation of this expression requires the program to have a function "mmap64".

Either your target uses linux-tdep.c and it is enough to provide suitable
"mmap64" function in your target inferior or you need to implement appropriate
gdbarch_infcall_mmap() in your tdep GDB file.


Jan



More information about the Gdb mailing list