相关疑难解决方法(0)

基于qemu的低级调试

我将在ARM体系结构上测试一些低级代码.通常实验板上的实验非常复杂,所以我在想QEMU.

我想得到的是某种调试信息,如printfs或gdb.我知道这对于linux很简单,因为它实现了QEMU Integrator的设备驱动程序和gdb功能,但我不使用Linux.我还怀疑从Linux内核源代码中提取这种功能会很复杂.

我正在从一些已经实现其中一个功能的简单操作系统中搜索.你有什么建议吗?

embedded debugging gdb arm qemu

13
推荐指数
1
解决办法
8549
查看次数

如何在16位模式下使用GDB?

我有以下代码,我试图实现一个使用BIOS函数打印字符串的函数:

int printString(char* string)
{
 int i = 0;
 while (*(string + i) != '\0')
   {
    char al = *(string + i);
    char ah = 0xe;
    int ax = ah * 256 + al;
    interrupt(0x10,ax,0,0,0);
    i++;
   }
 return i;
}
Run Code Online (Sandbox Code Playgroud)

函数中断在汇编中实现.它调用适当的BIOS中断,如第一个参数所给出的,其余参数分别包含ax,bx,cx和dx寄存器的内容:

.global _interrupt
_interrupt:
push bp
mov bp, sp
push si
push ds
mov ax, #0x100
mov ds, ax
mov ax, [bp + 0x4]
mov si, #intr
mov [si + 1], al
pop ds
mov ax, [bp + 0x6]
mov …
Run Code Online (Sandbox Code Playgroud)

c x86 assembly gdb

4
推荐指数
2
解决办法
2879
查看次数

标签 统计

gdb ×2

arm ×1

assembly ×1

c ×1

debugging ×1

embedded ×1

qemu ×1

x86 ×1