繁体   English   中英

Emacs gdb - 调试程序集时显示箭头

[英]Emacs gdb - display arrow when debugging assembly

我正在尝试使用gdb和Emacs调试汇编程序。 我的问题是,当我尝试逐步调试时,它不会在当前执行行显示指针箭头。 我正在尝试调试的代码是:

SECTION .data               ; Section containing initialised data

    EatMsg: db "Eat at Joe's!",10
    EatLen: equ $-EatMsg    

SECTION .bss            ; Section containing uninitialized data 

SECTION .text           ; Section containing code

global  _start          ; Linker needs this to find the entry point!

_start:
    nop         ; This no-op keeps gdb happy...
    mov eax,4       ; Specify sys_write call
    mov ebx,1       ; Specify File Descriptor 1: Standard Output
    mov ecx,EatMsg      ; Pass offset of the message
    mov edx,EatLen      ; Pass the length of the message
    int 80H         ; Make kernel call

    MOV eax,1       ; Code for Exit Syscall
    mov ebx,0       ; Return a code of zero 
    int 80H         ; Make kernel call

我正在编译这些行:

    nasm -f elf -g -F stabs eatsyscall.asm -l eatsyscall.lst
    ld -melf_i386 -o eatsyscall eatsyscall.o

我在Emacs中看到的是那个。 在这个截图中,我正在断点之后执行该行,并且没有指向该行的指针。 有可能有吗? 截图

首先,我希望你还在寻找解决方案,已经有2年了! 如果你是,那么尝试哄骗nasm用DWARF而不是STAB生成调试信息,即以下内容

nasm -f elf -g -F dwarf eatsyscall.asm ...

这似乎适合我(TM)

尝试下载nasm2.5或最新的,它应该工作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM