我正在尝试在SASM中调试程序集的宏代码。
这是我正在使用的代码,但是当我在代码的宏部分中将断点设置为任何地方时,它会引发错误:
unknown register: Note:
unknown register: Breakpoint
这是我正在运行的代码,不知道我如何在SASM的宏部分中调试
%include "io.inc"
; A macro with two parameters
; Implements the write system call
%macro write_string 2
mov eax, 4
mov ebx, 1
mov ecx, %1
mov edx, %2
int 80h
%endmacro
section .text
global CMAIN
CMAIN:
mov rbp, rsp; for correct debugging
write_string msg1, len1
write_string msg2, len2
write_string msg3, len3
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg1 db 'Hello, programmers!',0xA,0xD
len1 equ $ - msg1
msg2 db 'Welcome to the world of,', 0xA,0xD
len2 equ $- msg2
msg3 db 'Linux assembly programming! '
len3 equ $- msg3