This is the mail archive of the gdb-patches@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: [RFA] Testcase for bug report 11531


On Friday 23 April 2010 18:29:33, Joel Brobecker wrote:
> > +gdb_test "start" ".*Temporary breakpoint.*"
> 
> Unfortunately, this does not work when testing with the remote protocol.
> Do use "runto", but use "*main" instead of "main", or something like
> that. That way, you should always stop before the instruction that
> causes the watchpoint to trigger.
> 

Or avoid those tricks, and simply put another statement before
the one that triggers the watchpoint:

int
main ()
{
+  myrec.y = 1;       <<<<<< runto main stops here instead.
  myrec.x = 5;
  myrec.y = 3.4;


-- 
Pedro Alves


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