【问题标题】:Examining ASCII检查 ASCII
【发布时间】:2015-04-26 18:40:53
【问题描述】:

如何通过检查gdb 获得内存中十六进制值的ASCII 表示?

gdb 命令x/[repeatCount] [memoryAddress] 给了我从memoryAddressrepeatCount 次开始的十六进制32 位值,但我想要由该数据表示的可读文本/字符串。我怎么做? This 页面似乎没有说明。

例如,我通过检查得到以下信息:

0x41414141

我希望看到的是这样的:

AAAA

就像一个普通的Hex <-> ASCII converter

【问题讨论】:

    标签: c gdb ascii


    【解决方案1】:

    没关系,我需要将format letter s 用于String

    x/[repeatCount]s [memoryAddress]
    

    通过键入找到

    help x
    

    并阅读帮助文档。 <_>

    【讨论】:

      猜你喜欢
      • 2021-03-22
      • 1970-01-01
      • 2010-12-11
      • 2013-03-13
      • 1970-01-01
      • 2019-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多