Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 不同的gdb寄存器名_C_Assembly_Gdb_Cpu Registers - Fatal编程技术网

C 不同的gdb寄存器名

C 不同的gdb寄存器名,c,assembly,gdb,cpu-registers,C,Assembly,Gdb,Cpu Registers,我在学习汇编程序,这是我的问题 当我使用gdb时,我会看到具有以下名称的寄存器: Dump of assembler code for function return_input: 0x000000000040053d <+0>: push %rbp 0x000000000040053e <+1>: mov %rsp,%rbp 0x0000000000400541 <+4>: sub $0x20,%rsp 0x000000

我在学习汇编程序,这是我的问题

当我使用gdb时,我会看到具有以下名称的寄存器:

 Dump of assembler code for function return_input:
 0x000000000040053d <+0>:   push   %rbp
 0x000000000040053e <+1>:   mov    %rsp,%rbp
 0x0000000000400541 <+4>:   sub    $0x20,%rsp
 0x0000000000400545 <+8>:   lea    -0x20(%rbp),%rax
 0x0000000000400549 <+12>:  mov    %rax,%rdi
 0x000000000040054c <+15>:  callq  0x400440 <gets@plt>
 0x0000000000400551 <+20>:  lea    -0x20(%rbp),%rax
 0x0000000000400555 <+24>:  mov    %rax,%rdi
 0x0000000000400558 <+27>:  callq  0x400410 <puts@plt>
 0x000000000040055d <+32>:  leaveq 
 0x000000000040055e <+33>:  retq   
 End of assembler dump.
但我想看看他们的名字:

(gdb) disas return_input
Dump of assembler code for function return_input:
0x080483c4 <return_input+0>:    push   %ebp
0x080483c5 <return_input+1>:    mov    %esp,%ebp
0x080483c7 <return_input+3>:    sub    $0x28,%esp
0x080483ca <return_input+6>:    lea    0xffffffe0(%ebp),%eax
0x080483cd <return_input+9>:    mov    %eax,(%esp)
0x080483d0 <return_input+12>:   call   0x80482c4 <_init+40>
0x080483d5 <return_input+17>:   lea    0xffffffe0(%ebp),%eax
0x080483d8 <return_input+20>:   mov    %eax,0x4(%esp)
0x080483dc <return_input+24>:   movl   $0x8048514,(%esp)
0x080483e3 <return_input+31>:   call   0x80482e4 <_init+72>
0x080483e8 <return_input+36>:   leave
0x080483e9 <return_input+37>:   ret
End of assembler dump.
我正在使用带有英特尔处理器的Arch Linux

名字的不同真的让我工作更辛苦了。
谢谢您的时间。

寄存器名称取决于体系结构和处理器位大小32或64位
您为其编译了代码并正在运行。您不能随意更改寄存器名称。

我想您看到的是64位系统。rax、rsp等是64位寄存器,eax、ebx是32位寄存器,谢谢。我有64位prpccesor,第二个示例来自32位。还有一个问题,我可以将-0x20更改为0xFFFFFF0吗?有可能吗?我不知道怎么做。问不同的问题,很多人会回答。