There's basically no way to do this with MAME right now, and I've reported it as an issue on Github. The memory system can install the necessary hooks on any address space, but the debugger's half of the watchpoint interface, which stops the CPU when the access occurs, is a complete mess that I recently tried and failed to fix.
One obvious hassle with implementing watchpoints is: in a multi-CPU system, which CPU do you stop on? This problem gets especially tricky when you consider how common it is for systems to have address spaces that two CPUs share equally, or a CPU that can yield its bus to a DMA controller which also gets time-sliced by MAME's scheduler. MAME's current implementation gets this question wrong often enough as it is.
In any case, there's not going to be a way to set watchpoints on member variables. The debugger's memory view has access to these only as a side benefit of MAME's save state system, and forcing devices to go through another code layer to access these would be completely inefficient. The best you can do is to set watchpoints on the offsets they are accessed at, and/or modify the code to call machine().debug_break() when the accesses happen.
Last edited by AJR; 07/13/19 06:31 PM.