Feeds:
Posts
Comments

Archive for the ‘debugging’ Category

Well, the big ball ‘O duct tape that is my hacks on symbolstore.py are complete for now – here is the patch. This project will be carried on in the next term at which point I hope to address some of the current issues, namely – manipulating the directory structure, cleaning up the python code and assembling a unified documentation page.

For now – you may test out the fruits of my labour by downloading this installer of Firefox 3.0b2pre which will install Minefield in your Program Files/Minefield directory (you have no choice for installation dir.) and then copying these symbols into the folder where your Visual Studio (or Windbg) is looking for debug symbols.

The last thing you have to do in order for this to work is to put a path to cvs.exe in your PATH – I personally pointed it to the mozilla-build/mysys/bin/cvs.exe but if you like you can download cvs.exe and put it wherever you want.

Now that you have all you need, open up your debugger (VS or Windbg), attach it to the Minefield process and go!

It will ask you about the cvs calls that gather up the source code, say “OK” or “Run” or whatever is positive. The file should download into the proper /mozilla/whatever structure – on my computer it goes into Program Files/Microsoft Visual Studio 8/Common7/IDE/mozilla/…

That will be a focus in the next round, is manipulating the cvs command so that the source files go to a c:/temp or something. The debugger will automatically want to look for the path that the source file originally came from (in this case, my c:/ff_clean/mozilla/…) – you will have to point your debugger to the correct file the first time and then after that it knows to look in the mozilla folder you selected.

It works for now like what it is; a ball of duct tape that allows you to get the right source code for where you are in the browser without having a build on your computer.

I look forward to feedback about how this works for you, if you use it and if you have any problems arise.

Advertisements

Read Full Post »

After many nights of tweaking this space, that path, this logic – the symbolstore.py script is now playing nice with pdbstr and the pdb files are getting indexed. So begins the second battle – how to get Visual Studio to pull the code out of CVS and locate that code on the local drive. Right now, when you have the symbols loaded up and you attach to firefox as a process, a window comes up confirming the call that will be made. Calling CVS from VStudio

If I copy and paste this command into my command line (I have CVS in my path from mozilla-build\mysys\bin) then I can pull the file and it goes into the directory structure as it is in the command starting from my current working directory.

When I click on “Run” in Visual Studio however, the code may or may not be getting pulled from CVS – I have no feeback and if I then try to look at something on the call stack, I get a dialog asking me to find the source code file. BUT WHERE IS IT?
look for files
Visual Studio is trying to find it in the hierarchy that my build was based on…that is not going to exist on the remote user’s computer.

I’ve made a few tweaks to symbolstore.py to try and create a %CVS_WORKINGDIR% in the srcsrv data block where the code would then be pulled to. This does not appear to be working, as the directory I am instructing it to create is not getting created.

This is the current symbolstore.py. More tweaking on the horizon.

Many huge thanks to Ted for figuring out the minute details that fixed the call to pdbstr.

The most up to date set of symbols can be found here: http://avnerd.tv/symbols/crashreporter-symbols-firefox-3.0b2pre-WINNT-2007120422.zip

The installer for this indexed version is here: http://avnerd.tv/sharedFiles/ff_SourceServer.exe.zip

Read Full Post »

Here are the goals for my 0.2 release

  • release build of ff with debugger-info enabled to create pdbs without being a full debug build
  • using lib xul – make an installer for people to download
  • take the symbols and index them and distribute the source
  • set up the symbol server but indexed so that someone can pull the source code
  • which involves running the cv2http.cmd on the indexed code

And the results:

How to set up the Source and Symbol Server

  1. add a path to my symbolServer http://avnerd.tv/symbols/2007110200 as per MDC docs in Tools->Debugging->Symbols

  2. check the option for turning on the source server in Tools->Debugging->General

  3. Download the installer from here Firefox Installer **(FYI you have to use my installer because it is the one that I indexed code and uploaded symbols for – if you do not use this installer you will not get the proper results)
  4. install the firefox you just downloaded (it will install as Minefield in Program Files\Minefield)
  5. make sure you run it with –no-remote and -profilemanager so you don’t mess up your normal Firefox experience
  6. once it’s running, go to Tools->attach to process… and attach VStudio to the firefox instance
  7. after it’s attached, you can go to Debug->break all and then poke around at the firefox functions code (You will get a warning about downloading code from an unknown source, click on “run” because you trust me)

This is what it might look like:

Contribution Opportunity

You need to be in the Windows platform and have a copy of Visual Studio to run the above instructions. If this applies to you, please take a minute to download the installer and follow the instructions as I’ve outlined them.

Please leave a comment answering the following questions:

  1. Did it work for you?
  2. Were the instructions clear?
  3. Any constructive feedback?

