Acid debugging basics

How to step through a program and inspect data structures

To help acid print data structures, compile with the -a or -aa options:

8c -FTVwaa hubfs.c >$home/hubfs.acid

After a hubfs is started, attach acid to it:

acid -l $home/hubfs.acid hubfspid

Check the current status of the execution stack and variables:


Set a breakpoint:


Acid says "waiting". Cause a write to the fs in the system outside of acid, then in acid:


Now we have hit the breakpoint, check stack and step through a few lines of source: lstk() next() next() next()

Check the current stack and variables again, note that h has been set:


Use the address shown of h to print the data of the current Hub:


Delete the breakpoint


Allow the program to continue freely:


Hit delete key to interrupt waiting, ctrl-D to exit acid.