7

Is there any way to set a breakpoint at the specific location on the stack in OllyDbg?

I have some value (argument of the function) on the stack and I want to break on every memory access at this location.

Thanks in advance.

FrozenHeart
  • 193
  • 1
  • 1
  • 5
  • Take the address, browse to it in the memory dump, right click -> breakpoint -> hardware, on access. – rev Apr 30 '15 at 17:06

2 Answers2

6
  • Take the offset of the stack place you wanna breakpoint at
  • Go to memory dump, and press Ctrl + G (Go), and put the address there, and press Ok
  • Right click the first value, and go to Breakpoint -> Hardware, on access -> [size]. A Dword is 4 bytes, which is how much bytes the stack viewer shows.

enter image description here

rev
  • 1,293
  • 12
  • 22
4

If the arguments of the function on stack is a pointer (such as pThreadId for CreateThread), then follow the steps below. Otherwise if the argument is some value (like CreationFlags) then refer to AcidShout's answer.

1. Right click on the address on the stack -> Chose Follow in Dump. enter image description here

2. In the dump window, right click on the value -> Breakpoint -> Hardware on access -> Byte / Word / Dword

enter image description here

0xec
  • 6,090
  • 3
  • 23
  • 33