Re: debugging the kernel with gdb

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

 



On Mon, 19 Feb 2007, Srdjan Todorovic wrote:

> Hi Robert,
>
> On Mon, 19 Feb 2007, Robert P. J. Day wrote:
>
> >   a quick question regarding debugging the currently-running kernel
> > with gdb.  after compiling the kernel with debugging info and
> > rebooting, i started the debugger with:
> >
> >   # gdb vmlinux /proc/kcore
> >
> > and, as a test, tried:
> >
> >   (gdb) print jiffies
> >
> > what i got printed was a *negative* number, which struck me as odd
> > -- it was around -150000.  it took only a few minutes for that to
> > finally click over zero and become positive but is there some
> > reason that the number of jiffies since boot time would display as
> > negative, at least temporarily?
>
> >From Understanding the Linux Kernel, 3rd edition, page 234, it says
> >that

> jiffies is initialised to -300000. The jiffies variable overflow
> would then occur in 5 minutes since kernel boot time. It says this
> was intentional, so that buggy kernels could be spotted soon after
> booting.

great, thanks.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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