Well... does he like butter tarts?
Hacking: miguel has done it again. He has somehow convinced me to port mono to SPARC. To do this though, I first had to make it build on Solaris 2.8. I've had to do this twice so far this week, once on Tuesday or Wednesday and again today due to so much code changing. Unfortunately this has meant that I haven't had time to work on making it work on SPARC yet ;-)
As it turns out, last weekend I had started reading some SPARC architecture manuals and had started to write sparc-codegen.h. As it turns out, Paolo had the same idea at the same time I did so he had also started hacking this. Maybe that was a good thing. I hadn't gotten very far with sparc-codegen.h anyway mostly because I wasn't quite sure what I was supposed to be writing since <person>miguel</person hadn't been to clear on that. By the time he explained what I was supposed to be writing, I had a massive headache (lack of food?) and so decided to give up for the night and head home.
Monday morning miguel told me that Paolo had also started porting to SPARC but that he didn't have access to a SPARC machine and so it would be my honour to finish the port :-)
Yay!
Okay, so you may have read that "yay" as being sarcastic, and it sort of is. But at the same time I am in some ways relieved that I get to work on the SPARC port because reading the manuals made me interested in the architecture and this would give me a great opportunity to learn something new.
So... where am I now? I've just gotten mono
to build on Solaris (minus the jitter) and the disassembler
works. I then tested mint (mono interpreter) and got
this:
bash$ ./mint --trace ~/hello_world.exe Entering System.String::.cctor () Leaving System.String::.cctor Sending dummy where System.AssemblyLoadEventHandler expected Sending dummy where System.UnhandledExceptionEventHandler expected Sending dummy where System.CrossAppDomainDelegate expected Sending dummy where System.AssemblyLoadEventHandler expected Sending dummy where System.AssemblyLoadEventHandler expected Sending dummy where System.UnhandledExceptionEventHandler expected Sending dummy where System.UnhandledExceptionEventHandler expected Sending dummy where System.CrossAppDomainDelegate expected Sending dummy where System.AssemblyLoadEventHandler expected Sending dummy where System.AssemblyLoadEventHandler expected Sending dummy where System.UnhandledExceptionEventHandler expected Sending dummy where System.UnhandledExceptionEventHandler expected Entering System.Threading.Thread::.cctor () Entering System.Collections.Hashtable::.cctor () Entering System.Object::.ctor () Leaving System.Object::.ctor Entering System.Int32::.cctor () Entering System.Type::.cctor () Bus Error (core dumped)
gdb tells me:
Program received signal SIGBUS, Bus error. 0x178e0 in stackval_to_data (type=0xa2400, val=0xffbee2e8, data=0xa8c52 "") at interp.c:359 359 *p = val->data.p; (gdb) p val $1 = (stackval *) 0xffbee2e8 (gdb) p p $2 = (void **) 0xa8c52 (gdb) p *p $3 = (void *) 0x0 (gdb) p val->data.p $4 = (void *) 0xa6748 (gdb) p *p = val->data.p
Now what? :-)