Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gdb: hardware watchpoints not working



Hi!

I just tried in gdb to watch a memory location.

(gdb) watch *0x78f2d98cd040
Hardware watchpoint 6: *0x78f2d98cd040
(gdb) c
Continuing.
Couldn't write debug registers: Operation not permitted.
Command aborted.
(gdb)

Watching an expression worked
(gdb) watch tws->dirs[0]->name
Watchpoint 5: tws->dirs[0]->name
...
but doesn't work for my use case because

Watchpoint 5 deleted because the program has left the block in
which its expression is valid.

and I think the variable is changed outside somehow.

That's on gdb 15.1, NetBSD 10.99.12/amd64/20240827.

Is this expected to work?
Is this a PAX issue and I need to disable (some of) it?
 Thomas


Home | Main Index | Thread Index | Old Index