linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How provoke call stack trace
@ 2003-11-03 18:38 Ihar 'Philips' Filipau
  2003-11-03 18:45 ` Michael Buesch
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ihar 'Philips' Filipau @ 2003-11-03 18:38 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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?

-- 
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           |*|*|*|


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How provoke call stack trace
  2003-11-03 18:38 How provoke call stack trace Ihar 'Philips' Filipau
@ 2003-11-03 18:45 ` Michael Buesch
  2003-11-03 18:51 ` Roland Dreier
  2003-11-03 18:53 ` Muli Ben-Yehuda
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Buesch @ 2003-11-03 18:45 UTC (permalink / raw)
  To: Ihar 'Philips' Filipau; +Cc: linux kernel mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 03 November 2003 19:38, Ihar 'Philips' Filipau wrote:
> 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-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How provoke call stack trace
  2003-11-03 18:38 How provoke call stack trace Ihar 'Philips' Filipau
  2003-11-03 18:45 ` Michael Buesch
@ 2003-11-03 18:51 ` Roland Dreier
  2003-11-03 18:53 ` Muli Ben-Yehuda
  2 siblings, 0 replies; 6+ messages in thread
From: Roland Dreier @ 2003-11-03 18:51 UTC (permalink / raw)
  To: Ihar 'Philips' Filipau; +Cc: Linux Kernel Mailing List

    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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How provoke call stack trace
  2003-11-03 18:38 How provoke call stack trace Ihar 'Philips' Filipau
  2003-11-03 18:45 ` Michael Buesch
  2003-11-03 18:51 ` Roland Dreier
@ 2003-11-03 18:53 ` Muli Ben-Yehuda
  2003-11-03 20:24   ` Ihar 'Philips' Filipau
  2 siblings, 1 reply; 6+ messages in thread
From: Muli Ben-Yehuda @ 2003-11-03 18:53 UTC (permalink / raw)
  To: Ihar 'Philips' Filipau; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

On Mon, Nov 03, 2003 at 07:38:39PM +0100, Ihar 'Philips' Filipau wrote:

>    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 
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

"the nucleus of linux oscillates my world" - gccbot@#offtopic


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How provoke call stack trace
  2003-11-03 18:53 ` Muli Ben-Yehuda
@ 2003-11-03 20:24   ` Ihar 'Philips' Filipau
  0 siblings, 0 replies; 6+ messages in thread
From: Ihar 'Philips' Filipau @ 2003-11-03 20:24 UTC (permalink / raw)
  To: Muli Ben-Yehuda; +Cc: Linux Kernel Mailing List

Muli Ben-Yehuda wrote:
> On Mon, Nov 03, 2003 at 07:38:39PM +0100, Ihar 'Philips' Filipau wrote:
> 
> 
>>   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. ]

-- 
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           |*|*|*|


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How provoke call stack trace
       [not found] <NRWh.pL.3@gated-at.bofh.it>
@ 2003-11-03 19:32 ` Ihar 'Philips' Filipau
  0 siblings, 0 replies; 6+ messages in thread
From: Ihar 'Philips' Filipau @ 2003-11-03 19:32 UTC (permalink / raw)
  To: Linux Kernel Mailing List


   Thanks to every one!
   Already looking into the source code.

P.S.
   But it looks like ppc (as of 2.4.22) doesn't implement it.
   But still BUG() on ppc prints stack trace... I'm just no specialist 
in cpu exception handling. especially on ppc :-(

Ihar 'Philips' Filipau wrote:
> 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?
> 

-- 
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           |*|*|*|


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-11-03 20:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-03 18:38 How provoke call stack trace Ihar 'Philips' Filipau
2003-11-03 18:45 ` Michael Buesch
2003-11-03 18:51 ` Roland Dreier
2003-11-03 18:53 ` Muli Ben-Yehuda
2003-11-03 20:24   ` Ihar 'Philips' Filipau
     [not found] <NRWh.pL.3@gated-at.bofh.it>
2003-11-03 19:32 ` Ihar 'Philips' Filipau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).