[master] 69455be Unhide the functions we emit, so they appear in a backtrace.

Poul-Henning Kamp phk at varnish-cache.org
Mon Nov 4 12:38:09 CET 2013


commit 69455becb50a2e168bffe41825194335ebd74352
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Nov 4 11:37:53 2013 +0000

    Unhide the functions we emit, so they appear in a backtrace.

diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index 41b8ede..70f976a 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -694,7 +694,11 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp)
 
 	/* Emit method functions */
 	for (i = 0; i < VCL_MET_MAX; i++) {
-		Fc(tl, 1, "\nstatic int __match_proto__(vcl_func_f)\n");
+		Fh(tl, 1, "\nint __match_proto__(vcl_func_f)\n");
+		Fh(tl, 1,
+		    "VGC_function_%s(const struct vrt_ctx *ctx);\n",
+		    method_tab[i].name);
+		Fc(tl, 1, "\nint __match_proto__(vcl_func_f)\n");
 		Fc(tl, 1,
 		    "VGC_function_%s(const struct vrt_ctx *ctx)\n",
 		    method_tab[i].name);
diff --git a/lib/libvcc/vcc_parse.c b/lib/libvcc/vcc_parse.c
index e161b89..500f87e 100644
--- a/lib/libvcc/vcc_parse.c
+++ b/lib/libvcc/vcc_parse.c
@@ -250,9 +250,9 @@ vcc_ParseFunction(struct vcc *tl)
 			return;
 		}
 		tl->curproc = vcc_AddProc(tl, tl->t);
-		Fh(tl, 0, "static int VGC_function_%.*s "
+		Fh(tl, 0, "int VGC_function_%.*s "
 		    "(const struct vrt_ctx *ctx);\n", PF(tl->t));
-		Fc(tl, 1, "\nstatic int __match_proto__(vcl_func_t)\n");
+		Fc(tl, 1, "\nint __match_proto__(vcl_func_t)\n");
 		Fc(tl, 1, "VGC_function_%.*s(const struct vrt_ctx *ctx)\n",
 		    PF(tl->t));
 	}



More information about the varnish-commit mailing list