J
Johannes Röckert
Hi,
can anyone help me on how to develop a program in c++ which does single step
execution using a callback between the asm commands? I need something like
debuggers do - a callback function should be called after each command.
I think the resulting code could be fairly small and look somehow like this:
static int numCommands = 0; // Var which stores the number of commands
void callback()
{
numCommands++; // Increase the command count
}
int main()
{
enable_single_step_execution(callback); // Enable single step feature and
set callback
for (int i = 0; i < 100; i++); // callback() should be now called after
each asm command
disable_single_step_execution(); // Disable feature
cout << "The loop consisted of " << numCommands << " asm commands!" <<
endl;
}
Thanks and regards,
- Jo
can anyone help me on how to develop a program in c++ which does single step
execution using a callback between the asm commands? I need something like
debuggers do - a callback function should be called after each command.
I think the resulting code could be fairly small and look somehow like this:
static int numCommands = 0; // Var which stores the number of commands
void callback()
{
numCommands++; // Increase the command count
}
int main()
{
enable_single_step_execution(callback); // Enable single step feature and
set callback
for (int i = 0; i < 100; i++); // callback() should be now called after
each asm command
disable_single_step_execution(); // Disable feature
cout << "The loop consisted of " << numCommands << " asm commands!" <<
endl;
}
Thanks and regards,
- Jo