Let's say I have a carbon objective-c executable, and a crash report. From the crash report, it is apparent that the main method is located at 0x00002639, and the NSApplicationMain method from the AppKit is at 0x93ba0025. I anticipate that the first main method has background processes, and NSApplicationMain is the method typed by the user.Is there any sort of predictable interval to instructions? I want to make breakpoints at every instruction written by the programmer. Let's say for example that the main after the main method, the instructions are separated by 2, so from 0x93ba0025, the next function would be 0x93ba0027, etc.Would the above apply, or will I have to do something more to achieve this?
Is there a predictable interval between instructions of main methods in carbon?
gdb;memory
No.x86/x64 processors use instructions of variable length, so you can't assume that there is a specific number of bytes between instructions.You'd likely want to use something like a length disassembler in order to figure out the length of a given instruction at a given address.