From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16967 invoked by alias); 1 Dec 2009 18:08:03 -0000 Received: (qmail 16956 invoked by uid 22791); 1 Dec 2009 18:08:02 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.147) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Dec 2009 18:07:56 +0000 Received: by ey-out-1920.google.com with SMTP id 4so1275094eyg.42 for ; Tue, 01 Dec 2009 10:07:53 -0800 (PST) Received: by 10.213.100.229 with SMTP id z37mr920834ebn.87.1259690873604; Tue, 01 Dec 2009 10:07:53 -0800 (PST) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 24sm1089492eyx.14.2009.12.01.10.07.51 (version=SSLv3 cipher=RC4-MD5); Tue, 01 Dec 2009 10:07:52 -0800 (PST) Message-ID: <4B155F36.2060806@gmail.com> Date: Tue, 01 Dec 2009 18:08:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Paul Pluzhnikov CC: Aravinda , gdb@sourceware.org Subject: Re: GDB library to insert and delete watchpoints References: <26eb53620911301516x68ccc0edkf64ba2951c8ce3a3@mail.gmail.com> <26eb53620911301518y13e64bc0g95c6fe3c7b18b0c@mail.gmail.com> <8ac60eac0911302144p498711oa2f614bb885c087d@mail.gmail.com> In-Reply-To: <8ac60eac0911302144p498711oa2f614bb885c087d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 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: 2009-12/txt/msg00007.txt.bz2 Paul Pluzhnikov wrote: > On Mon, Nov 30, 2009 at 3:18 PM, Aravinda wrote: >> 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. I think this is a misunderstanding; I think Aravinda is referring to the x86 watchpoint support functions, which the internals documentation does indeed describe as "a generic library of functions [ ... that x86-based ports can use to implement support for watchpoints and hardware-assisted breakpoints ...]" http://sourceware.org/gdb/current/onlinedocs/gdbint/Algorithms.html#index-x86-debug-registers-40 Aravinda, they're only useful within the gdb executable itself; they don't form a standalone library that could be loaded into a kernel module. Of course you could always rip the relevant sources out of gdb and hack them up into something useful - assuming you're using an x86 target that is. cheers, DaveK