Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set Next Statement in WINDBG

1,100 views
Skip to first unread message

Anubhav

unread,
Jan 4, 2007, 11:20:01 PM1/4/07
to
Hi,

I was looking at the VC++ equivalent of "Set Next Statement" in WinDbg nut
no luck. Hence I tried to manually change EIP to the desired source line. For
this I switch to Disassembly view, turn on "Show source line for each
instruction" and "Show source file for each location". Then I note down the
address of the instruction corresponding to the source line and change EIP in
the register window.

Is this the only way or is there a simpler way in WinDbg to achieve this.

Regards,
Anubhav.

David J. Craig

unread,
Jan 4, 2007, 11:56:36 PM1/4/07
to
Did you look under the Edit menu? Highlight the source line where you want
EIP to be, click edit menu, and choose appropriately.

"Anubhav" <Anu...@discussions.microsoft.com> wrote in message
news:20C45E40-7A3A-4BF5...@microsoft.com...

Anubhav

unread,
Jan 5, 2007, 12:12:00 AM1/5/07
to
Thanks. Yes I found it. Edit | Set Current Instruction. I was not suspecting
it to be available under Edit menu.

I have a suggestion. This should be grouped under the Debug menu, where Step
Into, Step Out etc are listed.

Regards,
Anubhav.

Skywing [MVP]

unread,
Jan 5, 2007, 1:42:59 AM1/5/07
to
You can also use the "r @eip=expression" (x86) or "r @rip=expression" (x64)
debugger commands. These will work in ntsd/cdb/kd, whereas there is no Edit
menu in the console debugger UIs as with WinDbg.

--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net


"Anubhav" <Anu...@discussions.microsoft.com> wrote in message

news:398E1F46-3DE8-46F0...@microsoft.com...

Anubhav

unread,
Jan 5, 2007, 4:21:01 AM1/5/07
to
Thanks a lot. I failed to see the console debugger (non GUI) perspective.
This information is surely helpful.

Ivan Brugiolo [MSFT]

unread,
Jan 5, 2007, 1:07:52 PM1/5/07
to
On top of what was has been already said, altering the value of the
instruction pointer
outside of the context of the stack pointer maintainance can lead to access
violation
and stack corruptions.

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Anubhav" <Anu...@discussions.microsoft.com> wrote in message

news:64992901-B872-474A...@microsoft.com...

0 new messages