Tools:

  1. cscope: make cscope will build a cscope database for you, and then run cscope which is essentially a very nice way to search for C definitions, or much of anything. The problem of course is that the standard cscope thing of finding something, editing a file, quiting your editor, and going on is not optimal. If you want to integrate it with your favorite editor, tutorials are available.
    • vim: Sourceforge and vim both have nice tutorials on getting started with using cscope on vim and installing plugins. There are other vim plugins floating around on vim.org.
    • emacs: emacs wiki has a bunch of links to extensions which make cscope play nice with emacs.
  2. GDB: If you have never used GDB before, or even if you have, you should get to know and love this tool. For much of this semester, make gdb will probably be the most useful command out there. There are times when entire stack frames will appear weird, this is a result of using the simulator, and it will make sense with time. The rather weighty GDB manual will tell you more about GDB, if you need a quick cheat sheet there are many floating around the web.
  3. screen: I am commanded by powers that be to insist that people should as far as possible work in the Sunlab. This is an amazingly good idea, you learn a lot from all the people around, and you get to meet people. But in case you want to work at home, and don't want to use X11, or even if you want to work in the lab and need to not have the Weenix ttys pop up, you can use the screen. screen is a built in unix utility from back when GUIs weren't all pervasive, and lets you have multiple virtual "terminals" running on a single terminal. If you want to better understand what I mean, run screen, echo something out to the prompt that pops up after running screen (echo "Hi I am 1" works well) then hit ctrl-a-n to go onto the next virtual terminal (ctrl-a-p). If you run Weenix from within screen, instead of popping up ttys as X11 windows, the ttys will show up as things on screen, and hitting ctrl-a-n enough times will get you there. There's all sorts of additional information in the man page for screen, and on the internet. Screen's a useful utility if you ever want to run stuff on a machine, log off and still leave it running, and I strongly recommend learning about it, even if you don't plan on using it for 167/9.
  4. ddd: ddd is a visual front end for gdb which most 169 students have not used in past years. ddd is known to be somewhat flaky, but is at the same time really good at helping you visualize data structures. Since it run on top of gdb for us, it offers you the same familiar command gdb does, while allowing to visually look at data structures and their linkages to other data structures. The manual has a pretty detailed tutorial and pretty much any information you'd ever want to reference for this.
  5. shell: You know that first cs167 project you worked on, well when you get down to doing VFS and S5FS, you can convert it into a really nice debugging shell to make testing simple. It takes minimal effort, and will probably help you a fair deal. Itay is in fact so sure that this is a good idea that he will actually help anyone who wants to do this, e-mail him or find him in lab, and he will help you do this. It's an honest to goodness, good idea.

Editors
A word about editors. I am not going to write too much about them, as a user of vim I am partial towards it, and being impartial in these matters is hard. There are two main editors which have been used by various programmers down the ages, vim, and emacs. In past years people have also used Eclipse (should be in your path, ask Itay for help if you can't find it. Eclipse is a genuinely nice editor, and has a lot of really nice tools, but also comes at the cost of being somewhat slow and needing getting used to. There are tons of other editors out there that you can use, just get used to one, and learn how to use it well. Since this seems to be a common enough questions, I am going to give pointers on turing syntax highlighting on for vim and emacs.

  • vim: Add the line syntax enable to .vimrc in your home directory. If you do not have a .vimrc file, create one. While we are on the subject of editing .vimrc, you might want to change colors, vim.org has a whole bunch you can download, I am partial to inkpot which is fairly awesome.
  • emacs/xemacs: Follow the process for XEmacs (init.el is located in the .xemacs folder in your home directory, if it doesn't exist, create a new one), and Emacs . I am sorry for only providing links, I haven't done this too often.

If anything else appears, I'll update this to have them appear.