[patch] Fix watchpoint-at-epilogue 7.0 regression (s390x)

Joel Brobecker brobecker@adacore.com
Sat Dec 26 05:36:00 GMT 2009

> gdb/
> 2009-12-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 	* breakpoint.c (watchpoint_check): Check the call
> 	gdbarch_in_function_epilogue_p before calling frame_find_by_id.
> 	Extend the comment.

This part looks OK to me.

On a more general side, I wondered for a while if frame_find_by_id
should be modified to never raise an exception (and return NULL instead).
But decided that this was probably a bad idea. Using the same kind
of example as provided by Jan, if our program was to stop inside
the epilogue a function called by the block where the expression
is valid, we might end up deleting the watchpoint prematurely.

> gdb/testsuite/
> 2009-12-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 	* gdb.base/watchpoint-cond-gone.exp, gdb.base/watchpoint-cond-gone.c,
> 	gdb.base/watchpoint-cond-gone-stripped.c: New.

OK, with a few changes:
  - The copyright notices needs to be GPL v3;
  - One nit, see below.

> +    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."

We are now trying to get rid of gdb_suppress_entire_file. Can you just
"return" instead?

BTW: Thank you for using some of the convenience routines. This reminded
me that I wanted to start writing a GDB testcase writing cookbook.  Your
testcase had a lot of stuff that I wanted to put in there, so I just
finally started it!  Will send an email to gdb@ when I'm done...


More information about the Gdb-patches mailing list