I'll add this to TODO:

- add support for masks in watchpoints. The trick is that GDB does not
  support a breakpoint mask in the remote protocol. One way to work around
  this is to add a separate command "watchpoint_mask add/rem <addr>
<mask>", that
  is run to register a list of masks that the gdb_server knows to use with
  a particular watchpoint address.

Any other bright ideas?

The idea is to replace 0xfffffffu w/a mask looked up in a list using
address as a key...

                        if (packet[0] == 'Z')
                        {
                                if ((retval = watchpoint_add(target, address, 
size, type-2, 0,
0xffffffffu)) != ERROR_OK)
                                {
                                        if ((retval = gdb_error(connection, 
retval)) != ERROR_OK)
                                                return retval;
                                }
                                else
                                {
                                        gdb_put_packet(connection, "OK", 2);
                                }
                        }
                        else
                        {
                                watchpoint_remove(target, address);
                                gdb_put_packet(connection, "OK", 2);
                        }


-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to