Read Full Post »

Filing a bug

First I had to create a bug over on landfill – explaining the issue

The gist is that anything that has characters@…Someothercharacters turns into a mailto: link in Thunderbird and this was annoying Dave so the whole class jumped to fix it.

Fixing the problem

Dowloaded and built a copy of Thunderbird’s trunk on my MacBook and then navigated over to mozTXTToHTMLConv.cpp in order to alter some code which checks for a ‘.’ after the @ symbol but does not also check that there is not a “..” in that string.

This is a one-line fix but I was having some trouble getting my code changes to show up. Funny story, this happened to me in class too and both times it was because I forgot a ) in the code.

Creating a patch

This is easily done by calling cvs diff -u8p . > mailtoPatch.txt in my mozilla directory.

Requesting Review and the Results

We were going down the line as reviewers – I asked Mmullin and he had already done a review so he handed me off to Armenzg who passed my patch with the comments to remove my printf statement and to make the two if statements into one evaluation. It turns out that he should not have passed my patch, instead he should have made the comments and let me fix it before approving the patch.

Even though Armenzg passed my first patch, I did in fact re-do the patch minus printf and simplifying the if statement. I am waiting for a proper approval as I write this but I am sure it will be approved.

After it was all over, I was then the reviewer for Peter‘s patch and I was impressed with his one line change and passed it immediately.

The whole process was a great learning curve. Now that I’ve seen how the patch/review process works I imagine that I could fix a bug one of these days.

Read Full Post »

Here’s what we’re looking at.

I built a version of ff that was checked out from mozilla’s cvs. From this version I called “make buildsymbols” and created the folder 2007092823 which contained all the pdb and symbol files for that build.

For information on how to use the symbol server – check out Benjamin Smedbergs blog. Instead of pointing VStudio to the mozilla symbol server, I wanted to point to a local server of symbols.

In order to test whether these symbols worked, I set up IIS on my laptop and served up the pdbs locally to make sure that Visual Studio was able to pull them properly. After a quick detour to set up the MIME types on my server, this worked just fine.

Then I used the indexing tools that come with the microsoft.com/whdc/devtools/debugging/default.mspx Debugging for Windows package.

First – using cvsindex.cmd and pointing out the symbol path and the source path, the pdb files are then indexed with the location of the source code for that build.

Second – using srctools.exe I pulled a sample list of the source files that are contained in a pdb file

All of this is available in a zip file – PDB files and sample source list and I look forward to feedback from anyone who wants to look at the sample source list and discuss how the next step of connecting the cvs to the local pdb files might work. Also you can go to my wiki page to sign up as a contributor or to read more.

At the moment this will not work for someone who is debugging unless they have my build of FF. That’s what 0.2 is all about.

Read Full Post »

I don’t know how many times I can read the 3 main sources of information about this source server business. Everytime I read them it’s like being in a house of mirrors. Tonight I found a new site that refers to a source server. Once again I hear how amazing this source server is, yet no real information about how to make it happen. His final sentence – “After all, “It just works!” Why would I need to know anything more? :-)” is just poking at me as I am so in need of knowing more and can’t find a single human being who knows more.

The main msdn help files state that:

Generally, binaries are source indexed during the build process after the application has been built. The information needed by source server is stored in the PDB files.

So does this mean that I need to add something to the firefox build files that will do this indexing around the same time that the buildsymbols are pulled? Around the time that the build wraps up? And if yes, then what do I put there? Why is there not ONE example of someone successfully writing a source server for their project? If this source server is so amazing (and it sure sounds like it will be) then why no examples? No discussion in the msdn community forums, no blogs, nothing.

I emailed a person who sounded like they had written one for their versioning system, he wrote back and said that it actually wasn’t him, it was another team member.

Is the source server really an urban legend? Has *anyone* seen it in action?

Read Full Post »

Oh Bugzilla

Well I’m a little late in reporting on my experience of watching someone on Bugzilla. This is partly because I didn’t read the “to-dos” closely enough and then it was because it took a few hours to find out how to watch someone. Well, asking on IRC, I was informed that you go to your user settings. What?! That is so strange. I wish that Bugzilla had a better interface where you could search by user, email, etc. Something to connect you to the people more. The current interface assumes you already know how to use everything.

Anyway, I put Ted (:luser) on my watch list because he’s my main contact for the project I’m working on.

Mullin already said it, but I will say it again – the flood of emails made no sense, I had no way of knowing who commented from the subject line of the email, and basically it took less than one day before I pretty much stopped paying attention to anything from bugzilla-daemon@mozilla.org.

I am impressed with anyone who uses this system and gets something out of it.

Armen says there’s no way bugzilla can change because it’s too big – is that really true?

Read Full Post »

Older Posts »