Following source files with gdb/xxgdb

Hello folks,

I haven't used C and the debuggers in a long time, and I'm currently in a project where I need to do some debugging. I have an application written in C and some .a libs which have functions called by the program. I need to be able to follow each function which is called no matter which file it is in. For example, when I start the main program and have its source file in my xxgdb window, when I get to a function call which is in some other file or even the library, I want either the particular source file the function is in to appear in the source window so I can follow it, or I can manually open the relevant source file myself, as long as the debugger can follow it.

How can I do this, if possible? I am going to compile all the C files with gcc -g, including the files used to make the .a libs with ar. I'd appreciate some prompt assistance here. Thanks.

Salman