From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26753 invoked by alias); 9 Aug 2012 10:42:44 -0000 Received: (qmail 26743 invoked by uid 22791); 9 Aug 2012 10:42:43 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 10:42:19 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q79AgFfn015105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Aug 2012 06:42:15 -0400 Received: from host2.jankratochvil.net (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q79AgAm1009781 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 9 Aug 2012 06:42:13 -0400 Date: Thu, 09 Aug 2012 10:42:00 -0000 From: Jan Kratochvil To: Mark Kettenis Cc: flameroc@gmail.com, yao@codesourcery.com, gdb@sourceware.org Subject: Re: Hardware breakpoint limitation issue during the gdb regression test Message-ID: <20120809104209.GA25622@host2.jankratochvil.net> References: <2908402.0pCVQUbaGe@qiyao.dyndns.org> <201208091030.q79AURkU017337@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208091030.q79AURkU017337@glazunov.sibelius.xs4all.nl> User-Agent: Mutt/1.5.21 (2010-09-15) 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-08/txt/msg00026.txt.bz2 On Thu, 09 Aug 2012 12:30:27 +0200, Mark Kettenis wrote: > No, x86 has even less hardware breakpoints (4). But it will fall back > to using software breakpoints. It will not. But in fact it is better this way as even suggested by Markus Metzger as if GDB drops to using software watchpoints the debugging just "locks up" and user does not know why. (gdb) start (gdb) l 1,1 1 long v1, v2, v3, v4, v5; (gdb) watch v1 Hardware watchpoint 2: v1 (gdb) watch v2 Hardware watchpoint 3: v2 (gdb) watch v3 Hardware watchpoint 4: v3 (gdb) watch v4 Hardware watchpoint 5: v4 (gdb) watch v5 Hardware watchpoint 6: v5 (gdb) info breakpoints Num Type Disp Enb Address What 2 hw watchpoint keep y v1 3 hw watchpoint keep y v2 4 hw watchpoint keep y v3 5 hw watchpoint keep y v4 6 hw watchpoint keep y v5 (gdb) c Continuing. Warning: Could not insert hardware watchpoint 5. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints. It is more a bug that in this case no error message is given: (gdb) l 2,2 2 long a[5]; (gdb) watch a Watchpoint 2: a Regards, Jan