[Mono-dev] Porting Mono Debugger to OSX
jonas echterhoff
jonas at unity3d.com
Wed Apr 15 14:24:54 EDT 2009
On Apr 15, 2009, at 6:43 PM, Martin Baulig wrote:
> On Tue, 2009-04-14 at 20:21 +0200, jonas echterhoff wrote:
>
>> But, now I'm wondering, how setting of breakpoints should work.
>> When I
>> launch mdb, set some breakpoints like "b Y.Test", and then run, that
>> causes OperationActivateBreakpoints and OperationInsertBreakpoint
>> operations to be executed, which call the function
>> debugger_insert_source_breakpoint inside mono. But, the breakpoints
>> never seem to be actually set (no calls to
>> server_ptrace_insert_breakpoint). How is this supposed to be invoked?
> We need to do the symbol table lookup because we're usually not
> inserting the breakpoint on the first instruction of the method, but
> on
> some source line.
Thanks. I installed a Linux VM now, which lets me run the debugger on
linux to see how things should work, that makes life much easier. The
reason breakpoints weren't working was that in order to set up a
breakpoint, code needs to be executed inside the inferior executable's
stack - which is normally execute protected in OS X. For now, I fixed
this by marking all memory pages I write to as executable - which
fixes the problem. Now the debugger actually starts working, sort of.
I can set breakpoints, single-step through code, etc. Sure, there is
still a lot to do, but actually seeing first results sure is nice.
I will try to clean up the code and send a first patch tomorrow. How
does the patch submission process actually work? I'm sure it's
documented somewhere, but I couldn't find anything after a quick look
on the web site.
jonas
More information about the Mono-devel-list
mailing list