]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD support, last loose ends
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 9 Oct 2021 13:13:50 +0000 (15:13 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 9 Oct 2021 13:13:50 +0000 (15:13 +0200)
One merge I missed and make a couple of changes to remove
compiler warnings.

coregrind/Makefile.am
coregrind/m_coredump/coredump-elf.c
coregrind/m_mallocfree.c

index 1de685bb45482cb8a52a008c0a89dfac65098ade..76c0aebc9d17b9f5ce358393783732ad5092ff5c 100644 (file)
@@ -51,6 +51,7 @@ valgrind_SOURCES = \
 endif
 if VGCONF_OS_IS_FREEBSD
 valgrind_SOURCES = \
+       launcher-freebsd.c \
        m_debuglog.c
 endif
 
index d0e8a03c947f4d675d6121161edd066a9b2eca12..0d22d01cbba6cd1030cd0e27514964cf5a15e38e 100644 (file)
@@ -490,7 +490,7 @@ static void fill_prstatus(const ThreadState *tst,
    regs[VKI_MIPS32_EF_CP0_EPC]    = arch->vex.guest_PC;
 #  undef DO
 #elif defined(VGP_amd64_freebsd)
-   regs->rflags = LibVEX_GuestAMD64_get_rflags( &((ThreadArchState*)arch)->vex );
+   regs->rflags = LibVEX_GuestAMD64_get_rflags( &arch->vex );
    regs->rsp    = arch->vex.guest_RSP;
    regs->rip    = arch->vex.guest_RIP;
    regs->rbx    = arch->vex.guest_RBX;
index 4bc24f91e56e613373bc483860822a173c5af671..90c7d9aac9b48faf80b61f239745f0b67c3e0b87 100644 (file)
@@ -1011,6 +1011,14 @@ Superblock* maybe_findSb ( Arena* a, Addr ad )
 /*--- Functions for working with freelists.                ---*/
 /*------------------------------------------------------------*/
 
+#if defined(__clang__)
+/* The nicely aligned 'returns' in the function below produce
+ * misleading indentation warnings. Rather than turn the
+ * warning off globally, just turn it off for the block of code. */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmisleading-indentation"
+#endif
+
 // Nb: Determination of which freelist a block lives on is based on the
 // payload size, not block size.
 
@@ -1120,6 +1128,10 @@ UInt pszB_to_listNo_SLOW ( SizeT pszB__divided_by__VG_MIN_MALLOC_SZB )
    vg_assert(0);
 }
 
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
 static inline
 UInt pszB_to_listNo ( SizeT pszB )
 {