This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 4/4] compile: New 'compile print'
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 27 Mar 2015 10:20:29 +0000
- 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 27/03/15 09:56, Eli Zaretskii wrote:
>> Date: Fri, 27 Mar 2015 10:16:17 +0100
>> From: Jan Kratochvil <email@example.com>
>> Cc: Phil Muldoon <firstname.lastname@example.org>, email@example.com
>>> Can it include calls to standard functions? Can it call functions from
>>> libraries other than libc? What about functions defined by the inferior?
q>> yes, yes (as long as the library is already DT_NEEDEDed or dlopen()ed by the
>> inferior), yes.
> Are you sure the last part (calling functions in the inferior) will
> work on all platforms? How does the GCC plugin know to resolve the
> address of the inferior's functions correctly? Won't it need some
> kind of import library on Windows?
Via the address translation oracle. This is no different from the
compile code/file mechanism that was reviewed and committed some
months ago. Does it work on all platforms? I can't answer that as I do
not have access to all platforms. Few people, I suspect, do. But this
is pretty much true of every patch submitted in GDB. But if it doesn't
work then the error handling mechanisms of GDB and GCC plugin should
handle it. Just like any other platform dependent bugs. As always if
people on those platforms file bugs, we will always gladly help fix
On the issue of compile print and preconceived notions by users
regarding the utility of the function, then it is a documentation
issue. Your assertion of what the user "might think" can easily be
remedied by documentation fixes to the help command and/or the
manual. This will help correct any previous notions, and guide them to
what they should think of the command.
Other than the edits you have suggested (thank you for those!) do you
have any additional documentation edits that might help to address the
preconceived notions the user might have?