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:
authorZoltan Varga <vargaz@gmail.com>2015-06-04 23:45:09 +0300
committerZoltan Varga <vargaz@gmail.com>2015-06-04 23:46:00 +0300
commit5b6de39a5034db82997b03ee58e76bfb462c7357 (patch)
treeda671851ed6918c105d284202141bb2044068fe7
parent42e96afeaf0bcda8129db51295fb4a7656c9c153 (diff)
[sdb] Avoid marking seq points as nonempty-stack if they have a sym seq point. Fix the linking of seq points when an endfinally instruction is in a separate bblock. Fixes #30617.
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs6
-rw-r--r--mono/mini/method-to-ir.c3
-rw-r--r--mono/mini/mini-codegen.c2
-rw-r--r--mono/mini/seq-points.c3
4 files changed, 10 insertions, 4 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index b6baca8a518..e51cdc061a0 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -526,7 +526,11 @@ public class DebuggerTests
e = step_over ();
assert_location (e, "ss_nested");
e = step_into ();
- assert_location (e, "ss_nested_3");
+ assert_location (e, "ss_nested_1");
+ e = step_into ();
+ assert_location (e, "ss_nested_1");
+ e = step_into ();
+ assert_location (e, "ss_nested");
req.Disable ();
// Check DebuggerStepThrough support
diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c
index e480dcba6f3..c9c37b86ba4 100644
--- a/mono/mini/method-to-ir.c
+++ b/mono/mini/method-to-ir.c
@@ -8158,12 +8158,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* Backward branches are handled at the end of method-to-ir ().
*/
gboolean intr_loc = ip == header->code || (!cfg->cbb->last_ins && cfg->header->num_clauses);
+ gboolean sym_seq_point = sym_seq_points && mono_bitset_test_fast (seq_point_locs, ip - header->code);
/* Avoid sequence points on empty IL like .volatile */
// FIXME: Enable this
//if (!(cfg->cbb->last_ins && cfg->cbb->last_ins->opcode == OP_SEQ_POINT)) {
NEW_SEQ_POINT (cfg, ins, ip - header->code, intr_loc);
- if (sp != stack_start)
+ if ((sp != stack_start) && !sym_seq_point)
ins->flags |= MONO_INST_NONEMPTY_STACK;
MONO_ADD_INS (cfg->cbb, ins);
diff --git a/mono/mini/mini-codegen.c b/mono/mini/mini-codegen.c
index e1914885b60..4fde10b791f 100644
--- a/mono/mini/mini-codegen.c
+++ b/mono/mini/mini-codegen.c
@@ -702,7 +702,7 @@ mono_print_ins_index (int i, MonoInst *ins)
break;
case OP_IL_SEQ_POINT:
case OP_SEQ_POINT:
- printf (" il: %x", (int)ins->inst_imm);
+ printf (" il: 0x%x%s", (int)ins->inst_imm, ins->flags & MONO_INST_NONEMPTY_STACK ? ", nonempty-stack" : "");
break;
default:
break;
diff --git a/mono/mini/seq-points.c b/mono/mini/seq-points.c
index b2b511f0cb4..e48696334c0 100644
--- a/mono/mini/seq-points.c
+++ b/mono/mini/seq-points.c
@@ -98,7 +98,8 @@ mono_save_seq_point_info (MonoCompile *cfg)
last = ins;
}
- if (bb->last_ins && bb->last_ins->opcode == OP_ENDFINALLY && bb->seq_points) {
+ /* The second case handles endfinally opcodes which are in a separate bb by themselves */
+ if ((bb->last_ins && bb->last_ins->opcode == OP_ENDFINALLY && bb->seq_points) || (bb->out_count == 1 && bb->out_bb [0]->code && bb->out_bb [0]->code->opcode == OP_ENDFINALLY)) {
MonoBasicBlock *bb2;
MonoInst *endfinally_seq_point = NULL;