Hi Tom, > Rainer> While this patch avoids the failure, I wonder if there's some document > Rainer> on what it takes to actually implement catchpoints. > > There's not really docs on anything. However, most catchpoints are > implemented in break-catch-*.c. Looking at break-catch-fork.c: thanks for the explanation. I may give it a try, but probably will go for lower-hanging fruit first. In the past, I've repeatedly failed miserably with patches requiring to dive more deeply into gdb... > Rainer> + set test "probe fork catchpoint" > Rainer> + gdb_test_multiple "" $test { > Rainer> + -re "Your system does not support this type.*" { > Rainer> + unsupported $test > Rainer> + } > Rainer> + -re "$::gdb_prompt $" { > Rainer> + set ::fork_catchpoints_supported 1 > Rainer> + pass $test > Rainer> + } > Rainer> + } > Rainer> +} > > Rainer> + if {!$::fork_catchpoints_supported} { > Rainer> + return > Rainer> + } > Rainer> + > Rainer> gdb_test "catch fork" "Catchpoint ${::decimal} \\(fork\\)" \ > Rainer> "set catch fork, never expected to trigger" > > I think it would be better to just use gdb_test_multiple here, and if > the "not supported" case is found, just return here. That would avoid > starting another gdb. Good idea. I did it with the separate test before because the errors only occur on the "continue" after setting the catchpoints. So here's the revision: it certainly makes things clearer and simpler. I think it's better to go for UNSUPPORTED here instead of just skipping the rest of the test. --------------------------------------------------------------------------- As detailed in PR PR testsuite/34535, the gdb.base/break.exp test FAILs on Solaris: FAIL: gdb.base/break.exp: test_no_break_on_catchpoint: continue until exit (the program exited) warning: Error inserting catchpoint 2: Your system does not support this type of catchpoint. warning: Error inserting catchpoint 3: Your system does not support this type of catchpoint. warning: Error inserting catchpoint 4: Your system does not support this type of catchpoint. This patch handles that condition. Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University