This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tdep/2305: IA64: breakpoints on predicated instructions ignorepredicate


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]