Re: How can I disable compile optimization in kernel for friendly debugging, Thanks

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

 



On 2018-04-20 17:44, Greg KH wrote:
[...]
> > > Second, modern gdb is perfectly able to deal with -O2 optimization,
> > > especially if you build with -g.  (In the kernel build, CONFIG_DEBUG_INFO=y
> > > will do the right thing for this).
> > 
> > I don't think so. According to my experience, GDB is not good enough to deal
> > with -O2 optimization.
> > 
> > Maybe my gdb is not modern enough? I am using gdb7.11 (Ubuntu 7.11.1-0ubuntu1~16.5)
> 
> That is an old version of gdb, why not try a more modern one?

Whoop, don't know that...

> Also, why do you even need to use a debugger on a kernel image?

no, usually printk is enough.

Yubin

_______________________________________________
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