| CompOrg Fall 2002 Homework #3 FAQ | ||
| CompOrg Home | Syllabus | HW3 Description | ||
| Question: |
There is no possible solution to phase n of my bomb, and I can prove it! |
| Answer: |
All bombs have solutions for all phases, you are missing something... |
|   |   |
| Question: |
I've come across instructions that are not mentioned in the book, where can I find information about other IA32 instructions? |
| Answer: |
First, you need to keep in mind that a disassembler will disassemble any sequence of bytes (including bytes that hold data). If the disassembler tries to convert data to instructions, it can come up with some wierd instructions that we have not discussed. Since this is really just a view of some data (for example, a jump table) as if the data was code - you don't need to worry about it - your program will never execute these instructions. Second, it is assumes that you can determine what is a C library function and what is part of your bomb. So when your program calls sscanf - you don't need to go step through sscanf - just look up what sscanf does (man sscanf). Here is a reference I've found: X86 Instruction Reference. Keep in mind that anything really wierd (like using I/O instructions INSB, OUTSB) is not part of your program. The operating system uses these instructions to get data, your program does not... |
|   |   |
| Question: |
Where can I find more information about how to use GDB? |
| Answer: |
The textbook includes some information (near the end of chapter 3) that includes a list of commands. There is a help command that provides a little more detail on how to use each of the commands. The GDB manual can be found at: Debugging with GDB You might also look at Linux Assembly Tutorial And here is another document that may be useful: www.cs.umbc.edu/~chang/cs313.f02/gdb_help.shtml Asking google.com for "gdb assembly" results in lots of matches... |
|   |   |
| Question: |
How do I know if I've solved the secret phase? |
| Answer: | Once you have enabled the secret phase, the bomb will tell you this (it will print a message after you complete phase 6). Once you have solved the secret phase, the bomb will tell you that your answer is correct (just like the other phases). |
|   |   |
| Question: |
I have just got things figured out (how to solve phases), but I don't have enough time left - can I have more time? |
| Answer: | HW3/4 due date has been extended to 11:59PM on Sunday, October 20th |
|   |   |
| Question: |
I don't like gdb, are there any other debuggers available? |
| Answer: | There is another debugger (ald) available at http://dunx1.irt.drexel.edu/~psa22/ald.html I've heard that insight is better than the Cygwin version of gdb (much better than Linux/BSD gdb alone). The debugger is available at: http://sources.redhat.com/insight/ |
|   |   |
| Question: |
I'm using Cygwin and after I save my answer for the first phase in a file named solution.txt and feed it to the bomb, it doesn't seem to believe I have the right answer. |
| Answer: | The file solution.txt has DOS line termination stuff in it, instead of Unix (DOS uses "\r\n", Unix just uses "\n"). You can get rid of the DOS stuff in the file with the following command: (from the shell prompt): tr -d "\r" < solution.txt > foo Now the file foo is a copy of solution.txt except that all the
'\r' characters have been stripped out. Feed this to your bomb and
it should work ( |
|   |   |
| Question: |
I can't get my bomb to run on a Sun, what am I doing wrong? |
| Answer: | Your bomb is an executable program that was built to run on a machine running either BSD, Linux or Windows/Cygwin for an Intel processor. You cannot run a program with Intel instructions on a machine that doesn't have an Intel processor (or something that will simulate an Intel processor). |
|   |   |
| Question: |
I need a Windows/Solaris/SGI/Mac version of the Bomb, as I'm not interested in learning anything about Unix or I can't get Cygwin/Unix to work or I don't have access to a machine. |
| Answer: | You need to use one of the three supported environments. It was mentioned the first day in class that we would need to use a Unix-like environment for at least one assignment, this should not be a surprise. If you are having trouble with Cygwin, Dave can help. If you have remote access to a BSD machine (like monica.cs.rpi.edu), you need to learn how to use scp to move files back and forth (or get an SSH client like the one available from ssh.org that has a GUI version of scp - you can just drag files back and forth between your laptop and monica). Dave can also help with scp instructions. |
|   |   |
| Question: | I can't seem to download a bomb correctly - what should I do? |
| Answer: | Send Dave email: hollingd@cs.rpi.edu |
|   |   |
| Question: | I don't like all the "bomb" talk, it offends me. Can't you create an assignment without using violent terms? |
| Answer: | This assignment is derived from one used by the authors of our textbook, and I have already made an attempt to tone things down... However, if you find it difficult to deal with my 'toned-down' version of the project - here is a version of the project description with the word "bomb" replaced by the word "puzzle" where ever possible: hw3alt.html |
|   |   |
| Question: | Which debuggers do I run for which Unix environments? |
| Answer: | GDB is supported by all three. Under cygwin, gdb will bring up a fancy Windows based application that give you a view of registers, memory, console, breakpoints, etc... To get this functionality under Linux or BSD you need to use xxgdb instead of gdb (requires X Windows). |
|   |   |