From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17075 invoked by alias); 1 Dec 2009 05:44:58 -0000 Received: (qmail 17066 invoked by uid 22791); 1 Dec 2009 05:44:58 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Dec 2009 05:44:51 +0000 Received: from spaceape11.eur.corp.google.com (spaceape11.eur.corp.google.com [172.28.16.145]) by smtp-out.google.com with ESMTP id nB15imtl026003 for ; Tue, 1 Dec 2009 05:44:48 GMT Received: from pzk5 (pzk5.prod.google.com [10.243.19.133]) by spaceape11.eur.corp.google.com with ESMTP id nB15ijqi010474 for ; Mon, 30 Nov 2009 21:44:46 -0800 Received: by pzk5 with SMTP id 5so3058832pzk.18 for ; Mon, 30 Nov 2009 21:44:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.237.19 with SMTP id k19mr9887138wah.69.1259646285139; Mon, 30 Nov 2009 21:44:45 -0800 (PST) In-Reply-To: <26eb53620911301518y13e64bc0g95c6fe3c7b18b0c@mail.gmail.com> References: <26eb53620911301516x68ccc0edkf64ba2951c8ce3a3@mail.gmail.com> <26eb53620911301518y13e64bc0g95c6fe3c7b18b0c@mail.gmail.com> Date: Tue, 01 Dec 2009 05:44:00 -0000 Message-ID: <8ac60eac0911302144p498711oa2f614bb885c087d@mail.gmail.com> Subject: Re: GDB library to insert and delete watchpoints From: Paul Pluzhnikov To: Aravinda Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true 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: 2009-12/txt/msg00001.txt.bz2 On Mon, Nov 30, 2009 at 3:18 PM, Aravinda wrote: > Im working on a project that currently requires inserting and deleting > watchpoints to monitor buffer overruns. AFAIU, on x86 you can monitor at most 4 addresses, since that's all the debug registers it got. That makes using HW watchpoints for overrun detection of dubious value (unless you only care about overrunning a very small set of buffers). > I was looking at the > gdb-internals documentation which talks about a gdb library that can > be used to do exactly this. It can't be (at lease not without a lot of work). Please see this message and thread: http://sourceware.org/ml/gdb/2009-08/msg00003.html > But I couldnt find more info on this. Im > looking for a ready to use library to be used with a kernel module > that allows for modifying the debug registers. kindly point me to any > sources if it can be done. AFAICT, such a library does not exist. Cheers, -- Paul Pluzhnikov