From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 699 invoked by alias); 30 Jun 2011 23:40:22 -0000 Received: (qmail 690 invoked by uid 22791); 30 Jun 2011 23:40:21 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from shell0.rawbw.com (HELO shell0.rawbw.com) (198.144.192.45) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 23:40:08 +0000 Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id p5UNXZiw065101 for ; Thu, 30 Jun 2011 16:33:36 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4E0D0957.6040003@rawbw.com> Date: Thu, 30 Jun 2011 23:40:00 -0000 From: Yuri User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20101211 Thunderbird/3.0.11 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: Why gdb-7.1 doesn't set hardware watchpoints on i7 CPU (amd64)? References: <4D0AD70D.9020702@rawbw.com> <4E0CF948.6030303@rawbw.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; 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: 2011-06/txt/msg00180.txt.bz2 Please find below the log of the whole session with gdb_7_3-branch (BTW it still prints the 7.2 version number). I used this C++ program: #include void ms(char *p) { memset(p, 0, 1024); } main() { char buf1[1024]; buf1[256] = 7; ms(buf1); } Please also note that with watchpoint active it was taking a long time for gdb to restart the program after 'Starting program' line. Yuri ---- gdb session log ---- [yuri@mybsd ~/gdb]$ gdb ./main GNU gdb (GDB) 7.2.90.20110630-cvs Copyright (C) 2011 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-freebsd8.2". For bug reporting instructions, please see: ... Reading symbols from /usr/home/yuri/gdb/main...done. (gdb) b main Breakpoint 1 at 0x40065b: file main.C, line 9. (gdb) r Starting program: /usr/home/yuri/gdb/main Breakpoint 1, main () at main.C:9 9 buf1[256] = 7; (gdb) n 10 ms(buf1); (gdb) p &buf1[256] $1 = 0x7fffffffddd0 "\a" (gdb) watch *(char*)0x7fffffffddd0 Watchpoint 2: *(char*)0x7fffffffddd0 (gdb) c Continuing. Watchpoint 2: *(char*)0x7fffffffddd0 Old value = 7 '\a' New value = 0 '\000' 0x0000000800b78074 in memset () from /lib/libc.so.7 (gdb) c Continuing. Watchpoint 2: *(char*)0x7fffffffddd0 Old value = 0 '\000' New value = 1 '\001' 0x0000000800505c6c in ?? () from /libexec/ld-elf.so.1 (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/home/yuri/gdb/main ^C Program received signal SIGINT, Interrupt. 0x0000000800505959 in ?? () from /libexec/ld-elf.so.1 (gdb) quit A debugging session is active. Inferior 1 [process 49302] will be killed. Quit anyway? (y or n) y