Saturday, October 20, 2007

Session 12 - Incremental build lab + Shaver's patch


Proffesor Humphrey's lab - Incremental Build Lab
  • cd netwerk/protocol/http/src/
  • Added these lines to nsHttp.cpp
HttpHeapAtom *
NewHeapAtom(const char *value) {
/* DEBUG_ is defined at build time, and Faculty is the username in the lab */
#ifdef DEBUG_Faculty
printf("Hello World!\n");
#endif
  • cd /c/ff/ff-debug-/netwerk/protocol/http/src/
  • make
  • cd /c/ff/mozilla/ //it's better to get your patch from the MOZILLA folder
  • time cvs diff -u8p . > patch.txt // this way people don't have to wonder where you made the changes - 2 minutes wait
  • You can find my patch here

To apply the patch, put it in your c:\ff\mozilla folder and type this:
  • patch -p0 <>
  • Because I alread had the changes, it will reply to me saying:
patching file `netwerk/protocol/http/src/nsHttp.cpp'
Reversed (or previously applied) patch detected! Assume -R? [n]

I typed "y" to revert the changes
  • After reverting if I type it again:
patching file `netwerk/protocol/http/src/nsHttp.cpp'

I also applied Shaver's patch!!!!
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|? threads/.gdb_history
|Index: threads/nsThread.cpp
|===================================================================
|RCS file: /cvsroot/mozilla/xpcom/threads/nsThread.cpp,v
|retrieving revision 1.70
|diff -u -p -5 -r1.70 nsThread.cpp
|--- threads/nsThread.cpp 11 Jul 2007 03:01:56 -0000 1.70
|+++ threads/nsThread.cpp 25 Aug 2007 15:53:36 -0000
--------------------------
File to patch:
  • It seems that I'm not in the right folder (Shaver didn't follow the suggestion of Dave's lab!!; After all, the suggestion is for learners), after thinking a little bit:
    cd xpcom/threads/
    patch -p0 --dry-run < ../../latency-tracing-patch.txt
  • But I got the same error, I move once up
    cd ..
    patch -p0 --dry-run < ../latency-tracing-patch.txt
  • It worked!!! Now without faking the patch, making and running
    patch -p0 < ../latency-tracing-patch.txt
    cd ../../ff-debug-/xpcom
    make
    ../dist/bin/firefox.exe -no-remote -ProfileManager
  • Dave said about: "Run your browser and watch for messages in stderr" but I don't what to look for
  • How do I really know if it all worked??? not sure; I don't know if the changes are running in the instance right now; I think I will find out in the next incremental lab that I will be going which affects the download manager

No comments:

Post a Comment