Feeds:
Posts
Comments

Archive for the ‘mozilla’ Category

Something that I have come to appreciate about Mozilla is that its chat channels on IRC are incredibly positive, helpful and relevant. As there are so many areas in developing and using Mozilla projects, several channels exist that allow you to join a channel when it is specific to your area of discussion.

Recently I went to the Joomla channel because I am working on a project for a friend in Joomla. Now, this is my first time working with Joomla. I have attended a brief “Hands on” workshop at the Ontario Linux Conference and I’ve read some of Dan Rahmel’s “Professional Joomla”. I was having trouble understanding the way that Joomla uses plug-ins. Basically there’s a plug-in that can recognize a snippet of custom code in an article – ie: {images view|gallery} or something like that. What I wanted to do was to be able to put that code in a module so that I could position it on the page in the way that modules can be positioned. I can’t find a way to position articles.

So I go to the Joomla channel in the hopes that talking with real person will help – much as going to the mozilla channels has helped in the past. I know that the #seneca channel is special because it is targeted at students who are learning, but the Joomla channel said at the top “Be patient, as your question – if no answer, try giving more info” (paraphrasing). I assumed that I could ask my question and get at least one person to talk it out with me.

Wrong.

What I got instead was a big fat nothing. NO response. NO acknowledgement. I asked politely if I should provide more information, and someone (who had been talking away about someone being gay) said “Oh, i didn’t see the question”. So I rephrase it and ask again – then nothing again. What?!

In frustration, I ask “is anyone here knowledgeable about plugins?” and a half hour later, at which point I had moved on to other tasks since there was no reply yet again, I get a private message from someone who says “ya, what you want?”. I didn’t bother responding. I created an html workaround to what I wanted to accomplish and moved on.

Needless to say, this experience was disheartening for a moment. But then I saw the positive side. I am a small part of a channel or two on the mozilla irc that is friendly, helpful and welcoming. So that’s nice to notice and appreciate.

Advertisements

Read Full Post »

Here is the code I have so far in symbolstore.py
http://pastebin.mozilla.org/254868

My portion is specifically lines 36 – 71 where I am now gathering up a string of source files along with the revision number, and generating a (almost) properly formatted stream file in the pdb’s directory.

Here are the barriers:

1. I would prefer to have a template where I have a variable %SOURCEFILES% that can be replaced and output to a new file for each pdb, instead of writing out each line of the stream file in symbolstore.py. If I can’t get that happening for this release – oh well, Dave said it can be a bit ugly at the 0.3 stage. At least what I have right now, is creating the stream file properly.

2. On lines 38 and 39 – what I am making here is a string that looks like this: c:\mozilla/xpcom/glue/nsTraceRefcnt.h and in fact, this has to be c:\USERS_SOURCEFILE_DIR\mozilla\xpcom\glue\nsTraceRecnt.h — so two things need to happen here, first, I need the / to be \ (except for the one after c:, cause it’s right already) and second, for now I can probably name the dir “ff” and the user can make sure that VStudio is pointing to that path (c:\ff) when looking for source files…but in the long run? I don’t know yet.

3. This is along the same lines as the template issue. The reason I haven’t successfully implemented the template is because I don’t know where to put, or how to create a path to, the right folders when symbolstore.py is being called. Unfortunately, it is not as easy as I had hoped in that putting the template in the same folder as symbolstore.py would allow me to open it with its name only. So as well as not being able to open the template, I don’t know how I can call upon pdbstr from inside of symbolstore.py

That’s going to be the last part, the first two are a little more pressing.

Read Full Post »

Huge changes since last night’s post.

I can insert a .stream file (see previous post for what a .stream file data block contains) into an unindexed .pdb file via pdbstr -w as long as it has certain variables.

I still need to test what the minimum info needed is, right now I just copied and pasted from one that works. I will slowly delete variables from it until it doesn’t work anymore.

Using cvs to pull a specific revision of a file looks like this: cvs export -r 1.23 filename

So – in my test.pdb.stream file I changed the CVS_EXTRACT_CMD to :

CVS_EXTRACT_CMD=%fnchdir%(%CVS_WORKINGDIR%)cvs.exe -d %fnvar%(%var2%) export -r %var4% -d %cvsdatetarg% %var3%

