[Mono-bugs] [Bug 74805][Maj] Changed - Incorrect line number
information
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jul 20 14:14:13 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by martin at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74805
--- shadow/74805 2005-07-20 08:48:42.000000000 -0400
+++ shadow/74805.tmp.9434 2005-07-20 14:14:13.000000000 -0400
@@ -96,6 +96,60 @@
then copied into %rax and checked. However, the debugger stops at
0x400177ed - so if you modify the variable, the debugger correctly
changes %r14, but it's already copied into %rax.
------- Additional Comments From martin at ximian.com 2005-07-20 08:48 -------
Let's wait until Atsushi committed his big line-number rewrite to mcs.
+
+------- Additional Comments From martin at ximian.com 2005-07-20 14:14 -------
+Ok, I debugged this all afternoon and figured out it's a JIT bug. MCS
+is generating correct line number info, but the JIT is translating it
+incorrectly.
+
+The problem is in mono_arch_output_basic_block() - the code is
+originally created like this:
+
+====
+LABEL BLOCK 3:
+ (stind.i1 regvar[%r15] iconst[0])
+ (stind.i1 regvar[%r15] call[foo])
+ (beq[B4B6] (compare (ldind.u1 regvar[%r15]) iconst[0]))
+LABEL BLOCK 6:
+ (outarg_reg i8const[7737248])
+ voidcall[WriteLine]
+ br[B1]
+LABEL BLOCK 4:
+ (outarg_reg i8const[7737208])
+ voidcall[WriteLine]
+ nop
+=====
+
+However, it looks like burg is reordering the instructions because in
+mono_arch_output_basic_block(), I get (that's `ins->cil_code',
+`offset' and `mono_inst_name (inst->opcode)'):
+
+=====
+Basic block 0 starting at offset 0xe
+Basic block 3 starting at offset 0xe
+ (nil) - e - xor
+ 0x2a9557a304 - 11 - call
+ (nil) - 16 - move
+ 0x2a9557a309 - 19 - and_imm
+ (nil) - 20 - move
+ 0x2a9557a30a - 23 - and_imm
+ 0x2a9557a30b - 29 - x86_test_null
+ 0x2a9557a30b - 2b - int_beq
+Basic block 6 starting at offset 0x31
+ 0x2a9557a310 - 31 - iconst
+ 0x2a9557a315 - 36 - voidcall
+ 0x2a9557a31a - 3b - br
+Basic block 4 starting at offset 0x3d
+ 0x2a9557a31f - 3d - iconst
+ 0x2a9557a324 - 42 - voidcall
+Basic block 1 starting at offset 0x47
+======
+
+See that the `move' at offset 0x16 has `ins->cil_code == NULL', so we
+won't create debugging info for that - the debugger will stop on the
+next instruction (the `and_imm') instead.
+
+Could some JIT expect please have a look at this ?
More information about the mono-bugs
mailing list