[PATCH][gdb/testsuite] Fix gdb.python/py-finish-breakpoint2.exp with -m32
Tom de Vries
tdevries@suse.de
Thu Jan 21 08:45:09 GMT 2021
On 1/21/21 9:29 AM, Tom de Vries wrote:
> The different outcomes for -m32 and -m64 are both valid given the
> semantics of FinishBreakpoint, which is "set at the return address of a
> frame". It all depends where that return address is. There is no
> guarantee that the return address is an insn that uniquely represent the
> function return control path.
And, reading the documentation:
...
Function: FinishBreakpoint.out_of_scope (self)
In some circumstances (e.g. longjmp, C++ exceptions, GDB return
command, …), a function may not properly terminate, and thus never
hit the finish breakpoint. When GDB notices such a situation, the
out_of_scope callback will be triggered.
...
this may be somewhat misleading or unclear, given that it's possible (as
the -m64 case demonstrates) that both:
- the function does properly terminate, and
- the finish breakpoint still hits (meaning the stop method is called).
Thanks,
- Tom
More information about the Gdb-patches
mailing list