[sdb] Avoid marking seq points as nonempty-stack if they have a sym seq point. Fix...
[mono.git] / mono / mini / seq-points.c
index b2b511f0cb49347eefabf908987a7539aceaecc8..e48696334c00629dda6476ec595866a5d32ef35e 100644 (file)
@@ -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;