From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16323 invoked by alias); 16 Jul 2012 18:17:59 -0000 Received: (qmail 16315 invoked by uid 22791); 16 Jul 2012 18:17:58 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from shell4.bayarea.net (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jul 2012 18:17:44 +0000 Received: (qmail 16358 invoked from network); 16 Jul 2012 11:17:43 -0700 Received: from c-76-102-3-160.hsd1.ca.comcast.net (HELO redwood.eagercon.com) (76.102.3.160) by shell4.bayarea.net with SMTP; 16 Jul 2012 11:17:43 -0700 Message-ID: <50045AC7.1060006@eagerm.com> Date: Mon, 16 Jul 2012 18:17:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Daniel Jacobowitz CC: "gdb@sourceware.org" Subject: Re: HW breakpoint on Linux x86 native References: <500443C7.5040707@eagerm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00037.txt.bz2 On 07/16/2012 10:32 AM, Daniel Jacobowitz wrote: > On Mon, Jul 16, 2012 at 12:39 PM, Michael Eager 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