I wonder if there is a way to do the following: I have a structure that contains an element that is a pointer to a block of memory allocated by the kernel when I pass the structure to the API function (WAVEHDR structure, member is a reserved field.)
I can set the data breakpoint to the value of the reserved element - this in itself is not very useful. What I would like to do when a breakpoint is hit is to dereference the pointer stored in the reserved state and set a new data breakpoint in the memory pointed to by this pointer. I would like VisualStudio to interrupt when this memory is set to a known value.
I know how to set a breakpoint from a macro and how to get Visual Studio to call this macro from a breakpoint when it is hit, but I donβt know if I can pass the pointer value to the macro so that it can set a breakpoint to the right address. The user interface does not provide a way to do this.
Is there a way for a macro to access information about a running program and do something like evaluating global variables or other expressions? I could do what I am trying to do if I had such programmatic access to the executable code (during the breakpoint) from the macro.
source share