From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14566 invoked by alias); 16 Jul 2012 18:55:07 -0000 Received: (qmail 14557 invoked by uid 22791); 16 Jul 2012 18:55:07 -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:54:54 +0000 Received: (qmail 2541 invoked from network); 16 Jul 2012 11:54:53 -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:54:53 -0700 Message-ID: <5004637D.7040707@eagerm.com> Date: Mon, 16 Jul 2012 18:55: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: Jan Kratochvil CC: Daniel Jacobowitz , "gdb@sourceware.org" Subject: Re: HW breakpoint on Linux x86 native References: <500443C7.5040707@eagerm.com> <50045AC7.1060006@eagerm.com> <20120716184328.GA17596@host2.jankratochvil.net> In-Reply-To: <20120716184328.GA17596@host2.jankratochvil.net> 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/msg00039.txt.bz2 On 07/16/2012 11:43 AM, Jan Kratochvil wrote: > On Mon, 16 Jul 2012 20:17:43 +0200, Michael Eager wrote: >> 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: > > http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=blob_plain;f=gdb-bz541866-rwatch-before-run.patch;hb=master > > It seems to be fixed in FSF GDB since 7.4 by: > > [RFA 2/3] Demote to sw watchpoint only in update_watchpoint > http://sourceware.org/ml/gdb-patches/2011-04/msg00292.html > http://sourceware.org/ml/gdb-patches/2011-05/msg00042.html > commit efa8e67a1ea2d6f90d86efc31076f24e67940f8e > Author: Thiago Jung Bauermann > Date: Thu May 5 22:52:09 2011 +0000 > Demote to sw watchpoint only in update_watchpoint. > > Do you really run gdb-7.4+? $ gdb t GNU gdb (GDB) 7.4.50.20120710-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /tmp/t...done. (gdb) l 1 #include 2 3 int main (void) 4 { 5 int a, b, c; 6 7 a = 5; 8 b = 10; 9 c = b - a; 10 if (c == 5) (gdb) hb 8 No hardware breakpoint support in the target. (gdb) b 8 Breakpoint 1 at 0x4004db: file t.c, line 8. (gdb) quit -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077