diff options
author | Omair Majid <[email protected]> | 2011-03-07 11:24:34 -0500 |
---|---|---|
committer | Omair Majid <[email protected]> | 2011-03-07 11:24:34 -0500 |
commit | ee39d7bc6f44502bd7b833da8189cdca9c1c7c70 (patch) | |
tree | db7a9be0fcd5ce646f886ce019b874d5cb31c9a4 /plugin/icedteanp | |
parent | 6ee70462f3655208b658ab057e05c0f42d2b0afb (diff) |
Make ICEDTEAPLUGIN_DEBUG=suspend start the JVM in suspend mode
2011-03-07 Omair Majid <[email protected]>
* plugin/icedteanp/IcedTeaNPPlugin.cc: Add plugin_debug_suspend.
(plugin_start_appletviewer): If plugin_debug_suspend is true, start jvm in
suspend mode.
Diffstat (limited to 'plugin/icedteanp')
-rw-r--r-- | plugin/icedteanp/IcedTeaNPPlugin.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc index 49feb6b..63ca267 100644 --- a/plugin/icedteanp/IcedTeaNPPlugin.cc +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc @@ -238,6 +238,8 @@ static GPid appletviewer_pid = -1; 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 @@ plugin_start_appletviewer (ITNPPluginData* data) 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); |