tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH v2] Include XSTATE note in x86 core dumps



Le 05/07/2019 à 17:22, Michał Górny a écrit :
+#ifdef EXEC_ELF32
+#include <machine/netbsd32_machdep.h>
+#endif
+#define PT64_GETXSTATE		PT_GETXSTATE
+#define COREDUMP_MACHDEP_LWP_NOTES					\
+{									\
+	struct xstate xstate;						\

memset needed, otherwise we leak stuff

+	error = process_read_xstate(l, &xstate);			\
+	if (error)							\
+		return (error);						\
+	ELFNAMEEND(coredump_savenote)(ns,				\
+	    CONCAT(CONCAT(PT, ELFSIZE), _GETXSTATE), name, &xstate,	\
+	    sizeof(xstate));						\
+}


Home | Main Index | Thread Index | Old Index