[ was: Re: [PATCH][gdb/testsuite] Work around skip_prologue problems in gdb.threads/process-dies-while-detaching.exp ] On 11/2/21 6:13 PM, Kevin Buettner wrote: > On Tue, 2 Nov 2021 12:38:26 +0100 > Tom de Vries via Gdb-patches wrote: > >> On 10/29/21 9:24 PM, Tom de Vries via Gdb-patches wrote: >>> Hi, >>> >>> On powerpc64le-linux, I run into: >>> ... >>> [Inferior 1 (process 5156) exited normally]^M >>> (gdb) FAIL: gdb.threads/process-dies-while-detaching.exp: single-process: \ >>> detach: detach: continue to breakpoint: _exit (the program exited) >>> ... >>> >>> What happens is the following: >>> - a breakpoint is set on _exit, >>> - a continue is issued >>> - the continue is supposed to hit the breakpoint, but instead >>> the program exits. >>> >>> I traced this down to the breakpoint on _exit being set too far from function >>> entry. This is caused by the skip_prologue function (in rs6000-tdep.c) >>> optimistically ignoring insns it doesn't recognize. In particular, it walks >>> past the system call instruction "sc" which initiates the actual exit. >>> >>> While this needs fixing, >> >> Filed here: https://sourceware.org/bugzilla/show_bug.cgi?id=28527 . >> >> Submitted patch here: >> https://sourceware.org/pipermail/gdb-patches/2021-November/183016.html . >> >> Thanks, >> - Tom >> >>> we don't want to be testing this behaviour in this >>> test-case. > > Since you've fixed the problem in skip_prologue(), I'd prefer that this > testsuite patch not go in. One possible objection would be that otherwise we no longer excercise the problem, so here's a test-case for that. Any comments? Thanks, - Tom