Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the lldb equivalent of gdb's rwatch?

I'm in a situation where read watchpoints would be very handy. Looking at lldb's help, I could find the watchpoint command, but it only seems to support write watchpoints (which are admittedly a lot more useful in general, but won't do it in my case).

I know that gdb has a rwatch command that sets read watchpoints. Is there any equivalent with lldb?

like image 818
zneak Avatar asked Sep 07 '25 11:09

zneak


1 Answers

watch set variable|expression both take a -w / --watch argument specifying either write (default), read, or read_write. e.g.

(lldb) wa s v -w read myvar
like image 52
Jason Molenda Avatar answered Sep 10 '25 06:09

Jason Molenda