Is there an api to print stack trace from within kernel driver?

Hi,
I have a requirement to print the stack trace from within the kernel driver
to know the
sequence of function call?

Is there any such api available in Windows?
If there is no api, is there a workaround to do the same?

Regards,
-Praveen


Take the whole responsibility on your own shoulders, and know
that you are the creator of your own destiny.

  • Swami Vivekananda

For user mode, check out StackWalk64 and friends:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
debug/base/stackwalk64.asp

Obviously the debugger api can do this for KM code, but I don’t know
of any preexisting APIs in the kernel.

-sd


Steve Dispensa
MVP - Windows DDK
kernelmustard.com

On Jan 30, 2006, at 3:07 AM, Praveen Kumar Amritaluru wrote:

Hi,
I have a requirement to print the stack trace from within the
kernel driver
to know the
sequence of function call?

Is there any such api available in Windows?
If there is no api, is there a workaround to do the same?

Regards,
-Praveen


Take the whole responsibility on your own shoulders, and know
that you are the creator of your own destiny.

  • Swami Vivekananda

You are currently subscribed to windbg as:
xxxxx@positivenetworks.net
To unsubscribe send a blank email to xxxxx@lists.osr.com

I use RtlCaptureStackBackTrace in my chk build driver to log call stack
in selected spots and use kd to dump records when my driver croaks.

Good luck,

Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-237541-
xxxxx@lists.osr.com] On Behalf Of Steve Dispensa
Sent: Monday, January 30, 2006 9:00 AM
To: Kernel Debugging Interest List
Subject: Re: [windbg] Is there an api to print stack trace from within
kernel driver?

For user mode, check out StackWalk64 and friends:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
debug/base/stackwalk64.asp

Obviously the debugger api can do this for KM code, but I don’t know
of any preexisting APIs in the kernel.

-sd


Steve Dispensa
MVP - Windows DDK
kernelmustard.com

On Jan 30, 2006, at 3:07 AM, Praveen Kumar Amritaluru wrote:

> Hi,
> I have a requirement to print the stack trace from within the
> kernel driver
> to know the
> sequence of function call?
>
> Is there any such api available in Windows?
> If there is no api, is there a workaround to do the same?
>
> Regards,
> -Praveen
>
> -----
> Take the whole responsibility on your own shoulders, and know
> that you are the creator of your own destiny.
> - Swami Vivekananda
>
>
>
> —
> You are currently subscribed to windbg as:
> xxxxx@positivenetworks.net
> To unsubscribe send a blank email to
xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@broadcom.com
To unsubscribe send a blank email to xxxxx@lists.osr.com