static void
pan_sess(const struct sess *sp)
{
- const char *stp;
+ const char *stp, *hand;
vsb_printf(vsp, "sp = %p {\n", sp);
vsb_printf(vsp,
#define STEP(l, u) case STP_##u: stp = "STP_" #u; break;
#include "steps.h"
#undef STEP
+/*lint -restore */
+ default: stp = NULL;
+ }
+ switch (sp->handling) {
+/*lint -save -e525 */
+#define VCL_RET_MAC(l, u, b, v) case VCL_RET_##u: hand = #u; break;
+#define VCL_RET_MAC_E(l, u, b, v) case VCL_RET_##u: hand = #u; break;
+#include "vcl_returns.h"
+#undef VCL_RET_MAC
+#undef VCL_RET_MAC_E
/*lint -restore */
default: stp = NULL;
}
vsb_printf(vsp, " step = %s,\n", stp);
else
vsb_printf(vsp, " step = 0x%x,\n", sp->step);
+ if (stp != NULL)
+ vsb_printf(vsp, " handling = %s,\n", hand);
+ else
+ vsb_printf(vsp, " handling = 0x%x,\n", sp->handling);
if (sp->err_code)
vsb_printf(vsp,
" err_code = %d, err_reason = %s,\n", sp->err_code,
const struct sess *sp;
switch(xxx) {
+ case 3:
+ vsb_printf(vsp,
+ "Wrong turn:\n%s\n", cond);
+ break;
case 2:
vsb_printf(vsp,
"Panic from VCL:\n%s\n", cond);
#define XXXAZ(foo) do { xxxassert((foo) == 0); } while (0)
#define XXXAN(foo) do { xxxassert((foo) != 0); } while (0)
#define diagnostic(foo) assert(foo)
+#define WRONG(expl) \
+do { \
+ lbv_assert(__func__, __FILE__, __LINE__, expl, errno, 3); \
+} while (0)