Skip to main content
GameDev.net gamedev.net
🔒 Locked

Locating a line of code by memory address (at run time)

Started by ehudros Jan 6, 2008 at 4:26 PM 1 replies 950+ views
Original Post
ehudros
ehudros
Hi everyone, I have a pretty straight forward question (I think...) I have a memory address I know is causing a program crash, and I would like the debugger to take me to that line of code during runtime. Is that possible? If so how? I am using C++ on VS2005. (I can't use the regular call stack because it is a memory corruption issue and the crash itself does not take place untill later in the game, when the overwritten data is accessed). Thanks, Ehud
ToohrVyk
ToohrVyk
Check your debugger's documentation about breakpoints and memory breakpoints. VS2005 supports both.
SiCrane
SiCrane
At runtime go to the disassembly window, and there's a place to enter a memory address. Put it there, and it should bring you to the disassembly for that instruction. If there's a corresponding line of code for it (and there may not be), it should show up in the window with the disassembly.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.