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:

5b: Step over functions with:

6. View variables with:
print varname

7. Look at the call stack with backtrace:

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