【问题标题】:GDB - Display AddressesGDB - 显示地址
【发布时间】:2015-09-24 13:43:34
【问题描述】:

在gdb中查看的一段代码如下:

0x8e4e <boot1main+1>:   mov    %esp,%ebp
0x8e50 <boot1main+3>:   push   %esi
0x8e51 <boot1main+4>:   mov    0xc(%ebp),%esi
0x8e54 <boot1main+7>:   push   %ebx
0x8e55 <boot1main+8>:   mov    0x10(%ebp),%ebx
0x8e58 <boot1main+11>:  sub    $0xc,%esp
0x8e5b <boot1main+14>:  push   $0x3
0x8e5d <boot1main+16>:  call   0x8bb6 <roll>
0x8e62 <boot1main+21>:  movl   $0x8f84,(%esp)
0x8e69 <boot1main+28>:  call   0x8b77 <putline>

左边地址的确切含义是什么?这些是装配说明在机器上的位置吗? (即 0x8e4e、0x8e50)。

上面的代码是在没有设置虚拟内存的情况下生成的。事实上,它代表了我正在跟踪的一些引导加载程序代码。

对于一个普通的 C 程序,左边的那些地址是虚拟地址吗?

【问题讨论】:

    标签: c memory assembly gdb disassembly


    【解决方案1】:

    是的,这就是您正在查看的代码的地址。是的,对于“正确”操作系统上的普通 C 程序,地址将是虚拟的。

    【讨论】:

      猜你喜欢
      • 2021-04-28
      • 2015-12-22
      • 2020-10-31
      • 2013-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-06
      相关资源
      最近更新 更多