]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD regtest: add small hack to mcclean_after_fork gdb script
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 6 May 2023 11:30:44 +0000 (13:30 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 6 May 2023 11:30:44 +0000 (13:30 +0200)
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

gdbserver_tests/mcclean_after_fork.stdinB.gdb
gdbserver_tests/mcclean_after_fork.stdoutB.exp

index bd2a5685f2602c2ee9c32db0d08d3e88ed68b403..bbe795f95e6d730c9c05df4294725d84817697f7 100644 (file)
@@ -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
index 590e4c93b9af30d67469f95c501d96a813a4227f..c7bdba12d2eb51f59f7a963ed2e0d7141b70a633 100644 (file)
@@ -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