744 Part VI . Programming in (Bulletproof web design) Linux Finally,
Tuesday, December 18th, 2007744 Part VI . Programming in Linux Finally, if you totally botch all of your changes to your working files and want to revert to the most recent versions, use the update command. It updates the specified directory with the most recent versions stored in the repository, as shown in the following example: $ cd ~/projects/newhello $ cvs update . cvs udate: Updating . U showit.c U msg.c U hello.c There s much more to CVS than the few examples presented here. For additional information, visit the CVS home page on the Web at www.cvshome.org. Debugging with GDB Software is buggy, and some programs have more bugs than other programs. While debugging sessions will never be aggravation-free, GDB s advanced features lighten the load and enable you to be more productive in squashing bugs. Time and effort invested in learning GDB is well spent if you can track down and fix a serious bug in just a few minutes. GDB can make this happen. Most of what you will need to accomplish with GDB can be done with a surprisingly small set of commands. The rest of this chapter explores GDB features and shows you enough GDB commands to get you going. Effective debugging requires that your source code be compiled with -g option to create a binary with an extended symbol table. For example, the following command: $ gcc -g file1 file2 -o prog causes prog to be created with debugging symbols in its symbol table. If you want, you can use GCC s -ggdb option to generate still more (GDB-specific) debugging information. However, to work most effectively, this option requires that you have access to the source code for every library against which you link. While this can be very useful in certain situations, it can also be expensive in terms of disk space. In most cases, you can get by with the plain -g option. Starting GDB To start a debugging session, simply type gdb progname, replacing progname with the name of the program you want to debug. Using a core file is optional but will enhance GDB s debugging capabilities. Of course, you ll need a program on which to try out GDB debugging, so Listing 28-5 provides one: debugme.c.
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.