[Mono-dev] How to get mdb to work as installed with the Mono 1.1.12 Linux installer
Wade Berrier
wberrier at novell.com
Wed Dec 21 15:56:21 EST 2005
Hi Hans,
Thanks for the great feedback and solution. The debugger needs some
slight changes in order to work in a relocated environment.
I went ahead and filed a bug:
http://bugzilla.ximian.com/show_bug.cgi?id=77062
Wade
On Wed, 2005-12-21 at 18:42 +0100, Hans Kratz wrote:
> Hi!
>
> I tried to use mdb for some Mono.Debugger library testing and
> encountered some some problems with the way it is shipped in the Mono
> 1.1.12 Linux installer.
>
> I used the installer to install mono in my home directory on Debian
> Unstable.
>
>
> The problems:
>
> 1) mdb does not start.
>
> hans at gna:~$ cat ~/mono-1.1.12/bin/mdb
> mono --debug /usr/lib/mono/1.0/mdb.exe $*
>
> As you can see the assembly path is wrong causing mdb to fail on
> startup. Furthermore exec should be used and the full path to the mono
> binary should be specified (as is done e.g. in the mcs shell script).
>
>
> 2) Starting mdb using the correct path does not work either.
>
> hans at gna:~$ ~/mono-1.1.12/bin/mono ~/mono-1.1.12/lib/mono/1.0/mdb.exe
>
> Unhandled Exception: System.TypeInitializationException: An exception
> was thrown by the type initializer for
> Mono.Debugger.Frontend.CommandLineInterpreter --->
> System.DllNotFoundException: monodebuggerserver
> in (wrapper managed-to-native)
> Mono.Debugger.Frontend.CommandLineInterpreter:mono_debugger_server_static_init
> ()
> in <0x00007> Mono.Debugger.Frontend.CommandLineInterpreter:.cctor ()---
> End of inner exception stack trace ---
>
> I am not sure how this is supposed to work. Setting the LD_LIBRARY_PATH
> helped however:
>
> hans at gna:~$ export LD_LIBRARY_PATH=~/mono-1.1.12/lib/
> hans at gna:~$ ~/mono-1.1.12/bin/mono ~/mono-1.1.12/lib/mono/1.0/mdb.exe
> Mono Debugger
> (mdb)
>
>
> 3) Even then mdb can not be used for actual debugging.
>
> hans at gna:/tmp/Debug$ ~/mono-1.1.12/bin/mono
> ~/mono-1.1.12/lib/mono/1.0/mdb.exe ConsoleApplication70.exe
> Mono Debugger
> (mdb) run
> Starting program: ConsoleApplication70.exe
> Corlib not in sync with this runtime: expected corlib version 45, found 41.
> Download a newer corlib or a newer runtime at http://www.go-mono.com/daily.
>
> Here mdb tries to use /usr/lib/mono/1.0/mscorlib.dll. I assume this is
> because mdb starts the child process using mono-debugger-mini-wrapper
> and mono-debugger-mini-wrapper is not recognized in mono/os/unix/util.c
> which is responsible for the correct setup via mono_set_dirs.
>
> Setting MONO_PATH and MONO_CFG_DIR manually seems to resolve this:
>
> hans at gna:/tmp/Debug$ export MONO_PATH=~/mono-1.1.12/lib/mono/1.0/
> hans at gna:/tmp/Debug$ export MONO_CFG_DIR=~/mono-1.1.12/etc/
> hans at gna:/tmp/Debug$ ~/mono-1.1.12/bin/mono
> ~/mono-1.1.12/lib/mono/1.0/mdb.exe ConsoleApplication70.exe
> Mono Debugger
> (mdb) run
> Starting program: ConsoleApplication70.exe
> Process @4 stopped at #0: 0xb789f73b in
> ConsoleApplication70.Program.Main(System.String[])+0xb at
> /home/hans/.xdevelop/projects/ConsoleApplication70/ConsoleApplication70/Program.cs:11.
> 11 Console.WriteLine("Hello world!");
> (mdb)
>
>
> I hope this analysis helps to improve the mdb and mdb packaging.
>
>
> Best regards,
>
>
> Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051221/6ab5933d/attachment.bin
More information about the Mono-devel-list
mailing list