Hello Dave,
Thanks for the tips. I'll try it.
I wrote a kernel module that crash the kernel after a timeout elapsing
by writing at 0xFFFFFFFF.
It seems that the 'bt -f' that I used to analyze the crash displays the
pt_regs structure provided by error_code() splitted over 2 consecutive
frames.
That's why I wanted to cross-check with a 'raw' dump.
Regards,
Patrick
Le 06/12/2013 14:57, Dave Anderson a écrit :
----- Original Message -----
> Hello,
>
> We wish to call 'crash' with a script file to automate some basic
> command and output the result on a text file.
>
> This works perfectly for basic commands such as bt, log, mod and so on,
> especially when no input data is required.
>
> We try now to dump the kernel stack through a 'rd <@> <size>'.
> My problem is to "extract" this <@> and to "input" it in
this 'rd' command.
You can dump the full kernel stack with "bt -r", although it does make
symbolic translations if possible. Perhaps that doesn't satisfy your
requirements?
> For the moment, I'm able to get the task_struct * with following command :
> ps | grep '>' | awk '{ print $5 };'
>
> From that, the pointer of the thread_info would be available through
> (task_struct *)->stack.
The "set" command, also available from "foreach", shows shows the
thread_info
pointer, although if you run it through a script you would have to strip the
brackets from the display.
> But how to get all these together to finally ouptut a valid 'rd' command ?
> Meaby another way to get this kernel stack dump would exist ?
>
> Any help would be appreciate.
> Regards,
> Patrick Agrain
>
> --
> Crash-utility mailing list
> Crash-utility(a)redhat.com
>
https://www.redhat.com/mailman/listinfo/crash-utility
>
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility