Mono Runtime Debugging

by Miguel de Icaza

We now have better integration of GDB with Mono. Information on how to use this is in Debugging with GDB in XDEBUG mode in our wiki.

This will be useful if you are debugging the Mono runtime, or debugging Mono embedded into an application new versions of Mono (for example debugging Moonlight).

This will give you symbols for managed code in stack traces, for example the bold text in this example are the managed frames. These would previously just be rendered as "????????" by gdb.

(gdb) xdb
(gdb) bt
#0  0x0000000040cd707e in Tests:pass_floats_doubles (a=100, b=101, c=102, d=103, e=104, f=105, g=106)
#1  0x0000000040cd6fd8 in Tests:test_721_sparc_float_argument_passing ()
#2  0x0000000040a6228a in (wrapper runtime-invoke) Tests:runtime_invoke_int (param0=0x0, param1=0x7fc05e5b0e00,
    param2=0x0, param3=0x40cd6f80)
#3  0x00000000004219f7 in mono_jit_runtime_invoke (method=0x9daa70, obj=0x0, params=0x0, exc=0x0) at mini.c:4253
#4  0x00000000005c1d2c in mono_runtime_invoke (method=0x9daa70, obj=0x0, params=0x0, exc=0x0) at object.c:2399
#5  0x00000000005c39d7 in mono_runtime_invoke_array (method=0x9daa70, obj=0x0, params=0x0, exc=0x0) at object.c:3488
#6  0x00000000005cdc31 in ves_icall_InternalInvoke (method=0x7fc05c371be0, this=0x0, params=0x0, exc=0x7fff66729368)
    at icall.c:3038
#7  0x0000000040cd6bee in (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (
    this=0x7fc05c371be0, param0=0x0, param1=0x0, param2=0x7fff66729368)
#8  0x0000000040cd690c in System.Reflection.MonoMethod:Invoke (this=0x7fc05c371be0, obj=0x0, invokeAttr=0x0,
    binder=0x0, parameters=0x0, culture=0x0)
#9  0x0000000040cd683b in System.Reflection.MethodBase:Invoke (this=0x7fc05c371be0, obj=0x0, parameters=0x0)
#10 0x0000000040a6275c in TestDriver:RunTests (type=0x7fc05e5b6dc8, args=0x0)
#11 0x0000000040a62380 in TestDriver:RunTests (type=0x7fc05e5b6dc8)
#12 0x0000000040a62354 in Tests:Main ()
#13 0x0000000040a6228a in (wrapper runtime-invoke) Tests:runtime_invoke_int (param0=0x0, param1=0x7fc05e5b0e00,
    param2=0x0, param3=0x40a62340)
#14 0x00000000004219f7 in mono_jit_runtime_invoke (method=0x9576f0, obj=0x0, params=0x7fff66729600, exc=0x0)
    at mini.c:4253

For people running the archer branch of gdb, there is a "mono mode" implemented in python for gdb, which offers additional features:

Posted on 19 Feb 2009

Mono on Android, update

by Miguel de Icaza

Koushik Dutta has posted two great updates on his blog about Mono running on the Android powered G1 phone. The code necessary to build Mono on Android is available at the androidmono page.

The first bit is his work to allow Mono code to call Dalvik code as well as the bridge to allow Dalvik/Java to call into .NET code. This is necessary to allow Mono-based applications to call into the phone API and integrate with the existing stack.

The second bit is a cute show of DLR-based IronPython running on the phone.

This of course means that with the bridge in place, any CLR or DLR-based language can access the functionality exposed in Dalvik.

Posted on 16 Feb 2009

Mono 2.0 - .NET Tool/Add-in of the Year

by Miguel de Icaza

Jeff just pointed out to me that Mono 2.0 won the ".NET Tool/Add-in of the Year" award from the guys at


Posted on 13 Feb 2009

Linus does 25 things

by Miguel de Icaza

Linus Torvalds does 25 things about me.

Posted on 12 Feb 2009


by Miguel de Icaza

Now that Moonlight 1.0 is out, I should talk a little bit about Aaron Bockover's amazing Moonshine plugin.

Moonshine's About Box while playing

