This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 4/4] compile: New 'compile print'
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: pmuldoon at redhat dot com, gdb-patches at sourceware dot org
- Date: Fri, 27 Mar 2015 11:11:17 +0100
- Subject: Re: [PATCH 4/4] compile: New 'compile print'
- Authentication-results: sourceware.org; auth=none
- References: <20150326205727 dot 28223 dot 54648 dot stgit at host1 dot jankratochvil dot net> <20150326205752 dot 28223 dot 24230 dot stgit at host1 dot jankratochvil dot net> <83iodmnc18 dot fsf at gnu dot org> <20150327073333 dot GA28529 at host1 dot jankratochvil dot net> <83d23unazo dot fsf at gnu dot org> <55150D18 dot 6020308 at redhat dot com> <838uein6un dot fsf at gnu dot org> <20150327091617 dot GA1488 at host1 dot jankratochvil dot net> <834mp6bw71 dot fsf at gnu dot org>
On Fri, 27 Mar 2015 10:56:18 +0100, Eli Zaretskii wrote:
> Are you sure the last part (calling functions in the inferior) will
Yes, as 'compile print' is almost the same as 'compile code' and for 'compile
code' it is already a part of the gdb.compile/ GDB testsuite.
> on all platforms? Won't it need some kind of import library on Windows?
I really have no idea(+interest+duties). Have you tried it?
> How does the GCC plugin know to resolve the address of the inferior's
> functions correctly?
compile_object_load() contains relocator for mst_text references.
Additionally convert_one_symbol()/convert_symbol_bmsym()/etc. provide symbol
addresses during compilation of the module. Some symbol types are resolved
that way, other symbols types the other way, it is partially interchangeable.