1

I am trying to set a breakpoint (created in assembly) and step into an EXE file line by line to watch registers and memory behavior. I have done this easily with gdb under Linux like this.

gdb -q ./AssembledLinkedFile -tui
break _start  (or break *&code for C using shellcode)
run
stepi

This works perfectly. However, The documentation for Windbg does not seem so straight forward.

Since using GoLink adds several lines of asm, I need to find my assembly and start at the beginning (_start:)

Current process.

  1. Write my assembly program.
  2. Assemble (on linux) - nasm -f win64 messageBox64bit.nasm -o messageBox64bit.obj
  3. Link with golink (Windows) - golink \console messageBox64bit.obj
  4. messageBox64bit.EXE created and works fine. Executed on Windows

After I open the messageBox64bit.EXE in Windbg, how can I set a breakpoint in my assembly (_start:), then step into?

1

It seems bp $exentry should set breakpoint on the entrypoint, then you can continue (g) until you hit it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.