From: Paul Floyd Date: Wed, 6 Apr 2022 18:51:54 +0000 (+0200) Subject: Missed macro when adding FreeBSD 13.1 X-Git-Tag: VALGRIND_3_19_0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f540c79937c6348d3cb5508f83fee0c9def73d11;p=thirdparty%2Fvalgrind.git Missed macro when adding FreeBSD 13.1 Also add the names of some new FreeBSD 14 syscalls (not yet inplemented in Valgrind). --- diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 4c45b97b9f..308bebdd86 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -594,7 +594,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, VG_(printf)(" ipsS[%d]=%#08lx rbp %#08lx rsp %#08lx\n", i-1, ips[i-1], uregs.xbp, uregs.xsp); -# if defined(VGO_darwin) || (defined(VGO_freebsd) && (FREEBSD_VERS < FREEBSD_13)) +# if defined(VGO_darwin) || (defined(VGO_freebsd) && (FREEBSD_VERS < FREEBSD_13_0)) if (VG_(is_valid_tid)(tid_if_known) && VG_(is_in_syscall)(tid_if_known) && i < max_n_ips) { diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 6088d89d70..fcbd11fbbb 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -3856,6 +3856,7 @@ POST(sys_swapcontext) POST_MEM_WRITE( ARG1, sizeof(struct vki_ucontext) ); } +// @todo PJF In FreeBSD 14 and onwards this is SYS_freebsd13_swapoff // SYS_swapoff 424 // int swapoff(const char *special); PRE(sys_swapoff) @@ -6245,7 +6246,7 @@ PRE(sys___specialfd) PRE_MEM_READ("__specialfd(req)", (Addr)ARG2, ARG3); } -#endif // (FREEBSD_VERS >= FREEBSD_13) +#endif // (FREEBSD_VERS >= FREEBSD_13_0) #undef PRE #undef POST @@ -6956,6 +6957,12 @@ const SyscallTableEntry ML_(syscall_table)[] = { // unimpl __NR_aio_readv 579 #endif +#if (FREEBSD_VERS >= FREEBSD_14) + // unimpl __NR_fspacectl 580 + // unimpl __NR_sched_getcpu 581 + // unimpl __NR_swapoff 582 +#endif + BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn };