What is the function of the push / pop instructions used on registers in x86 assembly?

pushing a value (not necessarily stored in a register) means writing it to the stack. popping means restoring whatever is on top of the stack into a register. Those are basic instructions: push 0xdeadbeef ; push a value to the stack pop eax ; eax is now 0xdeadbeef ; swap contents of registers push eax … Read more

Purpose of ESI & EDI registers?

SI = Source Index DI = Destination Index As others have indicated, they have special uses with the string instructions. For real mode programming, the ES segment register must be used with DI and DS with SI as in movsb es:di, ds:si SI and DI can also be used as general purpose index registers. For … Read more

What does `dword ptr` mean?

The dword ptr part is called a size directive. This page explains them, but it wasn’t possible to direct-link to the correct section. Basically, it means “the size of the target operand is 32 bits”, so this will bitwise-AND the 32-bit value at the address computed by taking the contents of the ebp register and … Read more

Show current assembly instruction in GDB

You can switch to assembly layout in GDB: (gdb) layout asm See here for more information. The current assembly instruction will be shown in assembler window. ┌───────────────────────────────────────────────────────────────────────────┐ │0x7ffff740d756 <__libc_start_main+214> mov 0x39670b(%rip),%rax #│ │0x7ffff740d75d <__libc_start_main+221> mov 0x8(%rsp),%rsi │ │0x7ffff740d762 <__libc_start_main+226> mov 0x14(%rsp),%edi │ │0x7ffff740d766 <__libc_start_main+230> mov (%rax),%rdx │ │0x7ffff740d769 <__libc_start_main+233> callq *0x18(%rsp) │ >│0x7ffff740d76d <__libc_start_main+237> mov … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)