[PATCH 2/2][AArch64] Test handling of additional brk instruction patterns

Simon Marchi simark@simark.ca
Tue Jan 14 15:37:00 GMT 2020


On 2020-01-14 8:30 a.m., Luis Machado wrote:
> The idea behind the test is that GDB will get a SIGTRAP and be able to 
> step over all of the program breakpoints until the inferior exits. We 
> don't count how many of those breakpoints we've hit.
> 
> If GDB gets stuck during "continue" and doesn't hit one of the 
> breakpoints, then we throw a fail. That failure is an indication that 
> something is wrong.

It would just be one more consistency check.  If we put 4 breakpoints in the
file, but get 3 hits, there is something wrong.

Your test verifies well the failure mode that you have encountered today, but
by adding this check, it could catch some other types failure in the future.

> If someone wants to add more breakpoint patterns to the test, the .exp 
> file won't need to be changed.

I don't really think it's a problem to update the .exp file if you're changing
the .c anyway.

> Does that make sense? Or do you think it would be better to have a fixed 
> set of instruction the test is bound to?
I would add it, but it's not necessary, I'll leave that up to you. :)

Simon



More information about the Gdb-patches mailing list