OSDev.org

The Place to Start for Operating System Developers
It is currently Mon May 20, 2024 1:34 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Can't see function parameters using GDB
PostPosted: Sat Jul 02, 2016 9:58 am 
Offline

Joined: Mon Aug 24, 2015 7:37 am
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group