Excellent News for a Noob MozDev

Well, on this my 50th post, I am excited to announce that I have been offered a summer internship with Mozilla.

I’m just waiting for the actual paperwork to set the wheels in motion. This is going to be one heck of a ride. I’m kind of hoping that once I get this Windows source server up and running, it might be possible to do some hacking on gdb and learn how to get it doing the same thing. Then anyone could debug mozilla without having to build!

When I first became involved with the Open Source class and Mozilla I never would have imagined that I would become involved at this level of the code, but I wouldn’t trade the learning I have undergone for anything.

Talking with Ted the other day about the pdbstr.exe replacement and how it will be written in C++. I’m super rusty on my C++ so that will be challenging. I wonder how the pdb files are written to and read from? This will be the focus of my next week’s work while I await feedback on the bugfixes that I’ve started. Everyone’s busy locking down Firefox 3, so I may have to wait a bit.

The Source Server Janitor

That’s me, cleaning up the symbolstore.py patch one little scrap of python at a time.

Today’s lesson was a brief introduction to String Interpolation.

In the bug, Ted had mentioned using string interpolation as one of the ways I could shrink down how many times I was writing to file. There are a couple of ways to do this, and apparently the best way, when there is only one variable to replace, is to do %s in the string and then a % variableName at the end of the string. Once I had done this however, ‘make buidsymbols’ was complaining that a float argument was required.

As it turns out, there are many places in the stream I am writing where % is followed by another character, and the first is a %f…so it was never getting to my %s way down the line. This is because Source Server does string interpolation as well and so I guess that means that I can’t use the python string interpolation after all.

Unless someone has dealt with this before and has any brilliant ideas to share.

I’ve spoken with Ted on IRC and he will be looking at my revisions this week when ff3 beta freezes (man, they must be pulling out hair out in california) and so I’m looking forward to taking the next step. We spoke briefly tonight about the pdbstr.exe replacement. I wasn’t sure what it should look like. Does it have to be a windows binary? Apparently, yes. That means some C++. Woot.

Just a blip…

Well, I’ve broken the ice that formed on my project over the holidays. There’s something that really intimidated me about going back to that code, that work flow. I don’t know how to explain it except that I felt afraid of my own code and lack of experience, felt like I wasn’t going to remember anything. So I hemmed and hawed but tonight I got back into it for a solid 3 hours and it feels good to remember what I was doing and why.

One small change that has made my life easier – I added srctool.exe to my path so I could call it from anywhere and this makes life good because when I want to test if my code is working I have to call make on the new symbolstore.py, then call make buildsymbols in my objdir, then go into the command window and call srctool.exe -r (a raw dump of the indexing info in a pdb) to see if it all worked. The path to a pdb file is something like C:ff_cleanmozillaobjdir_debugInfodistcrashreporter-symbols2007120422accessiblemarshal.pdbE82E8047412045539226FBBC0BE301974accessiblemarshal.pdb
and so being able to go to that directory and just call srctool -r accessiblemarshal.pdb is way easier. So I’m happy about that.

I’ve submitted my changes so far back to the bug and am now awaiting feedback. If I can successfully handle at least one of the points that led to a – review, then I am moving forward.

Now it’s time for some (light) reading about windows proprietary debug database formats.