我们是否有等效的“信息本地人”以十六进制形式转储本地变量?
(gdb) info locals
sa = 33554433
dp = 16
pr = 6
da = 67108865
sp = 16
答案 0 :(得分:1)
您想要set output-radix 16。示例:
Temporary breakpoint 1, main () at t.c:3
3 int a = 12, b = 42;
(gdb) n
4 return a + b;
(gdb) info locals
a = 12
b = 42
(gdb) set output-radix 16
Output radix now set to decimal 16, hex 10, octal 20.
(gdb) info locals
a = 0xc
b = 0x2a