openbsd-ports/devel/cil/patches/patch-src_cil_ml
avsm a06c692333 Add a 'kernel function call tracer' to automatically insert a call to
log() to certain functions in the kernel to help debugging.

An example use when building a kernel would be:
$ make CC='/usr/local/bin/cilly --trace-regexp=^cache_ --trace-level=0'
to instrument all functions starting with cache_* to notify syslog at
emergency log level.  The output also includes the contents of any
char/int/long arguments (pointers and structs not followed yet, too
verbose).

A full kernel build doesnt quite work with CIL yet so use selectively.
2005-05-27 06:31:52 +00:00

12 lines
663 B
Plaintext

$OpenBSD: patch-src_cil_ml,v 1.1 2005/05/27 06:31:52 avsm Exp $
--- src/cil.ml.orig Thu May 26 08:47:56 2005
+++ src/cil.ml Thu May 26 08:48:27 2005
@@ -1979,6 +1979,7 @@ let gccBuiltins : (string, typ * typ lis
(* When we parse builtin_next_arg we drop the second argument *)
H.add h "__builtin_next_arg"
((if hasbva then TBuiltin_va_list [] else voidPtrType), [], false);
+ H.add h "__builtin_frame_address" (voidPtrType, [ uintType ], false);
H.add h "__builtin_alloca" (voidPtrType, [ uintType ], false);
H.add h "__builtin_constant_p" (intType, [ intType ], false);
H.add h "__builtin_expect" (longType, [ longType; longType ], false);