[Mono-dev] Mono Debugger Patch that allows Remote Debugging

Harald Krapfenbauer krapfenbauer at ict.tuwien.ac.at
Mon Apr 7 03:30:32 EDT 2008


Hello Martin,

I understand all of the problems you have with integrating the patch. It
is partly a hack (though it works of course), and I wonder if all of
these problems can be solved so that integration would be possible.

Would you be willing to work on it together with me? I'm currently busy
with other stuff, and I don't know when I can spend time on the debugger
again.

Best regards,
Harald


Martin Baulig wrote:
> Hello Harald,
> 
> I had a look at your remote debugging patch and unfortunately, I have
> some bigger problems with it.  There are basically three major issues
> which need to be resolved before I can integrate this into the main
> debugger release.
> 
> I.) Libbfd
> 
> I don't like modifying the libbfd which is shipped with the debugger
> very much.  This makes it very complicated to upgrade the bfd to a newer
> version in future.
> 
> I've already been asked about upgrading libbfd because this may become
> necessary if we add ppc support.  Because of that, it's important to
> keep the bfd changes to an absolute minimum.  It should also be easy for
> other people (not just me) to replace the bfd, for instance if someone
> wants to implement support for a new architecture.
> 
> One solution for this is probably adding wrappers for each of the
> functions into backend/arch/bfdglue.c and do the changes there.
> 
> II.) The if conditionals
> 
> I'm not very happy about the fact that you basically put all of
> backend/server/*.c inside `if' conditionals.
> 
> Most of these functions are already invoked via the `InferiorVTable', so
> I'd prefer if we could put all the remote debugging functions into a
> separate file and then simply replace the vtable when remote debugging.
> 
> If you need to invoke any methods which aren't in that vtable, we can
> simply add them.
> 
> III.) Using arch-specific code in x86-linux-ptrace.c
> 
> You can't use any architecture specific code in x86-linux-ptrace.c, like
> accessing fields inside the `INFERIOR_REGS_TYPE'.
> 
> This file is shared between i386 and x86_64, so `regs->ebx' won't even
> compile on the x86_64.
> 
> These are the major issues, there are also a few minor cosmetic ones:
> 
> * Please don't use a global variable `remove_debugging_flag', put it
>   inside the `ServerHande' instead.
> 
> * Please don't copy the private struct `InferiorHandle' from one .c file
>   into another; we can either put it into a header file or add public
>   accessor functions.
> 
> * Do we really need to add the breakpoint code to thread-db.c ?
> 
> I would really like to integrate this into the main debugger, but please
> understand that I also need to ensure long-term maintainability and code
> cleanness.
> 
> Martin
> 
> --
> Martin Baulig - martin at novell.com
> Novell GmbH, Düsseldorf
> GF: Volker Smid, Djamel Souici; HRB 21108 (AG Düsseldorf)
> 
> 
> 

-- 
Harald Krapfenbauer
Project assistant

Vienna University of Technology, Institute of Computer Technology
Gusshausstraße 27-29, 1040 Vienna, Austria
Phone: +43-1-58801-38472, Fax: +43-1-58801-38499
Email: krapfenbauer at ict.tuwien.ac.at, WWW: http://www.ict.tuwien.ac.at
Skype: harald.krapfenbauer


More information about the Mono-devel-list mailing list