[uClinux-dev] Debugging 2.6 kernel & applications

David McCullough davidm at snapgear.com
Tue Jan 31 18:04:01 EST 2006


Jivin Wilson Callan lays it down ...
> 
> this is still an open issue for me.  david's article says to lookup  
> _current_task in the 2.4 kernel, but doesnt say what to use in 2.6.   
> how do find out where the program is running using the 2.6 kernel?


IIRC it's trickier on 2.6,  the task structure is based off the stack
pointer while in the kernel.  You need to take the stack pointer, round
down to the nearest 8k boundary (depending on configuration),  that
should give you the task structure (if it's still called that ;-)

Cheers,
Davidm

> On Jan 16, 2006, at 6:45 PM, David McCullough wrote:
> 
> >
> >Jivin Wilson Callan lays it down ...
> >>hi, about the article david referenced...  how would the "Debugging
> >>Kernel and Applications together" be updated for the 2.6.x kernel?
> >>How do you find where to load the symbols?
> >
> >Because run the debugger on the kernel,  it already knows.  The kernel
> >contains it's symbols and addresses.
> >
> >Applications are the hard ones,  but the same approach should work for
> >both 2.6 and 2.4,  the apps aren't really any different.
> >
> >Cheers,
> >Davidm
> >
> >>On Jan 16, 2006, at 6:09 PM, David McCullough wrote:
> >>
> >>>Should be basically the same as a C program,  just harder to
> >>>follow :-)
> >>>
> >>>If you are using coldfire/m68k (and even if not):
> >>>
> >>>	http://www.ucdot.org/article.pl?sid=03/01/30/0548223
> >>>
> >>>Otherwise we may need some more info to help,
> >>>
> >>>Cheers,
> >>>Davidm
> 

> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org

-- 
David McCullough, davidm at cyberguard.com.au, Custom Embedded Solutions + Security
Ph:+61 734352815 Fx:+61 738913630 http://www.uCdot.org http://www.cyberguard.com



More information about the uClinux-dev mailing list