-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jinhui Li wrote: > I am browsing the source code. And want to debug it to figure out how it > works. > > So, somebody please tell me how to debug ( with GDB ) or where can I > find information that I need.
IMO, GDB is a great tool for diagnosing a particular problem one encounters with a program; it's not all that terribly useful for actually understanding the code itself, though. I find it much quicker to read through the code using a powerful viewer or editor, and making use of tools such as cscope and ctags. The best editors, such as Vim and Emacs, are integrated these tools, and so a simple control-click or key combination can bring up the definition of the function being called or the variable being referenced, or (in the case of cscope) the list of places where a particular function is being called, etc. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer. GNU Maintainer: wget, screen, teseq http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIvcPD7M8hyUobTrERAsCEAJ9oQDJWzD/OPAvzvgJorlByd4YqyACfdLM1 GmQUVu/xnQ7HOr493hiWG28= =0XwB -----END PGP SIGNATURE-----