This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Enable HW Breakpoint in gdbserver-linux-x86
- From: Pedro Alves <palves at redhat dot com>
- To: Michael Eager <eager at eagerm dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Daniel Jacobowitz <drow at false dot org>
- Date: Thu, 19 Jul 2012 19:15:55 +0100
- Subject: Re: [PATCH] Enable HW Breakpoint in gdbserver-linux-x86
- References: <5006FCFA.3080709@eagerm.com>
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