This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: tdep/2305: IA64: breakpoints on predicated instructions ignorepredicate
- From: Daniel Jacobowitz <drow at false dot org>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 29 Aug 2007 17:08:02 -0000
- Subject: Re: tdep/2305: IA64: breakpoints on predicated instructions ignorepredicate
- Reply-to: Daniel Jacobowitz <drow at false dot org>
The following reply was made to PR tdep/2305; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: jsworley@qwest.net
Cc: gdb-gnats@sources.redhat.com
Subject: Re: tdep/2305: IA64: breakpoints on predicated instructions ignore
predicate
Date: Wed, 29 Aug 2007 13:03:24 -0400
On Wed, Aug 29, 2007 at 04:41:41PM -0000, jsworley@qwest.net wrote:
> When setting a breakpoint at a predicated instruction, GDB sets the
> predicate to p0 (always). This makes it impossible to only catch the
> case where the predicate is set, such as for a boundary or error
> conditon. This situation can arise in assembly code or optimized
> compilation.
GDB's current behavior is the generally expected one. If you would
like to honor the predicate, you can set an appropriate conditional
breakpoint (with "condition" or "break if").
If we honor the predicate things go wrong in all sorts of different
ways. For a simple example, suppose the compiler optimizes "a = b ? c
: d" into two conditional moves and an appropriate predicate was
already in a register for b. Setting a breakpoint at that line will
end up on one of the conditional moves; if the other condition is
chosen then the breakpoint will be silently skipped (and we'll get
a different bug report about that :-)
--
Daniel Jacobowitz
CodeSourcery