打印字符串指出,从注册在GDB [英] Printing string pointed to from Register in GDB
本文介绍了打印字符串指出,从注册在GDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有被移动的字符串,我想基于寄存器的打印。
我做了以下内容:
gdb的X $ ESP
0xbffff110:\\ 274 \\ 205 \\ 004 \\ B \\ 324 \\ 361 \\ 377 \\ 277 \\ 334 \\ 361 \\ 377 \\ 277] \\ 257 \\ 344 \\ 267 \\ 304S \\ 374 \\ 267{然后,我复制的地址}>> X * 0xbffff110
0x80485bc< __ dso_handle + 12计算值:测试1
有没有办法一步到位做到这一点?
解决方案
有没有办法一步到位做到这一点?
块引用>(GDB)打印*(字符**)$ ESP
I have a string being moved and i want to print it based on the register.
I did the following:
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"
Is there any way to do this in one step?
解决方案Is there any way to do this in one step?
(gdb) print *(char**)$esp
这篇关于打印字符串指出,从注册在GDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文