HW breakpoint on Linux x86 native
Michael Eager
eager@eagerm.com
Mon Jul 16 18:17:00 GMT 2012
On 07/16/2012 10:32 AM, Daniel Jacobowitz wrote:
> On Mon, Jul 16, 2012 at 12:39 PM, Michael Eager <eager@eagerm.com> wrote:
>> Hi --
>>
>> I noticed that the FSF version of gdb builds without hw
>> break support for x86 native. The version of gdb distributed
>> by RedHat includes a patch to turn this feature on, with a
>> comment about gdb-6.6 compatibility.
>>
>> Can someone tell me why hw bp is not enabled by default
>> for native x86?
>
> Can you be a little more specific about what is not enabled by
> default? Hardware breakpoints are certainly supported.
In i386-linux-nat.c, _initialize_i386_linux_nat() calls
i386_use_watchpoints() which sets to_can_use_hw_breakpoint =
i386_can_use_hw_breakpoint in the target_ops returned by
linux_target(). Looks fine.
When running a local process, the target vector is different,
created by init_exec_ops() in exec.c. This defaults to
to_can_use_hw_breakpoint = reply_zero().
RH has a patch which forces the test in their gdb-7.3.1 release:
+/* Red Hat backward compatibility with gdb-6.8. */
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Gdb
mailing list