Part 45 – Debugging Pre-Decrement Operator
For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Reverse-Engineering-Tutorial
Let’s re-examine our code.
#include <iostream>
int main(void) {
int myNumber = 16;
int myNewNumber = --myNumber;
std::cout << myNewNumber << std::endl;
std::cout << myNumber << std::endl;
return 0;
}
We remember when we compile we get 15.
Let’s debug.
Let’s break.
As we can see r3 holds 15. Keep in mind hacking this value may not be the final place it may be stored. Remember this for next week and re-examine the debug code above to see if you can figure it out.
As we can see r1 holds 15 as well. Keep in mind the above statement.
As we continue we see our cout function echoing 15 for both areas as expected.
Next week we will dive into the Hacking Pre-Decrement Operator.