GDB Examine(x) Command 命令

GDB Examine(x) Command 命令

用途 打印出对应内存地址的内容。可以用来查看程序中相对应变量的值,还可以调试一些库文件。 X命令打印出的格式 x /nfu <address> Print Memory n: How many units to print f: Format charracter (like print)

用途

打印出对应内存地址的内容。可以用来查看程序中相对应变量的值,还可以调试一些库文件。

X命令打印出的格式

x /nfu <address>
	Print Memory
	n: How many units to print
	f: Format charracter (like print)
	u: Unit
Unit is one of:
	b: Byte
	h: Half-word (two bytes)
	w: Word (four bytes)
	g: Giant word (eight bytes)

8. GDB Examine(x) Command 命令-20240621215810685.webp

此处:
x为命令,
/17cb为参数,17表示有 17 个单元(Unit),c表示字符,b表示每个单元占 1 Byte。
$3为引用地址。

Comment