打印从GDB中的Register指向的字符串

use*_*165 14 c gdb

我有一个字符串被移动,我想根据寄存器打印它.

我做了以下事情:

gdb x $esp
0xbffff110:  "\274\205\004\b\324\361\377\277\334\361\377\277]\257\344\267\304s\374\267"

{then I copied the address}

>> x *0xbffff110
0x80485bc <__dso_handle+12>:     "test1"
Run Code Online (Sandbox Code Playgroud)

有没有办法一步到位?

Emp*_*ian 19

有没有办法一步到位?

 (gdb) print *(char**)$esp
Run Code Online (Sandbox Code Playgroud)