GDB Notes
CompileThis will compile in debug mode and include symbolsgcc -ggdb cprog.c -o cprogLoad exec in gd 0001-1-1 08:0:0 Author: techvomit.net(查看原文) 阅读量:0 收藏

Compile

This will compile in debug mode and include symbols

gcc -ggdb cprog.c -o cprog

Load exec in gdb

Set breakpoint on main

Show instructions for main function

Show all functions

Show all variables

This will only work if the program is compiled in debug mode (with symbols)

List breakpoints

Break on a specific memory address

Show register values

Show multiple register values

View value for a particular register

String value:

Int value:

Restart program

Delete breakpoint

View multiple lines from $esp

Step line-by-line


文章来源: https://techvomit.net/gdb-notes/
如有侵权请联系:admin#unsafe.sh