Local variables wouldn’t be available at the beginning of a function.
Consider a typical preamble:
push ebp
mov ebp, esp
sub esp, 0xc0
That “sub” operation is allocating the local variable storage. So if
you have a breakpoint at the entry of the function (the push ebp) there
*are* no local variables to display in the kernel debugger. Stepping
into the funtion to the point where the storage is now allocated means
the debugger can display those locations.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Wednesday, July 07, 2004 9:09 AM
To: Kernel Debugging Interest List
Subject: Re:[windbg] Re:Windbg Problem: I can only watch global
varialbes, but not local variable
If you break at t he top of the function, I have found that “access
error>” is common until I step into the function. I’ve also seen this
error>happen
at a bp within a function, but it clears as soon as I then do a step.
–
Gary G. Little
Seagate Technologies, LLC
“sathya swamy” wrote in message
news:xxxxx@windbg…
> I am trying to debug a driver for ADM64bit platform ( windows XP64
> build 1184). I am using windbg 3.17.
> When i do source mode debugging, i could not see the values of the
variables
> in the locals window.
> I tried kd, the same problem.
> The variables are showing up. But their value field says “Memory
> access error”.
>
> Do you have any idea why this is happening???
> Your help will be appreciated.
> Thanks,
>
>
> >From: “Gary G. Little”
> >Reply-To: “Kernel Debugging Interest List”
> >To: “Kernel Debugging Interest List”
> >Subject: Re:[windbg] Windbg Problem: I can only watch global
> >varialbes,
but
> >not local variable
> >Date: Tue, 6 Jul 2004 10:30:33 -0500
> >
> >Well don’t have to have two machines, you can always pay Compuware a
grand
> >(US dollars) for Softice and debug on a single machine. However,
> >since
you
> >are dealing with kernel mode code, it is quite possible to have a
> >crash during a time when you don’t want a crash and hose your boot
> >disk. At
that
> >point in time you are literally dead in the water until you unscrew
> >you boot system which may wind up in a total format and install of
> >your boot disc.
> >If
> >your development directories happen to be on that disc, you just
> >lost them.
> >If you’re really good at backing up your probably safe; most of us
> >are,
but
> >even the best of us get caught with our pants down and have to
> >re-write code we just lost because of a faux paux (??).
> >
> >Dual system debug on an HT target is highly recommended when
> >debugging kernel mode code, and generally cheaper than purchasing
SoftIce.
> >
> >–
> >Gary G. Little
> >Seagate Technologies, LLC
> >
> >“Gobinath Krishna” wrote in message
> >news:xxxxx@windbg…
> > >
> > >
> > > Hi,
> > >
> > > I’m Gobinath Krishna,fresher to kernal mode driver project(Windows
> >2000),i
> > > saw yours question, basically i would like to know why do we need
> > > two machines for testing.If possible could you explain some basics
to me.
> > >
> > > Regards
> > > Gobinath
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From:
> > > To: “Kernel Debugging Interest List”
> > > Sent: Monday, July 05, 2004 6:46 PM
> > > Subject: [windbg] Windbg Problem: I can only watch global
> > > varialbes,
but
> >not
> > > local variable
> > >
> > >
> > > > Hi guys,
> > > > I’m doing a kernal mode driver project, and use windbg as the
> > > > kernel
> >mode
> > > > debugger. I’m using windbg on a host computer to debug the
> > > > program
on
> > > another
> > > > target computer connected with the host by a null modem.
> > > > When I set a breakpoint, or the driver on the target system
> > > > crashes,
> >my
> > > host
> > > > computer can successfully get the breakpoint/crash and show
> > > > related information to me.
> > > > Now my problem is, in the windbg, I can only check the content
> > > > of
> >global
> > > > variables in the “watch” window, but not those local variables
> >declared
> >in
> > > the
> > > > functions. I think this problem may be related to the settings
> > > > of
> >symbol
> > > path,
> > > > source path etc, but i’m not sure: Since,if the those paths are
> >wrongly
> > > set,
> > > > then I won’t be able to see global variables either (but in my
> > > > case,
i
> > > really
> > > > can correctly check those global variables…)
> > > >
> > > > can anybody tell me what could be the reason of this problem?
> > > > and
how
> >to
> > > solve
> > > > it?
> > > > thank you for any advise.
> > > >
> > > >
> > > >
> > > > -------------------------------------------------
> > > > This mail sent through http://webmail.comp.polyu.edu.hk
> > > >
> > > > —
> > > > You are currently subscribed to windbg as: xxxxx@erdcitvm.org
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > >
> > > Scanned and protected by Email scanner
> > >
> >
> >
> >
> >—
> >You are currently subscribed to windbg as:
> >xxxxx@hotmail.com To unsubscribe send a blank email to
> >xxxxx@lists.osr.com
>
>___________________________
> Check out the latest news, polls and tools in the MSN 2004 Election
Guide!
> http://special.msn.com/msn/election2004.armx
>
>
—
You are currently subscribed to windbg as: xxxxx@osr.com To unsubscribe
send a blank email to xxxxx@lists.osr.com