Ping? I'm attaching a slightly different patch after having fixed a small style issue. I can now run the gdb-testsuite without crashing my sparc-solaris machine; not sure what have changed in the meantime. In any case, I had no new regressions and one new PASS (stack-checking.exp). OK to apply? Jerome Guitton (guitton@adacore.com): > This patch should fix gdb.base/stack-checking.exp on sparc-solaris. > GCC generates some new sequences for stack checking, we just need to > recognize them. Compare: > > sethi ,%g1 > sub %sp, %g1, %g1 > sethi , %g4 > sub %g1, %g4, %g4 > cmp %g1, %g4 > be > add %g1, -, %g1 > ba > st [%g0, [%g1]] > clr [%g4 - some immediate] > > with this new sequence: > > sethi ,%g1 > sethi , %g4 > sub %sp, %g1, %g1 > sub %g1, %g4, %g4 > cmp %g1, %g4 > be > add %g1, -, %g1 > ba > st [%g0, [%g1 - 0]] > [clr [%g4 - some immediate]] > > Two differences: > * first, the probing loop has been slightly reordered; > * second, to clear a memory location, GCC may now generate > "st %g0, [%g1+0]" instead of "st %g0, [%g1]". The same effect, > but a different instruction format. > > Also, the last probe may not be generated if the probe loop leaves no > remainder. > > I cannot run the testsuite on sparc solaris, as it crashes the machine > pretty badly. We ought to identify the test that causes this crash. > I could run stack-checking.exp and check that it fixes one regression > though. And I tested against AdaCore's testsuite, which > is already a fairly good insurance that this patch is safe. > OK to apply?