Page 1 of 1

Watch for specific value being written to address in FUSE debugger

Posted: Tue Jan 22, 2019 10:22 pm
by PROSM
I've been wrestling with the FUSE debugger, and I can't figure out how to make it watch for a specific value being written to an address in memory. I can get the breakpoint to trigger for any write to the address, but I only want execution to stop if this one value is written to memory. I haven't been able to work it out yet using the documentation - does anyone have any ideas?

Re: Watch for specific value being written to address in FUSE debugger

Posted: Tue Jan 22, 2019 11:08 pm
by serbalgi

Code: Select all

br{eakpoint} (re{ad}|w{rite}) [address] [if condition]

Square brackets  (`['  and  `]')  can  be  used to dereference a value; for example
`[0x4000]' will give the value of the first byte of the screen.
Not sure if that's possible. You can test the value being overwritten:

Code: Select all

break write 0x5c78 if [0x5c78] == 0x0035
or if you known the new value is stored in a register:

Code: Select all

break write 0x5c78 if z80:HL == 0x0036

Re: Watch for specific value being written to address in FUSE debugger

Posted: Wed Jan 23, 2019 5:26 pm
by PROSM
Thanks [mention]serbalgi[/mention]! This worked a treat :D