GNU Binutils - readelf & objdump
objdump
is the mother of all binary tools.
readelf
subsumes the functionality of size
and nm
.
objcopy
contains most of the functionality of strip
.
objdump
is the mother of all binary tools.
readelf
subsumes the functionality of size
and nm
.
objcopy
contains most of the functionality of strip
.
Directives are used mainly to define symbols, allocate storage, and control the behavior of the assembler. Directives allow the programmer to control how the assembler does its job.
How to compile/generate AArch32 code and run on an Linux/AArch64?
How to build AArch64-ELF for a popular embedded target board under Windows/x86_64 or macOS/arm64?
Vanilla GDB in its raw form has a rather uninformative interface and its syntax is arcane and difficult to approach. It sucks in terms of user experience and is terrible to use for reverse engineering and exploit development.
To make debugging easier and more productive, there are extensions for GDB such as GEF
, pwndbg
that provide a more informative view and additional commands.
This article involves the following topics:
在调试程序时,中断程序的运行是必须的。GDB 可以方便地暂停/继续程序的运行。
通过设置断点,可以决定程序在哪行,在什么条件下,或者在收到什么信号时暂停,以便查验程序运行的流程和状态。
程序暂停后,我们可以通过相关命令控制程序继续运行到下一个预设的中断点,在这种“暂停-继续”往复中调试验证程序设计的正确性。
Invocation (Debugging with GDB)
This article discusses how to start GDB, and how to get out of it.
gdb
to start GDB.file
to change and load debugging FILE.info
/list
to show info/src about the program.run
command to start your program under GDB.start
command to start debugging and to stop at main.quit
, exit
or ctrl+d to exit GDB console.