Moonshine is a tiny plugin that registers itself with Firefox to render Windows Media streams and emulates the Windows Media Javascript API by redirecting it to Moonlight.

So when you visit a page that in the past used to embed the Windows Media Player (for example at or at C-SPAN), instead you get a Moonlight-based rendering engine and uses Microsoft's Media Pack for doing the video and audio playback.

It is trivial to install it, just go to this page and click on the moonshine that is right for your platform.

Internally we referred to this project as "Pornilus" a homage to the Roman senator and patron of the arts from the 3rd century. And like Pornilus, we want to bring the arts to the people.

Cute fact: Pornilus/Moonshine will pick-up your Gnome theme and theme itself accordingly.

Oddly enough, there is no Wikipedia page for Pornilus yet. Someone needs to correct this.

Posted on 12 Feb 2009

Moonlight 1.0 goes live

by Miguel de Icaza

Moonlight, the open source implementation of Silverlight for Unix systems has officially reached its 1.0 level. We are feature complete, we pass all the Microsoft regression test suites and we shipped support for Microsoft's Media Pack for x86 and x86-64 architectures.

Moonlight is available as a Firefox plugin that can be installed with a single click from the moonlight download page.

What is in Moonlight 1.0

Moonlight 1.0 contains our plugin that can be used in Firefox 2 and 3 on Unix systems using the X11 windowing system.

Moonlight 1.0 (and Silverlight 1.0) both come with a graphics pipeline, video and audio frameworks and a javascript bridge and neither one of them contains an actual execution environment. The execution environment is the browser's own Javascript engine. When developers build 1.0-based plugins they script all of the functionality using the browser's own Javascript engine.

The browser Javascript engine communicates with Silverlight (or Moonlight) through the Javascript API exposed by the plugin.

With Silverlight 2.0 and Moonlight 2.0 in addition to this model where the browser's Javascript drives the interaction a new model is available: the ECMA CLI execution system powers the actual execution of the code and will deliver performance anywhere between 20 to 300 times faster execution speed than even the most modern Javascript implementation if you use a strongly typed language like C# or Boo.

CNN's The Moment on Moonlight.

It is worth pointing out that Moonlight is provided both for 32 bit systems and 64 bit systems on the launch date.

We are also hoping to expand our reach to other Unix variants that use X11 like the various BSD systems and Solaris and make codecs available for those.

How we got here

The development of Moonlight has been a fascinating adventure. It all started at the Mix conference in May 2007 when Scott Guthrie introduced Silverlight 1.1. It was a bold move for Microsoft to embed the ECMA CLI into their Silverlight 1.0 plugin.

In my blog post called "Mix 07, Silverlight, Dynamic Languages Runtime and OpenSource". From that post you can see that I was already excited about the technology, and I could not wait to get this technology to Linux. The talk on the DLR at Mix 07 was also fascinating and got me interested in bringing this to Linux.

A few weeks after the DLR had been announced and open sourced, our team had it working on Linux with Mono and by the end of May I had cooked up enough to render a spinning video on the screen.

IronPython 3D visualization on Moonlight

It was during the dynamic language workshop at Microsoft that I had a chance to have dinner with Jason Zander and Scott Guthrie in an Indian restaurant in downtown Redmond. In this dinner they discussed some of the design tradeoffs in Silverlight and these would become part of our own implementation a few days later.

At Mix 2007 I had the chance to meet Marc Jalabert from Microsoft France. Marc invited me to the Remix event in Paris but did not take the invitation seriously until he offered us to demo Moonlight on Jun 21st.

Other than a spinning video and the DLR we did not really have much code so on May 31st I sent an email to the team and asked them to work on an intense 21-day hackaton to bring Silverlight 1.1 to life on Linux. By Jun 21st we had a demo working and we showed Silverlight 1.1 applications (with the CLR) running on Linux.

A few weeks passed by, and Jeff Jaffe from Novell asked me to present our Moonlight to Bob Muglia as part of the regular Microsoft/Novell interoperability meetings. After struggling with the video projector for what seemed like an eternity the Silverlight Chess and the Silverlight Airlines demo came up on the screen on Linux.

In the meantime, we were in love with our Moonlight engine, and we used to build desktop applications in addition to web applications.

