Posts

Showing posts from February, 2021

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

Useful Screen Commands for Linux

 screen commands; 1) screen -S name ---> New screen creation 2) screen -dr Existing_name  ---> open already existing screen 3) screen -x Existing_name  ----> same screen to open in multiple machine 4) ctrl A + shift H ----> for screen log,log file can be seen in /root path in the name of screenLog.* 5) ctrl A + shift H ---->Remove screen log if already there. 6) Ctrl A + shift A ----> To name the bash 7) Fn F1 ---> Move left of bash in screen. 8) Fn f2 ---> Move Right of bash in screen.