Mercurial > hg > release > icedtea-web-1.1
changeset 153:167e9e2b3a20
Make ICEDTEAPLUGIN_DEBUG=suspend start the JVM in suspend mode
2011-03-07 Omair Majid <omajid@redhat.com>
* plugin/icedteanp/IcedTeaNPPlugin.cc: Add plugin_debug_suspend.
(plugin_start_appletviewer): If plugin_debug_suspend is true, start jvm in
suspend mode.
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Mon, 07 Mar 2011 11:24:34 -0500 |
parents | 8e0b13ec3309 |
children | 2446ec028f75 |
files | ChangeLog plugin/icedteanp/IcedTeaNPPlugin.cc |
diffstat | 2 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Mar 07 11:10:42 2011 -0500 +++ b/ChangeLog Mon Mar 07 11:24:34 2011 -0500 @@ -1,3 +1,9 @@ +2011-03-07 Omair Majid <omajid@redhat.com> + + * plugin/icedteanp/IcedTeaNPPlugin.cc: Add plugin_debug_suspend. + (plugin_start_appletviewer): If plugin_debug_suspend is true, start jvm in + suspend mode. + 2011-03-07 Omair Majid <omajid@redhat.com> * NEWS: Update.
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Mon Mar 07 11:10:42 2011 -0500 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Mon Mar 07 11:24:34 2011 -0500 @@ -238,6 +238,8 @@ static guint appletviewer_watch_id = -1; int plugin_debug = getenv ("ICEDTEAPLUGIN_DEBUG") != NULL; +int plugin_debug_suspend = (getenv("ICEDTEAPLUGIN_DEBUG") != NULL) && + (strcmp(getenv("ICEDTEAPLUGIN_DEBUG"), "suspend") == 0); pthread_cond_t cond_message_available = PTHREAD_COND_INITIALIZER; @@ -1546,7 +1548,13 @@ command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); command_line[2] = g_strdup("-Xdebug"); command_line[3] = g_strdup("-Xnoagent"); - command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); + if (plugin_debug_suspend) + { + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"); + } else + { + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); + } command_line[5] = g_strdup("sun.applet.PluginMain"); command_line[6] = g_strdup(out_pipe_name); command_line[7] = g_strdup(in_pipe_name);