tech-toolchain archive

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

libsanitizer per-arch defines



Why not make this but for every architecture?
I needed RISCV.

It seems like it matches for a lot of them.

Index: external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc,v
retrieving revision 1.26
diff -u -r1.26 sanitizer_linux.cc
--- external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	5 Feb 2019 12:56:43 -0000	1.26
+++ external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc	15 Apr 2019 15:44:09 -0000
@@ -1542,6 +1542,11 @@
   *pc = _UC_MACHINE_PC(ucontext);
   *sp = _UC_MACHINE_SP(ucontext);
   *bp = ucontext->uc_mcontext.__gregs[1];	/* XXX */
+#elif SANITIZER_NETBSD
+  ucontext_t *ucontext = (ucontext_t*)context;
+  *pc = _UC_MACHINE_PC(ucontext);
+  *sp = _UC_MACHINE_SP(ucontext);
+  *bp = _UC_MACHINE_FP(ucontext);
 #elif defined(__s390__)
   ucontext_t *ucontext = (ucontext_t*)context;
 # if defined(__s390x__)



Home | Main Index | Thread Index | Old Index