Skip to contentSkip to conversation

How provoke call stack trace

DISCUSSION Ihar 'Philips' Filipau 4 participants 5 messages Nov 3, 2003

lore
Share & tools
lore
#0 lore raw

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           |*|*|*|
#1 lore raw

-----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 without asm(".long 0") as BUG() does.

Maybe
dump_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-----

#3 lore raw
In reply to Ihar 'Philips' Filipau
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
#4 lore raw
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, investigate show_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 no
dump_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           |*|*|*|