LLDB_WATCH_TYPE_IS_VALID would always return true when validating watchpoint type
by using bitwise-or instead of bitwise-and to apply validation flags.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Sometimes you wonder how anything works :)
I looked at the places this is used and I don't see a way to reach them from the API without the type already being LLDB_WATCH_TYPE_READ or LLDB_WATCH_TYPE_WRITE. It's checked in lldb/source/Target/Target.cpp:CreateWatchpoint but there's no way to fail that check using existing calls, only direct from C++. So adding a test for this isn't possible.
LGTM.