[Mono-bugs] [Bug 573988] New: Soft debugger is broken on systems not supporting MMAP_32BIT flag (Solaris, probably *BSD)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jan 26 12:24:43 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=573988
http://bugzilla.novell.com/show_bug.cgi?id=573988#c0
Summary: Soft debugger is broken on systems not supporting
MMAP_32BIT flag (Solaris, probably *BSD)
Classification: Mono
Product: Mono: Runtime
Version: 2.6.x
Platform: x86-64
OS/Version: Solaris 10
Status: NEW
Severity: Normal
Priority: P5 - None
Component: debug
AssignedTo: martin at novell.com
ReportedBy: burkhard.linke at CeBiTec.Uni-Bielefeld.DE
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=338902)
--> (http://bugzilla.novell.com/attachment.cgi?id=338902)
Patch (diff -Nur -p1) for enabling soft debugger on Solaris
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9.1.7)
Gecko/20091223 Firefox/3.5.2
The soft debugger built into the mono runtime requires the pages for triggering
single step and breakpoint events to be accessible with a 32 bit pointer.
Some operation systems do not support mmap flags to restrict the returned page
to the first 4 GB of address space.
As a result the assertion in mono_arch_output_basic_block (mini_amd64.c) about
the location of the single step trigger page fails, resulting in a termination
of the mono process.
ERROR:mini-amd64.c:3509:mono_arch_output_basic_block: assertion failed:
(((guint64)ss_trigger_page >> 32) == 0)
Stacktrace:
(no stack trace printed...)
Reproducible: Always
Steps to Reproduce:
1. Compile mono on Solaris or *BSD (according to some code comments,
Free/NetBSD
do not support MMAP_32BIT, too)
2. Start monodevelop, configure a project to use a terminal window of its own
for its output
3. Start debugging the project
Actual Results:
A message about a failed assertion appears and the mono process terminates.
Attached is a patch that adds support for debugging on amd64 on systems without
MMAP_32BIT. The conditional parts of the patch depend on the
MONO_ARCH_NOMAP32BIT define, which should be set by configure for the systems
in question.
The patch works for me[tm], using Solaris 10 on amd64. YMMV.
Details:
The patch replaces the instruction to access the single step trigger page (or
break point trigger page) with an instruction to write the content of the EAX
register to that location. The resulting opcode "mov EAX, [addr]" is one of the
very few opcode that allow adressing a 64 location directly, without using a
register. The content of EAX does not matter at the moment, since the access
itself trigger the single step or breakpoint event. No register allocation is
needed.
Unfortunatly the opcode sequence uses 9 bytes (compared to 8 bytes in the
former sequence), so I also had to fix some other file except
mono/mini/mini-amd64.c and mono/arch/amd64-codegen.h. This patch should also be
checked on other platforms, too.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list