LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Debug init(userspace) on Qemu using gdb ! (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/debug-init-userspace-on-qemu-using-gdb-4175460383/)

samurai37 05-02-2013 12:18 AM

Debug init(userspace) on Qemu using gdb !
 
Hi ! i am trying to emulate cavium octeon's mips64 linux kernel on Qemu.I am currently having some issues with in userspace in init code and want to debug init.i am starting the Qemu using -s -S option in the command line and running the gdb using command

ddd --debugger /OCTEON-SDK/tools/bin/mips64-octeon-linux-gnu-gdb /OCTEON-SDK/linux/kernel_2.6/linux/vmlinux

and then attaching the gdb with command

target remote localhost:1234

The gdb is currently showing only the instructions running in kernel space.

What i want to ask is there any method by which i can debug the init code in userspace and libraries instructions step by step as in case of kernel space? For example if printf is issued from init then i want to see that which instructions are being executed in the libraries and how the control is returned to kernel ?


All times are GMT -5. The time now is 11:03 PM.