(p.s. %var#% are based on * delimited text in the source files section)

In the source files, i add a source file that contains cvs in the symbol file
like so:

SRCSRV: source files —————————————
c:\ff\mozilla\accessible\public\msaa\AccessibleMarshal.def*MYSERVER*mozilla/accessible/public/msaa/AccessibleMarshal.def*1.3

Then, when I write that to the accessiblemarshal.pdb file followed by a call to srctool -f on that .pdb file, I am greeted with a source indexed file that contains the cvs command that the source server will use to extract the source code when the time comes.

The result looks like this:

[c:\ff\mozilla\accessible\public\msaa\AccessibleMarshal.def] cmd: cvs.exe -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot export -r 1.3 -d 12-01-07 mozilla/accessible/public/msaa/AccessibleMarshal.def

c:\ff\mozilla\objdir_debugInfo\dist\crashreporter-symbols\2007120119\accessiblemarshal.pdb\8EEE4D7316254E22AE3D99EB4082744C3\accessiblemarshal.pdb: 1 source files are indexed – 199 are not

So now I need to learn how best to add this into the symbolstore.py file.

My first instinct is to add something in the ProcessFile function that keeps track of all the files that start with cvs, they look like this:

FILE 2 cvs:cvs-mirror.mozilla.org/cvsroot:mozilla/accessible/public/msaa/AccessibleMarshal.def:1.3
FILE 3 c:/program files/microsoft visual studio 8/vc/platformsdk/include/RpcNsi.h

I already did a little playing around with the python script and was able to insert some code here where I wrote if filename.startswith(“cvs”) then some debug statement to see that I could in fact catch the right lines (which I did).

So let’s break it down:

  1. I need to track all lines that start with “cvs” and then turn these into proper file paths
  2. I need a (minimal) template .pdb.stream file that I can write the source file paths to in source files section
  3. Then I will call pdbstr -w and write that .pdb.stream (each named for the pdb it will write to) to the appropriate pdb file

The final hurdle – learn to write good python code to make this all happen.

Read Full Post »

So for my 0.3 release of sourceServer, I am tasked with altering the code in symbolstore.py so that it will track the source files and then call pdbstr.exe on them.

To do this, I need to understand what PDBSTR.EXE does. This is what I have to go on:

Once the code has looked at all the source files in the PDB file, it’s time to call PDBSTR.EXE to write the index stream, called SRCSRV, to the PDB file. When debugging, the debugger looks for this stream. If it is found, the debugger knows there’s a source server involved and calls into SRCSRV.DLL to execute the version control system to ensure the right file is accessed.

I’ve been studying the pdb files pre and post indexing to gain insight into what happens when I use the Debugging for Windows srcsrv tools. Circling the symbolstore.py code getting ready to make changes to see what I can do.

Any minute now the big picture will come into focus…back to my pdb files.

Read Full Post »

XPcom Lab II

Well there was an initial kerfuffle trying to get the extension “firstxpcomchrome” working in my Minefield build. Turns out that when I was attempting to connect it up via a text file in the profiles/myprofile/extensions folder, I had put the path as a c:/…. path which, in Unix (ie Mac), is not correct. This was affecting my ability to install the extension through drag n drop because the file for firstxpcomchrome@senecac.on.ca was not being overwritten so even though the extension appeared to install correctly in the add-ons manager window, upon restarting it was nowhere to be seen. Deleting the erroneous flat file and doing a drag and drop installation cleared this up and I was able to continue with the lab.

Aside from crashing the browser every time I called on “Reload All Chrome” from the Extension Developer add-on, the lab went smoothly.

Results:
(please enjoy the File menu behaviour that is happening in the background)
Call
FirstXPComChrome1

Response
FirstXPComChrome2

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 »

Well today I got to run Full Functional Tests on Firefox 3 beta 1 and then this evening as I procrastinated from dealing with my Hamiltonian circuit assignment, I ran tests on Miro’s 1.0rc release.

The two testing systems are very different even though they both use Litmus-based testing. Miro’s tests are fewer, some are not well written and in some ways I find them to be very superficial. The Firefox tests have been around a lot longer so I’m sure that has allowed for quite a bit of fine tuning.

I’m not giving up on Miro but so far it’s been challenging to get involved with that project to the degree with which I have been able to immerse myself in Mozilla projects. The lab the other day threw me into Thunderbird in a quick ‘n dirty way and that was great – the documentation is all there. With Miro – well…when I went to look for docs on how to build with Windows…this and this. The gist of it is: “We can’t really tell you how to build on windows because it’s hard”.

Well, now that I’m working on the Mac Book and I have VMWare Fusion with an Ubuntu vm, perhaps I can try building it in a Unix/Linux environment? There’s a doc for Mac OS X and for Linux. We’ll soon see.

Now, back to Mozilla stuff. My 0.2. release is due soon, I have already done a non-debug build of FF with the –enable-debugger-info-modules in the mozconfig and I’ve made the buildsymbols for it. Now I just have to index the pdb files and get the symbols and the source up on my server. Immediately after that is done (in the next day or two) I will look into a) how to make an installer and b) how to work with the CVStoHTTP script that comes with the srctools.

When I have an installer up, I’ll be putting out the contrib call for anyone who can to grab the installer and try to hook it up with my symbol and source servers.

Stay tuned.

Read Full Post »

Older Posts »