This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] x86 Linux watchpoints: Couldn't write debug register: Invalid, argument.
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 20 Jun 2014 18:52:01 +0100
- Subject: Re: [PATCH] x86 Linux watchpoints: Couldn't write debug register: Invalid, argument.
- Authentication-results: sourceware.org; auth=none
- References: <1394154640-14053-1-git-send-email-palves at redhat dot com> <1394154640-14053-3-git-send-email-palves at redhat dot com> <CAP9bCMTj+A2B6cvwYKC2vjL1Si+yGBKXvQfCMNR0SYN19KztXg at mail dot gmail dot com> <53272CB0 dot 6050101 at redhat dot com> <532AF3D0 dot 8090904 at redhat dot com> <20140617191850 dot GA10997 at host2 dot jankratochvil dot net> <20140619134330 dot GA14567 at host2 dot jankratochvil dot net> <53A2FB68 dot 9090500 at redhat dot com> <53A3164E dot 4020109 at redhat dot com> <20140619170029 dot GA31275 at host2 dot jankratochvil dot net> <53A46706 dot 8010601 at redhat dot com> <878uor8ofr dot fsf at fleche dot redhat dot com>
On 06/20/2014 06:45 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> I _still_ had to touch 3 different places with the same code... I'm
> Pedro> very much looking forward to having all that merged.
>
> Yeah. In the meantime perhaps copying the comments into all 3 copies
> would make it simpler for the eventual merge. I noticed that the
> comments are not in linux-x86-low.c or i386-linux-nat.c.
That's following the existing practice, actually.
amd64-linux-nat.c has:
/* On Linux kernel before 2.6.33 commit
72f674d203cd230426437cdcf7dd6f681dad8b0d
if you enable a breakpoint by the DR_CONTROL bits you need to have
already written the corresponding DR_FIRSTADDR...DR_LASTADDR registers.
Ensure DR_CONTROL gets written as the very last register here. */
while i386-linux-nat.c just has:
/* See amd64_linux_prepare_to_resume for Linux kernel note on
i386_linux_dr_set calls ordering. */
I don't think trying to keep this in sync now would help, and at least
this way we have one place that is master. Gary's recent series showed
how when these comments are duplicated they end up diverging. :-/
--
Pedro Alves