Can't see function parameters using GDB
Posted: Sat Jul 02, 2016 9:58 am
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:
I searched but I didn't find anything.
Here are the flags I'm using:
And I connect to QEMU with GDB by using this command:
Thank you for you help.
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: Select all
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) {
Here are the flags I'm using:
- gcc (compiler and linker): -ffreestanding -Ikernel/include -Wall -Wextra -std=gnu99 -g -nostdlib
- as: -g
Code: Select all
qemu-system-i386 -kernel kernel/kernel-debug -s -S
Code: Select all
gdb -ex "target remote localhost:1234" kernel/kernel-debug