After this meeting, I do not remember exactly how things happened as too much happened too quickly, but Microsoft and Novell agreed to collaborate on bringing Silverlight to Linux. We announced the collaboration on September 5th.

It was early on, at that dinner with Jason and Scott that the issue of how to properly license codecs for MP3, WMV and VC-1 had been discussed. We knew that we could implement the engine, but the question remained: how to get codecs to end-users in a fully licensed way. This and other problems had been already discussed and agreed on the collaboration agreement. Microsoft would develop, distribute and maintain their own Media Pack for Linux users and other Unix operating systems.

The entire media work involved hard work at every level, but it was worth the effort. We now have one of the best open source media pipelines implemented. And it will only get better with all the new features in Silverlight 2 for adaptive streaming.

The Immediate Future

We are now hard at work on Moonlight 2, and those of you interested in trying it out can do so by following the build instructions on our web site.

Silverlight 2.0 was a major upgrade from its original announcement Silverlight 1.1. It is more complete, more polished and has been future-proofed.

Microsoft has continued to help us all along in creating an open source implementation of Silverlight. They have open sourced the Microsoft DLR, the Microsoft MEF framework and the crown jewels: the Microsoft Silverlight Control Library and the Control Toolkit under the OSI-approved MS-PL licenses. Without this it would have taken years for us to catch up.

Jimmy Schementi's IronRuby + DOM + Flickr sample.

Up until two weeks ago we could not see much in the screen as a lot of Moonlight had inter-dependencies between various subsystems. But once Larry Ewing's layout system landed in our tree, magically many things started to come together.

You can try out yourself Moonlight with some very hot demos including CNN's The Moment, the Photosynth-based 3D browsing engine for Obama's Inauguration and of course the always amazing DLR demostrations.

Silverlight 3

Silverlight 2 is incredibly exciting, it is delicious and mindblowing. There is a lot of excitement about it, my favorite three sites on Silverlight 2 include:

Microsoft will be announcing the details about Silverlight 3 at their Mix conference in March in Las Vegas.

My wish list

I love Silverlight and the use of the CLR for building web applications. That is just how I am wired up.

I still personally wish that Silverlight 2.0 had a JSon interface to XAML, like the prototype that Chris Toshok did, or that Silverlight had a more fluent model for application deployment. I would like the XAP model to be entirely optional or non-existent for IronRuby or IronPython.

Posted on 11 Feb 2009

It is that time of the Quarter! Traveling to Microsoft.

by Miguel de Icaza

When Joseph and myself head out to Redmond to meet with some folks at Microsoft about Moonlight.

This is a call for all cool cats at Microsoft that would like to get together and talk shop to drop me an email (miguel at gnome dot org) and we can schedule something.

Posted on 05 Feb 2009

XBox Division at Microsoft

by Miguel de Icaza

For about a year I have been trying to find someone in the XBox360 division at Microsoft that we can talk to about bringing Mono to the XBox360 to allow C/C++ developers to script their applications with the high performing C#, Boo or the Iron* languages as opposed to interpreters.

A year ago Mono could not target the XBox360 as apparently this platform, like the iPhone, does not support JITing. Mono now supports full static compilation of .NET code into native code before deployment and we would very much like to bring this to the XBox360.

If you are a Microsofty and you know how to get a hold of someone on the XBox360 group in the Middleware division and you could hook us up, I would love if you could arrange an introduction.

Posted on 03 Feb 2009

Linux Outlaws Podcast

by Miguel de Icaza

Last week the folks at Linux Outlaws interviewed me about Mono.

The idea was that someone on a previous episode apparently did not quite like Mono and they wanted to hear my take. In the end I am not sure that we even talked about their concerns, but it was a fun interview.

Posted on 03 Feb 2009


by Miguel de Icaza

The guys at Resolver Systems have released IronClad. IronClad is a library that allows IronPython to use any existing compiled CPython extension.

The new version has matured to the point that it is able to use CPython's numpy and pass its test suite.

It is lovely to see third parties start to test their code with Mono in addition to .NET as part of the release process. The code has been tested with Mono, and comes with Unix makefiles.

Posted on 30 Jan 2009

« Newer entries | Older entries »