From: Paul Floyd Date: Sat, 6 May 2023 11:30:44 +0000 (+0200) Subject: FreeBSD regtest: add small hack to mcclean_after_fork gdb script X-Git-Tag: VALGRIND_3_22_0~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ea25f0b0ae711bd30c6d8b21db33a633ec3e4b9;p=thirdparty%2Fvalgrind.git FreeBSD regtest: add small hack to mcclean_after_fork gdb script As far as I can tell this was a regression in FreeBSD gdb around Aug 2022 when the default install upgraded from 11.2 to 12.1 --- diff --git a/gdbserver_tests/mcclean_after_fork.stdinB.gdb b/gdbserver_tests/mcclean_after_fork.stdinB.gdb index bd2a5685f2..bbe795f95e 100644 --- a/gdbserver_tests/mcclean_after_fork.stdinB.gdb +++ b/gdbserver_tests/mcclean_after_fork.stdinB.gdb @@ -15,6 +15,9 @@ continue # put a read watchpoint on mem # we expect that the read watchpoint is not triggered in the child # (as we expect it will be cleared at fork). +# On FreeBSD directly calling rwatch mem causes an error +# calling print first fixes that as a workaround +p mem rwatch mem # continue diff --git a/gdbserver_tests/mcclean_after_fork.stdoutB.exp b/gdbserver_tests/mcclean_after_fork.stdoutB.exp index 590e4c93b9..c7bdba12d2 100644 --- a/gdbserver_tests/mcclean_after_fork.stdoutB.exp +++ b/gdbserver_tests/mcclean_after_fork.stdoutB.exp @@ -4,6 +4,7 @@ Breakpoint 3 at 0x........: file clean_after_fork.c, line 22. Continuing. Breakpoint 1, main () at clean_after_fork.c:9 9 pid = fork(); +$1 = 0 Hardware read watchpoint 4: mem Continuing. Hardware read watchpoint 4: mem