15-213 Lab #3 Q&A


Sunday, February 17, 2002

Question:

I cannot execute the makecookie file. I get an error message that says, "Exec format error. Cannot execute binary file.." Do I have to run "makecookie" on the common Unix machines or a FISH machine?

Answer:

You should run "makecookie" from a Fish machine. Unless we tell you otherwise, please assume this for all of the assignments. The "common unix machines" are often sparcs and we are focusing on the Intel IA32 architecture this semester. Additionally, some of the labs have other requirements that can only be satisfied by the fish machines.


Saturday, February 16, 2002

Question:

How can I get GDB to print out a RANGE of address values on the stack?

Answer:

Use the Examine command. Use `help examine` inside gdb to see how to use it. One example is:

x/x 0x80....

This will print out some stuff at 0x80.... in hexadecimal. Exactly how much it prints out is specifiable on the line.