ShiftLeft 15 Junior Poster in Training

Is there an option that can be passed to GDB to make it happy with callee cleaning up stack.

        push    eax
        push    rbp
        push     0
        call    AddVals
        ret

AddVals enter   28, 0

    ;... Bunch of code

        leave
        ret     24

1) If I single step "si" into AddVals and right through it it works ok
2) If I single step into AddVals and then try to continue untill next frame, or step over AddVals "ni", it will usually complete program or stop at some arbitrary point.

3) If I set a breakpoint at callers return it works ok

Assembler is NASM "-felf64" and I'm not using "-g"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.