public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: HW breakpoint on Linux x86 native
Date: Mon, 16 Jul 2012 18:17:00 -0000	[thread overview]
Message-ID: <50045AC7.1060006@eagerm.com> (raw)
In-Reply-To: <CAN9gPaENkC6J8QhL3emiqy4tvEKd4hTUhHFCUQO_bihNqq8-Sw@mail.gmail.com>

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


  reply	other threads:[~2012-07-16 18:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16 16:39 Michael Eager
2012-07-16 17:32 ` Daniel Jacobowitz
2012-07-16 18:17   ` Michael Eager [this message]
2012-07-16 18:43     ` Jan Kratochvil
2012-07-16 18:55       ` Michael Eager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50045AC7.1060006@eagerm.com \
    --to=eager@eagerm.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).