Hello,
I'm using GDB to debug my kernel with QEMU.
It works well but I can't see the function parameters.
It outputs the following for example:
Code:
Breakpoint 3, memsetw (
dest=<error reading variable: can't compute CFA for this frame>,
val=<error reading variable: can't compute CFA for this frame>,
count=<error reading variable: can't compute CFA for this frame>)
at kernel/memory.c:26
26 uint16_t *memsetw(uint16_t *dest, uint16_t val, size_t count) {
I searched but I didn't find anything.
Here are the flags I'm using:
- gcc (compiler and linker): -ffreestanding -Ikernel/include -Wall -Wextra -std=gnu99 -g -nostdlib
- as: -g
Then I use the following command to start QEMU:
Code:
qemu-system-i386 -kernel kernel/kernel-debug -s -S
And I connect to QEMU with GDB by using this command:
Code:
gdb -ex "target remote localhost:1234" kernel/kernel-debug
Thank you for you help.