GDB에서 memory access breakpoint가 가능한가요?

choco6의 이미지

윈도우즈용 어플에서는 Visual C++ 디버거든 olly에서든 모두 memory access breakpoint 기능을 지원합니다.
그런데 GDB의 메뉴얼 Setting Breakpoint 항목을 찾아봤지만 memory access breakpoint에 대한 언급이 없던데.. 혹시 gdb에서는 memory access breakpoint 기능 자체가 지원이 안되나요?.. 어플리케이션을 디버깅하다보면 그런 기능이 필요할 때가 있는데 gdb에서는 어떻게 처리하는지 잘 모르겠네요.

happycat의 이미지

혹시 watchpoint를 말씀하시는 게 아니신지요..?

아래는 관련된 info page 입니다.

Quote:
`watch EXPR'
Set a watchpoint for an expression. GDB will break when EXPR is
written into by the program and its value changes.

`rwatch EXPR'
Set a watchpoint that will break when watch EXPR is read by the
program.

`awatch EXPR'
Set a watchpoint that will break when EXPR is either read or
written into by the program.