Re: Any successful story of debugging linux 4.13 with qemu 2.10 and gdb 8.01?

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

 



On Wed, Sep 20, 2017 at 09:29:17PM +0200, jjDaNiMoTh wrote:
> On 20/09/17 at 11:20am, 慕冬亮 wrote:
> > 2017-09-20 4:18 GMT-04:00 jjDaNiMoTh <jjdanimoth@xxxxxxxxx>:
> > > Hello all,
> > >
> > > As the title says, any of you have successfully tried to debug Linux
> > > 4.13 with QEMU?
> 
> > I encountered this problem in my debian testing. Any "break" or
> > "hbreak" point is not triggered
> > even if I set breakpoint at "start_kernel".
> [cut]
> 
> So, after two weeks of a headache I took the courage to send an email
> here, and after only 3 hours after the email (!!!) I found the cause of
> the problem.
> 
> Without being too long, the problem is KALSR. You have to disable it
> disabling the kernel option "Randomize the address of the kernel image (KASLR)",
> inside Processor type and features. In this way, gdb can translate
> all the symbols correctly (symbols <-> addresses).
> 
> I really don't know how the developers test their code... because there
> is no evidence for this.

Why do you think that it requires developers to use a debugger and qemu
to test their code?  I've never used a debugger on the kernel in all of
my years of kernel development...

Glad you found a solution and posted it.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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