From: Pedro Alves <pedro@codesourcery.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [Patch 2/2] MIPS hardware watchpoint support.
Date: Fri, 17 Apr 2009 13:43:00 -0000 [thread overview]
Message-ID: <200904171443.26794.pedro@codesourcery.com> (raw)
In-Reply-To: <49E765F7.1030201@caviumnetworks.com>
Thanks for the update.
On Thursday 16 April 2009 18:08:07, David Daney wrote:
> >> + printf_unfiltered (" (addr=%lx, len=%d, type=%s)",
> >> + /* This code is for mips, so casting CORE_ADDR
> >> + to unsigned long should be okay. */
> >> + (unsigned long)addr, len,
> >
> > Why bother to explain that instead of using `paddr'? If there's
> > a reason, then it would be nice if it was spelled out in the
> > comment.
>
> Comment deleted, and types casted to (unsigned long long).
Sorry to insist on a debug printf..., but that doesn't explain anything.
This even looks more misterious. If this is an address, why the cast
instead of paddr? -- you use paddr just a bit below. Is this because addr
isn't really an address?
> >
> >> -PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
> >> +FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after
> >> running)
> >>
> >> Reported instruction location of the watchpoint trigger is one
> >> instruction later and one line later.
> >
> > Why is that?
>
> I was mistaken, it is earlier, not later. With hardware watch points,
> $pc points to the faulting instruction, with software watch points $pc
> points to the following instruction. In a couple of tests, this results
> in the reported line number being different than the expected value.
I'm missing something and am still confused. PC points at the
faulting instruction when the target reports the watchpoint hit to
infrun --- . That step-over-watchpoint dance that patch 1/2 took care of comes
into play. That should move the inferior to the following instruction, evaluate
the watchpoint expression, notice the value changed, and report to the
user. Why does the PC still point at the faulting instruction?
--
Pedro Alves
next prev parent reply other threads:[~2009-04-17 13:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 7:27 David Daney
2009-04-06 20:27 ` Eli Zaretskii
2009-04-11 17:16 ` Pedro Alves
2009-04-16 17:08 ` David Daney
2009-04-17 13:43 ` Pedro Alves [this message]
2009-04-20 18:31 ` [Patch 1/2] Fix aftermath of 'infrun.c support for MIPS hardware watchpoints.' David Daney
2009-04-20 19:07 ` Pedro Alves
2009-04-20 21:15 ` David Daney
2009-04-20 18:40 ` [Patch 2/2] MIPS hardware watchpoint support David Daney
2009-04-20 19:12 ` Pedro Alves
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=200904171443.26794.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=ddaney@caviumnetworks.com \
--cc=gdb-patches@sourceware.org \
/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