Request for review (S): 7022037: Pause when exiting if a debugger is attached on windows

Dmitry Samersoff Dmitry.Samersoff at oracle.com
Thu Feb 24 06:40:49 PST 2011


Staffan,

Does the method IsDebuggerPresent() distinguish between Visual Studio, 
windbg, cdbg, adplus and so one?

Can we automatically turn this future off when debugging remote JVM or 
windows service?

Can we detect JVM launched by custom launcher (not a java.exe) and turn 
this future off in this case (custom launcher could have no console)?

-Dmitry



On 2011-02-24 17:27, Staffan Larsen wrote:
>> -----Original Message-----
>> From: Dmitry Samersoff
>> Sent: den 24 februari 2011 3:16
>> To: Staffan Larsen
>> Cc: hotspot-runtime-dev at openjdk.java.net
>> Subject: Re: Request for review (S): 7022037: Pause when exiting if a
>> debugger is attached on windows
>>
>> Staffan,
>>
>> 1. Is it possible to put this functionality under command line flag?
>>
>> We have PauseAtStartup and I think it's better to have similar
>> PauseAtShutdown than autodetect debugger.
>
> I would prefer not to since the beauty is to have the auto-detection do "the right thing". This is functionality you want to use every time you run from Visual Studio. Requiring a separate command line flag kind of defeats the purpose. We could add a flag to turn it off, though.
>
>> 2. It's better to create separate function for it.
>
> Good point. Should I have a separate function in src/share/vm/runtime/java.cpp, or should I have separate functions in the os classes (to remove the current #ifdef).
>
> /Staffan


-- 
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...


More information about the hotspot-runtime-dev mailing list