problem in using gdb

while using gdb for a big code having various module i face a lot of problem . how to use it.
What do you want to do?
when debugging larrge codes having various modules i am not able to link the m and understand whats happening
I don't really understand. Are you saying you can't step thru the code?
yes ,
Last edited on
1. Build your code for debug.

2. Pass it to gdb the command line.
gdb ./prog

3. Set a break point:
break main

4. Start the app with args, it'll stop at the break point:
run arg1 arg2

5a: Step into functions with:
step

5b: Step over functions with:
next

6. View variables with:
print varname

7. Look at the call stack with backtrace:
bt

That's plenty to begin with.
thanks
closed account (D4S8vCM9)
On Linux you can use DDD (data display debugger), a frontend for gdb: http://www.gnu.org/software/ddd/
Topic archived. No new replies allowed.