[patch] gdbserver: Add support for Z0/Z1 packets
Aleksandar Ristovski
aristovski@qnx.com
Mon Jun 22 19:39:00 GMT 2009
Pedro Alves wrote:
> On Friday 19 June 2009 14:55:56, Aleksandar Ristovski wrote:
>
>> RCS file: /cvs/src/src/gdb/gdbserver/target.h,v
>> retrieving revision 1.36
>> diff -u -p -r1.36 target.h
>> --- target.h 1 Apr 2009 22:50:24 -0000 1.36
>> +++ target.h 19 Jun 2009 13:47:44 -0000
>> @@ -213,6 +213,14 @@ struct target_ops
>> int (*read_auxv) (CORE_ADDR offset, unsigned char *myaddr,
>> unsigned int len);
>>
>> + /* Insert and remove breakpoint. Argument TYPE can be:
>> + '0' = software-breakpoint
>> + '1' = hardware-breakpoint
>
> ^ spurious space
>
>> + Returns 0 if successful, 1 otherwise. */
>> +
>> + int (*insert_breakpoint) (char type, CORE_ADDR addr);
>> + int (*remove_breakpoint) (char type, CORE_ADDR addr);
>
> Z0 and Z1 breakpoints also take a 'len' argument, just
> like Z2-Z4. You should also pass those down.
>
> But, Let's take a step back --- why not just rename the
> insert_watchpoint|remove_watchpoint functions to insert_point,remove_point,
> and relax the type checks in server.c:
That was my initial implementation, prior to proposing the
change. Then I looked at target ops in gdb; there we have
two different functions for breakpoint and watchpoint so I
followed that logic (even though the logic there seems to be
incomplete: there is a pair for hw and non-hw breakponts but
only one pair for watchpoints).
But either way is fine with me - just let me know.
Thanks,
--
Aleksandar Ristovski
QNX Software Systems
More information about the Gdb-patches
mailing list