This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Enable HW Breakpoint in gdbserver-linux-x86


On 07/18/2012 07:14 PM, Michael Eager wrote:
> The code in gdbserver which supports hardware watchpoints on
> x86 Linux can also support hardware breakpoints without modification.
> 
> The attached patch calls the insert/remove watchpoint routines
> for hardware breakpoints as well as watchpoints.   Most of the
> changes are to add comments identifying the wp/bp type values.
> 
> 2012-07-18   Michael Eager  <eager@eagercon.com>
> 
>   * gdbserver/i386-low.c (Z_packet_to_hw_type):  Add Z_PACKET_HW_BP,
                                                 ^^
Only one space, please.

>   * gdbserver/i386-low.c (Z_packet_to_hw_type):  Add Z_PACKET_HW_BP,
      ^^^^^^^^^^

gdbserver has it's own ChangeLog.  Move this there, and remove the "gdbserver/"
prefix.

>   translate to hw_execute.
>   * gdbserver/linux-x86-low.c (x86_insert_point,  x86_remove_point):
      ^^^^^^^^^^                                  ^^
Ditto, both cases.

Otherwise OK.  Thanks.

> diff -u -r1.42 linux-x86-low.c

Please use "diff -up" next time.  It makes it easier to read patches.

You can just:

echo "diff -up" >> ~/.cvsrc

So one doesn't have to remember to pass it manually.


I haven't tested it, but I think that a hw-breakpoint at the same address
of a tracepoint will be broken:

 - gdbserver won't report the breakpoint hit to gdb
 - gdbserver won't be able to step over the tracepoint, continuously hitting
   the breakpoint.

But let's not hold this patch for that.

Thanks.
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]