GDB commands for Easy Debugging
GDB commands:
1) b function_name ----> breakpoint for that function,
2) p variable_name ----> To print a variable in Gdb
3) bt -----> backtrace of that function
4) for slient breakpoint[image doesn't stop even breakpoint gets hit]
command Breakpoint_Num[like 1,2,3,etc]
<we can print variable>
<we can give bt command>
c ---> continue
end ---> end of slient break point
5) set pagination off ----> this will help once bt is very long
6) conditional breakpoint,
b function_name if variable == value
breakpoint will hit only when that variable name is equal to that value
7) b filename:line_number ----> line breakpoint,gets hit once that line gets hit
Comments
Post a Comment