Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/build/tests.make2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs3
-rw-r--r--mono/mini/debugger-agent.c11
-rw-r--r--mono/mini/interp/interp.c1
-rw-r--r--mono/mini/mini-exceptions.c2
5 files changed, 16 insertions, 3 deletions
diff --git a/mcs/build/tests.make b/mcs/build/tests.make
index 2b1c183417b..b648ee442c8 100644
--- a/mcs/build/tests.make
+++ b/mcs/build/tests.make
@@ -212,7 +212,7 @@ endif
## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig
ok=:; \
- PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
+ PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="$(TEST_RUNTIME_FLAGS)" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='$(notdir $(strip $(test_assemblies))).crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
$$ok
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index da0d8dc3d1a..de430ae354a 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -45,6 +45,7 @@ public class DebuggerTests
public static bool listening = Environment.GetEnvironmentVariable ("DBG_SUSPEND") != null;
#endif
public static string runtime = Environment.GetEnvironmentVariable ("DBG_RUNTIME");
+ public static string runtime_args = Environment.GetEnvironmentVariable ("DBG_RUNTIME_ARGS");
public static string agent_args = Environment.GetEnvironmentVariable ("DBG_AGENT_ARGS");
// Not currently used, but can be useful when debugging individual tests.
@@ -84,6 +85,8 @@ public class DebuggerTests
if (string.IsNullOrEmpty (pi.FileName))
pi.FileName = "mono";
pi.Arguments = String.Join (" ", args);
+ if (runtime_args != null)
+ pi.Arguments = runtime_args + " " + pi.Arguments;
return pi;
}
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
index dbb2d8961dc..2c00b176b05 100644
--- a/mono/mini/debugger-agent.c
+++ b/mono/mini/debugger-agent.c
@@ -3001,6 +3001,7 @@ no_seq_points_found (MonoMethod *method, int offset)
typedef struct {
DebuggerTlsData *tls;
GSList *frames;
+ gboolean set_debugger_flag;
} ComputeFramesUserData;
static gboolean
@@ -3013,11 +3014,13 @@ process_frame (StackFrameInfo *info, MonoContext *ctx, gpointer user_data)
int flags = 0;
mono_loader_lock ();
- if (info->type != FRAME_TYPE_MANAGED && info->type != FRAME_TYPE_INTERP) {
+ if (info->type != FRAME_TYPE_MANAGED && info->type != FRAME_TYPE_INTERP && info->type != FRAME_TYPE_MANAGED_TO_NATIVE) {
if (info->type == FRAME_TYPE_DEBUGGER_INVOKE) {
/* Mark the last frame as an invoke frame */
if (ud->frames)
((StackFrame*)g_slist_last (ud->frames)->data)->flags |= FRAME_FLAG_DEBUGGER_INVOKE;
+ else
+ ud->set_debugger_flag = TRUE;
}
mono_loader_unlock ();
return FALSE;
@@ -3067,6 +3070,12 @@ process_frame (StackFrameInfo *info, MonoContext *ctx, gpointer user_data)
flags |= FRAME_FLAG_NATIVE_TRANSITION;
}
+ if (ud->set_debugger_flag) {
+ g_assert (g_slist_length (ud->frames) == 0);
+ flags |= FRAME_FLAG_DEBUGGER_INVOKE;
+ ud->set_debugger_flag = FALSE;
+ }
+
frame = g_new0 (StackFrame, 1);
frame->method = method;
frame->actual_method = actual_method;
diff --git a/mono/mini/interp/interp.c b/mono/mini/interp/interp.c
index 0599068fa0f..08757906c32 100644
--- a/mono/mini/interp/interp.c
+++ b/mono/mini/interp/interp.c
@@ -702,6 +702,7 @@ interp_throw (ThreadContext *context, MonoException *ex, InterpFrame *frame, gco
MonoContext ctx;
memset (&ctx, 0, sizeof (MonoContext));
+ MONO_CONTEXT_SET_SP (&ctx, frame);
/*
* Call the JIT EH code. The EH code will call back to us using:
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c
index b6c2c58f225..30a6745a191 100644
--- a/mono/mini/mini-exceptions.c
+++ b/mono/mini/mini-exceptions.c
@@ -712,7 +712,7 @@ unwinder_unwind_frame (Unwinder *unwinder,
/* Process debugger invokes */
/* The DEBUGGER_INVOKE should be returned before the first interpreter frame for the invoke */
- if (unwinder->last_frame_addr > (gpointer)(*lmf)) {
+ if (unwinder->last_frame_addr < (gpointer)(*lmf)) {
if (((gsize)(*lmf)->previous_lmf) & 2) {
MonoLMFExt *ext = (MonoLMFExt*)(*lmf);
if (ext->debugger_invoke) {