Questions about com.sun.tools.attach implementation on windows
Thomas Stüfe
thomas.stuefe at gmail.com
Fri Oct 10 10:54:58 UTC 2014
Thanks for answering and clarifying the history!
It seems after reading up on it, that kernel32.dll has a fixed base address
and therefore is always loaded to the same base, system wide. If that is
true, at least handing over addresses to GetProcAddress() etc from injector
to target VM should always work.
On Thu, Oct 9, 2014 at 2:19 PM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> On 09/10/2014 02:17, Thomas Stüfe wrote:
>
>>
>> :
>>
>> I would love to know why we do it this way. I am sure there is a valid
>> reason for it. Maybe Backward compatibility?
>>
>> This was a very typical way for debugging utilities to work at the time.
> It was never intended of course to be used to attach to non-HotSpot VMs and
> also pre-dates a lot of the security protections and other features that
> were subsequently introduced. One thing to know is there wasn't a strict
> requirement to be able to attach to JDKs running previous releases so if a
> new underlying mechanism is introduced then it shouldn't be a major
> compatibility issue. Also as the attach API is pluggable then it would be
> possible to have both old and new providers for a time for cases where it
> was really necessary to attach to older releases.
>
> -Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20141010/2cde7367/attachment.html>
More information about the serviceability-dev
mailing list