Re: amd64 stack trace from kernel driver code
- From: don@xxxxxxxxx
- Date: Tue, 10 Mar 2009 15:11:56 -0700 (PDT)
On Mar 8, 9:54 am, "Don Burn" <b...@xxxxxxxxxxxxxxxxxxxx> wrote:
There is not one, and even on 32-bit you cannot rely on the model, since
there are alternative calling conventions. Why do you want this? There is
an ability through the /Gh and /GH compiler options to hook entry and exit
of a function in code you own and record a stack.
--
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"vjack3230" <vjack3...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A7F6458A-17FF-4799-972A-F891CBAE84A1@xxxxxxxxxxxxxxxx
From some point in the code of a 64 bit driver is it possible to obtain
the
call stack on an amd64 cpu. In debug mode on a 32 bit cpu the stack frame
using ebp is available to trace the stack but I don' t see an equivalent
on
the amd64 function calling paradigm
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3917 (20090307) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3917 (20090307) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
I am only interested in obtaining the call stack for functions within
my driver and only in debug mode so therefor I control the calling
convention used.. My goal, and one that I have achieved on some unix
platforms and win32, is to associate a call stack with every memory
allocation my driver makes. The driver keeps track of all allocates
and frees so that when the driver is unloaded any memory in use can be
returned to the kernel. The driver can be triggered to dump all of the
current memory allocation info (size, timestamp, call stack, etc.) to
a file. A data reduction program then associates the allocation info
with the driver map file and produces a call stack, including function
name and offset, for all currently allocated memory. By incorporating
a time stamp with the allocation info I am able to easily find memory
leaks and exactly which code did the leaking.
.
- Follow-Ups:
- Re: amd64 stack trace from kernel driver code
- From: Maxim S. Shatskih
- Re: amd64 stack trace from kernel driver code
- From: Doron Holan [MSFT]
- Re: amd64 stack trace from kernel driver code
- References:
- amd64 stack trace from kernel driver code
- From: vjack3230
- Re: amd64 stack trace from kernel driver code
- From: Don Burn
- amd64 stack trace from kernel driver code
- Prev by Date: List of included drivers in windows XP, 2003 and 2008
- Next by Date: Re: amd64 stack trace from kernel driver code
- Previous by thread: Re: amd64 stack trace from kernel driver code
- Next by thread: Re: amd64 stack trace from kernel driver code
- Index(es):
Relevant Pages
|