[Mono-dev] Newbie needing mdb help

Wade Maxfield wmaxfield at gmail.com
Wed Mar 29 11:38:47 EST 2006

  OK.  I finally got a compile, using this line:
mcs -debug -out:test.exe -reference:System.Windows.Forms.dll -reference:
System.dll -reference:System.Drawing.dll  MainForm.cs Program.cs

  The program runs, no errors.

  The Main function is on line 9, the first function call on line 11.

  Can someone tell me what I am doing wrong with mdb?  I'm running the
system from the "universal" downloaded mono 1.1.13_4 bin file.

 I ran mdb:
maxfield at cfw7245-xp2:~/.xdevelop/projects/test/test$ mdb -run test.exe
Mono Debugger
Starting program: test.exe
Thread @1 stopped at #0: 0x081bdfd5.
0x081bdfd5      ret
(mdb) list
ERROR: Current location doesn't have source code
(mdb) list Main
(mdb) list Program
(mdb) list Program.Main
(mdb) b Main
ERROR: No symbol `Main' in current context.
(mdb) b Program.Main
ERROR: No such variable or type: `Program'
(mdb) b Program:Main
ERROR: Expected filename:line
syntax error, expecting end-of-file DOT DOTDOT ASSIGN OPAREN OBRACKET
ERROR: Mono.Debugger.Frontend.BreakCommand, Token: COLON   : Parsing error
ERROR: Cannot parse arguments
ERROR: No such method: `Program:Main'
(mdb) b Program.cs:7
ERROR: No method contains the specified file/line.
(mdb) b Program.cs:8
ERROR: No method contains the specified file/line.
(mdb) b Program.cs:10
ERROR: No method contains the specified file/line.
(mdb) b Program.cs:11
ERROR: No method contains the specified file/line.
(mdb) quit

Here is my Program.cs

using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace test
        class Program
                static void Main(string[] args)
                        if (RuntimeEnvironment.GetRuntimeDirectory
                        Form mainForm = new MainForm();

here is first 20 lines of mainform
maxfield at cfw7245-xp2:~/.xdevelop/projects/test/test$ head MainForm.cs -n 20

using System;
using System.Collections;
using System.Drawing;
using System.Windows.Forms;

namespace test
        public class MainForm : Form
                public MainForm()
                        // We use our own scaling
                        AutoScale = false;

                        // Title
                        Text = GetLocalizedText(TITLE_TEXT);

                        // Initialize controls
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060329/b8369dbc/attachment.html 

More information about the Mono-devel-list mailing list