[3.0] f851486 Unhide the functions we emit, so they appear in a backtrace.

Tollef Fog Heen tfheen at varnish-cache.org
Tue Nov 12 15:07:13 CET 2013


commit f851486c7de9d0617dda35663c4adae244074b7b
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/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c
index f4a85a0..4bc29c7 100644
--- a/lib/libvcl/vcc_compile.c
+++ b/lib/libvcl/vcc_compile.c
@@ -671,8 +671,13 @@ 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\n");
-		Fc(tl, 1, "VGC_function_%s (struct sess *sp)\n",
+		Fh(tl, 1, "\nint\n");
+		Fh(tl, 1,
+		    "VGC_function_%s(struct sess *sp);\n",
+		    method_tab[i].name);
+		Fc(tl, 1, "\nint\n");
+		Fc(tl, 1,
+		    "VGC_function_%s(struct sess *sp)\n",
 		    method_tab[i].name);
 		AZ(VSB_finish(tl->fm[i]));
 		Fc(tl, 1, "{\n");
diff --git a/lib/libvcl/vcc_parse.c b/lib/libvcl/vcc_parse.c
index c616c3c..4a242e5 100644
--- a/lib/libvcl/vcc_parse.c
+++ b/lib/libvcl/vcc_parse.c
@@ -222,9 +222,11 @@ vcc_Function(struct vcc *tl)
 			return;
 		}
 		tl->curproc = vcc_AddProc(tl, tl->t);
-		Fh(tl, 0, "static int VGC_function_%.*s (struct sess *sp);\n",
+		Fh(tl, 0, "int VGC_function_%.*s "
+		    "(struct sess *sp);\n", PF(tl->t));
+		Fc(tl, 1, "int VGC_function_%.*s(struct sess *sp);\n",
 		    PF(tl->t));
-		Fc(tl, 1, "\nstatic int\n");
+		Fc(tl, 1, "\nint\n");
 		Fc(tl, 1, "VGC_function_%.*s (struct sess *sp)\n", PF(tl->t));
 	}
 	vcc_NextToken(tl);



More information about the varnish-commit mailing list