From: Aravinda <aravindakidambi@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: Problem with manual watchpoints
Date: Tue, 29 Dec 2009 03:00:00 -0000 [thread overview]
Message-ID: <26eb53620912281900o3257f6fk919843fed46655de@mail.gmail.com> (raw)
In-Reply-To: <20091228214858.GA21208@host0.dyn.jankratochvil.net>
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] = 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
<jan.kratochvil@redhat.com> 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"? It is true some old KVMs had some bugs with watchpoints. Those
> 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:
> http://sourceware.org/systemtap/wiki/utrace/tests
>
>
> Regards,
> Jan
>
prev parent reply other threads:[~2009-12-29 3:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 20:47 Aravinda
2009-12-24 21:08 ` Jan Kratochvil
2009-12-24 21:42 ` Aravinda
2009-12-24 21:52 ` Jan Kratochvil
2009-12-28 21:22 ` Aravinda
2009-12-28 21:49 ` Jan Kratochvil
2009-12-29 3:00 ` Aravinda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26eb53620912281900o3257f6fk919843fed46655de@mail.gmail.com \
--to=aravindakidambi@gmail.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox