diff options
author | Geoff Norton <grompf@sublimeintervention.com> | 2009-12-15 00:57:44 +0300 |
---|---|---|
committer | Geoff Norton <grompf@sublimeintervention.com> | 2009-12-15 00:57:44 +0300 |
commit | c2752833c4c451a9cff77175801370c359b5850e (patch) | |
tree | e20f9bc2997ebf2131f87e0e38c2d062329efa4b | |
parent | a7ad353f6984d097f139f75a4bac3f82cb604442 (diff) |
* debugger-agent.c: The end_runtime_invoke guard isn't working
on AMD64 as __builtin_frame_address (1) returns NULL. Disable the
behaviour by default, and make it runtime configurable.
svn path=/branches/mono-2-6/mono/; revision=148421
-rw-r--r-- | mono/mini/ChangeLog | 6 | ||||
-rw-r--r-- | mono/mini/debugger-agent.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 57f27b46a56..70fcaa969db 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -8,6 +8,12 @@ Fixes #561724 +2009-12-14 Geoff Norton <gnorton@novell.com> + + * debugger-agent.c: The end_runtime_invoke guard isn't working on + AMD64 as __builtin_frame_address (1) returns NULL. Disable the + behaviour by default, and make it runtime configurable. + 2009-12-13 Jonathan Chambers <joncham@gmail.com> * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index ebcf5c2dd62..534c5e06f97 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -102,6 +102,7 @@ typedef struct { GSList *onthrow; int timeout; char *launch; + gboolean embedding; } AgentConfig; typedef struct @@ -500,6 +501,8 @@ static HANDLE debugger_thread_handle; static int log_level; +static gboolean embedding; + static FILE *log_file; /* Classes whose class load event has been sent */ @@ -670,6 +673,8 @@ mono_debugger_agent_parse_options (char *options) agent_config.timeout = atoi (arg + 8); } else if (strncmp (arg, "launch=", 7) == 0) { agent_config.launch = g_strdup (arg + 7); + } else if (strncmp (arg, "embedding=", 9) == 0) { + agent_config.embedding = atoi (arg + 9) == 1; } else { print_usage (); exit (1); @@ -735,6 +740,8 @@ mono_debugger_agent_init (void) log_level = agent_config.log_level; + embedding = agent_config.embedding; + if (agent_config.log_file) { log_file = fopen (agent_config.log_file, "w+"); if (!log_file) { @@ -2789,7 +2796,7 @@ end_runtime_invoke (MonoProfiler *prof, MonoMethod *method) gpointer stackptr = __builtin_frame_address (1); #endif - if (ss_req == NULL || stackptr != ss_invoke_addr || ss_req->thread != mono_thread_internal_current ()) + if (!embedding || ss_req == NULL || stackptr != ss_invoke_addr || ss_req->thread != mono_thread_internal_current ()) return; /* |