如何在 kdbg 中处理用户 input/output(测试汇编代码)?

How to handle user input/output in kdbg (testing assembly code)?

读取宏:

%macro read 2
  mov rax, 0  
  mov rdi, 0  
  mov rsi, %1 
  mov rdx, %2 i
  syscall
%endmacro

编写宏:

%macro write 2
  mov rax, 1  
  mov rdi, 0  
  mov rsi, %1 
  mov rdx, %2
  syscall
%endmacro

我正在尝试使用 kdbg 测试我的程序,但我不确定如何输入某些内容,因为 kdbg 甚至没有提示我这样做,并转到输出 window 当我尝试向 stdout 写入内容时,没有显示任何内容,查看我的输出或从 stddin 输入内容的正确方法是什么?

要启用交互式输入,您必须使用外部终端window。进入设置->本程序,切换到输出部分,启用完整终端仿真。您必须重新加载程序。 (它将是 文件 -> 最近的可执行文件 中的最顶层条目。)