Marvee Amasi
DIIDevHeads IoT Integration Server
•Created by Marvee Amasi on 9/27/2024 in #firmware-and-baremetal
Understanding cmp Instruction in Assembly and Debugging with GDB
I’ve come across a specific instruction sequence that I need help understanding, particularly the comparison (
cmp
) operation and how to break at this point in GDB on an Intel Core i7-11700K Rocket Lake processor . It's low level assembly debugging in C and assembly mix
I’m particularly interested in the cmp
instruction at 0x0000000000001413
. From what I understand, it compares the value stored at [rbp-0x70]
with the value currently in the eax
register.
What exactly is this cmp
operation checking tho?
What happens if the values are not equal?
And how can I set a breakpoint at this comparison line in GDB to inspect the values before the comparison happens?
I tried to break at the memory address 0x0000000000001413
using break *0x0000000000001413
, but I’m not sure if that’s the correct approach5 replies