[RFA] JVMTI Agent Loading

Kyle Galloway kgallowa@redhat.com
Tue Apr 3 13:29:00 GMT 2007


Tom Tromey wrote:
>>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:
>>>>>>             
>
> Kyle> The reason for this is that if the library is a C library, it will
> Kyle> have unmangled names, but if the library is a C++ library the names
> Kyle> will be mangled.
>
> Yeah, but the declaration of Agent_OnLoad and Agent_OnUnload is
> wrapped in 'extern "C"'... so I'd assume this case can't happen.
>   
I think your right, I could swear I've seen a mangled AgentOnLoad 
before, but I can't reproduce it so I whacked the mangled check.
> Kyle> Is it better to have sizeof("-agentlib:") - 1 to be more clear about
> Kyle> what's happening or sizeof(agentlib) because it avoids the subtraction?
>
> The first one I think.  Don't worry about the subtraction, the
> compiler will fold this to a constant.
>   
I think I have all the changes made now, but I've attached a revised 
patch here in case there are any other issues before I check this in.

- Kyle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: agentlib.patch
Type: text/x-patch
Size: 6976 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070403/7f9aa7a6/attachment.bin>


More information about the Java-patches mailing list