From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17830 invoked by alias); 29 Dec 2009 03:00:30 -0000 Received: (qmail 17817 invoked by uid 22791); 29 Dec 2009 03:00:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f189.google.com (HELO mail-pz0-f189.google.com) (209.85.222.189) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Dec 2009 03:00:24 +0000 Received: by pzk27 with SMTP id 27so5406219pzk.12 for ; Mon, 28 Dec 2009 19:00:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.247.6 with SMTP id u6mr10891304wfh.181.1262055623117; Mon, 28 Dec 2009 19:00:23 -0800 (PST) In-Reply-To: <20091228214858.GA21208@host0.dyn.jankratochvil.net> References: <26eb53620912241247i718992d6i422451f4b7f9931@mail.gmail.com> <20091224210825.GA29926@host0.dyn.jankratochvil.net> <26eb53620912241341w30a924afxf90f66166b8c552b@mail.gmail.com> <20091224215217.GA32721@host0.dyn.jankratochvil.net> <26eb53620912281321k3fe1ee7dy9fcdc8bdff69cd4b@mail.gmail.com> <20091228214858.GA21208@host0.dyn.jankratochvil.net> From: Aravinda Date: Tue, 29 Dec 2009 03:00:00 -0000 Message-ID: <26eb53620912281900o3257f6fk919843fed46655de@mail.gmail.com> Subject: Re: Problem with manual watchpoints To: Jan Kratochvil Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00173.txt.bz2 Hi, Thanks a lot. I tried the ptrace testsuite and found nothing was wrong with the VM; all tests ran fine. But, i figured the problem was, I was doing an ioctl to access the kernel module which runs in the same process context and so, sometimes the assigning task_struct->thread_struct->debugreg[0] =3D addr was actually not committed to the address to the hardware debug register. I forced a move to debug register by calling processor.h/set_debugreg(val, regno). It consistently raises the SIGTRAP now. Looking at ptrace code in the linux, they dont have to do it since its from a different process the DR values are modified so when the child process is scheduled back, the modified DR values are copied into the hardware debug registers. Thanks, Aravinda On Mon, Dec 28, 2009 at 4:48 PM, Jan Kratochvil wrote: > On Mon, 28 Dec 2009 22:21:34 +0100, Aravinda wrote: >> Could it be possible for a processor with debug registers to not support >> exact reporting or could there be problems since Im working on a VM ? > > Which "VM"? =A0It is true some old KVMs had some bugs with watchpoints. = =A0Those > are fixed long time (such as at least in kernel-2.6.31.9-174.fc12.x86_64). > You can run the gdb testsuite both in host and in guest OS and compare it. > You can also compare the results from: > =A0 =A0 =A0 =A0http://sourceware.org/systemtap/wiki/utrace/tests > > > Regards, > Jan >