Emacs gdb - show arrow when debugging assembly

I am trying to debug the build program using gdb and Emacs. My problem is that when trying to debug step-by-step, it does not display a pointer arrow on the current line of execution. The code I'm trying to debug is as follows:

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

and I compile these lines:

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

What I see in Emacs is this. In this screenshot, I draw a line after the breakpoint, and the pointer to this line does not appear. Is it possible? screenshot

+5
source share
2 answers

First of all, I hope that you are still looking for a solution, 2 years have passed already! if you are, then try to persuade nasm to generate debugging information using DWARF instead of STAB ie the following

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

, , (TM)

+1

nasm2.5 ,

0

All Articles