How provoke call stack trace
Hello All!
[ Simple question. Probably FAQ - but I cannot find it. ]
How can I print call stack trace, just like BUG() does? But without asm(".long 0") as BUG() does.
Is there any function which can be used by module to just
investigate some given call path?
Signature · 5 lines
Ihar 'Philips' Filipau / with best regards from Saarbruecken.
-- _ _ _
"... and for $64000 question, could you get yourself |_|*|_|
vaguely familiar with the notion of on-topic posting?" |_|_|*|
-- Al Viro @ LKML |*|*|*|-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · Ihar 'Philips' Filipau
Hello All!
[ Simple question. Probably FAQ - but I cannot find it. ]
How can I print call stack trace, just like
BUG()does? But withoutasm(".long 0")asBUG()does.
Maybedump_stack();
is what you're searching for?
- --
Regards Michael Buesch [ http://www.tuxsoft.de.vu ] -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/pqI9oxoigfggmSgRAscBAJ4ndlnDWL0557Jv5oE6Iawue4SEZACbBRHU W3QGnBNgazObL2bEedaEe3A=
=FJMu
-----END PGP SIGNATURE-----
Ihar> Is there any function which can be used by module to Ihar> just investigate some given call path?
Try dump_stack() (declared in <linux/kernel.h>).
- Roland
Quoted 2 lines · Ihar 'Philips' Filipau
Is there any function which can be used by module to just
investigate some given call path?
Assuming 2.6, call dump_stack(). If you want greater flexibility, investigate show_trace() and friends.
Hope this helps,
Muli
Signature · 4 lines
Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ "the nucleus of linux oscillates my world" - gccbot@#offtopic
Quoted 11 lines · Muli Ben-Yehuda
Quoted 2 lines · Ihar 'Philips' Filipau
Is there any function which can be used by module to just
investigate some given call path?Assuming 2.6, call
dump_stack(). If you want greater flexibility, investigateshow_trace()and friends.Hope this helps,
I'm sitting right now on 2.4.22 - so no 2.6 nicities.
I actually wanted to have something like this on ppc - but ppc has nodump_stack() implemented.
Thanks any way.
[ Just checked 2.6 - ppc has dump_stack() now. Nice. It looks like
all archs have implemented it in 2.6. Cool. ]
Signature · 5 lines
Ihar 'Philips' Filipau / with best regards from Saarbruecken.
-- _ _ _
"... and for $64000 question, could you get yourself |_|*|_|
vaguely familiar with the notion of on-topic posting?" |_|_|*|
-- Al Viro @ LKML |*|*|*|