Archive for the ‘Sticker’ Category

How to commit code to my Sticker’s repository

// This is just for my reference 0) Check out the latest code from CVS to PC in pc:///root/sticker/ 1) scp it to lappy:///root/Projects/sticker/src/ 2) Edit code on lappy using Anjuta 3) scp the code from lappy:///root/Projects/sticker/src/ to pc:///sticker/sticker/ 4) run a CVS update from PC:///root/sticker/ 5) run a CVS commit from PC:///root/sticker/

Getting dirty with CVS ;-)

Some routine commands for everyone’s reference… 1) Checking out a module cvs -z3 -d:ext:username@forgecvs1.novell.com:/cvsroot/project co module 2) Commiting a change cvs -z3 -d:ext:username@forgecvs1.novell.com:/cvsroot/project commit 3) Adding a file to the project cvs -z3 -d:ext:username@forgecvs1.novell.com:/cvsroot/project add filename.cpp 4) Deleting (some/all)files from the module // checkout the module cvs -z3 -d:ext:username@forgecvs1.novell.com:/cvsroot/project co module // cd module; rm [...]

Some code… finally!

// Test Sticker stub // Shucks! Indentation is lost…!!! #include “sticker.h” int main() { unsigned long pid; printf(“Enter PID : “); scanf(“%lu”, &pid); try { Sticker *sticker = new Sticker(pid); sticker->attachSticker(); StickerRegisters *regs = sticker->getRegisters(); sticker->detachSticker(); if(regs) printf(“main : regs is at 0x%X\tEIP = 0x%X\n”, regs, regs->getEIP()); else printf(“NULL \n”); } catch(StickerException e) { printf(e.getReason()); [...]

At the end of 5 hours – A cute Segfault!

root@Warrior:~/Projects/Sticker/src# ./sticker Enter PID : 549 Sticker[debug] : Initializing Sticker Sticker[debug] : Sticker initialized Sticker[debug] : Entering doPtrace Sticker[debug] : Attaching to victim Sticker[debug] : Entering ptrace stub Sticker[debug] : Exiting ptrace stub Sticker[debug] : Exiting doPtrace Sticker[debug] : Entering doPtrace Sticker[debug] : Fetching registers from victim Sticker[debug] : Entering ptrace stub Sticker[debug] : Exiting [...]