[Mono-bugs] [Bug 77062][Wis] New - mdb doesn't work with linux installer

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Dec 21 16:55:47 EST 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 wberrier at novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77062

--- shadow/77062	2005-12-21 16:55:47.000000000 -0500
+++ shadow/77062.tmp.3785	2005-12-21 16:55:47.000000000 -0500
@@ -0,0 +1,110 @@
+Bug#: 77062
+Product: Mono: Debugger
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: cli
+AssignedTo: martin at ximian.com                            
+ReportedBy: wberrier at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Summary: mdb doesn't work with linux installer
+
+Hans reported this problem on the mailing list.  I'll post his comments here:
+
+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
+
+
+---------------------------------
+I checked in a change to the debugger ensure path relocation would happen
+in the wrapper script.
+
+Then, I think the debugger needs to be modified to take advantage of Mono's
+relocatability for finding the necessary dll files.


More information about the mono-bugs mailing list