Fwd: How to set up a debugging environment.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Cheers !!!
Chaitannya

follow me on twitter http://twitter.com/chaitannya
--
I believe there's a hero in all of us who keeps us honest, gives us strength, makes us noble, and finally allows us to die with pride, even though sometimes we have to be steady, and give up the thing we want the most... even our dreams.
- Spider Man 2


---------- Forwarded message ----------
From: become who you are born to be.... Chaitannya mahatme <chaitannya@xxxxxxxxx>
Date: Mon, Mar 8, 2010 at 1:13 PM
Subject: Re: How to set up a debugging environment.
To: Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>


Hi ,

Actually after a few hours of trying I figured out this, but got this error message "During startup program terminated with signal SIGKILL."

Can some please explain me what has to be done.
Also 1 more thing, I have heard that kgdb has been a part of mainline kernel. If so how to validate that?

Wanted to put this on the forum yesterday itself, but was too tired.

Cheers !!!
Chaitannya

follow me on twitter http://twitter.com/chaitannya
--
I believe there's a hero in all of us who keeps us honest, gives us strength, makes us noble, and finally allows us to die with pride, even though sometimes we have to be steady, and give up the thing we want the most... even our dreams.
- Spider Man 2


On Mon, Mar 8, 2010 at 8:09 AM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi

On Mon, Mar 8, 2010 at 2:44 AM, become who you are born to be....
Chaitannya mahatme <chaitannya@xxxxxxxxx> wrote:
> I thought all is set well, since I didn't get any errors until this point.
> When I ran qemu -s -kernel bzImage qemu.img, it started a qemu terminal.
> Showed the version of the linux and a message, booting linux. After that
> there is nothing. I haven't used any bootloader, but I feel with this
> command the kernel should boot without bootloader.

It has been a long time since I used kgdb (just for my personal
testing). So I'll try to recall at my best, but no guarantee:

Usually in kgdb, you need to tell in which serial port you want to
accept serial gdb connection. But since this is Qemu, no need to do
that AFAIK. Just use -S to stop CPU at initial Qemu system init. It
will give you time to hook gdb to the running kernel (the one you run
as -kernel argument).

Then simply run gdb, give your vmlinux as the symbol file, then attach
to localhost port 1234 (this port is mentioned in qemu man page) e.g:
(gdb) attach localhost 1234

then you're set. After you're done debugging, just do:
(gdb) detach

Good luck and have fun... :)

--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux