]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Print extra operand information when debugging
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 17 Feb 2021 19:53:35 +0000 (19:53 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 17 Feb 2021 19:53:35 +0000 (19:53 +0000)
src/lib/server/cond_eval.c
src/lib/server/tmpl_tokenize.c

index aba3a56bede236a466f2a4e653c16908d2d0957d..866baff527e5cca542e7e3b0f659374ac8fad623 100644 (file)
@@ -610,6 +610,10 @@ int cond_eval_map(request_t *request, UNUSED int depth, fr_cond_t const *c)
        EVAL_DEBUG(">>> MAP TYPES LHS: %s, RHS: %s",
                   fr_table_str_by_value(tmpl_type_table, map->lhs->type, "???"),
                   fr_table_str_by_value(tmpl_type_table, map->rhs->type, "???"));
+#ifdef WITH_EVAL_DEBUG
+       tmpl_debug(map->lhs);
+       tmpl_debug(map->rhs);
+#endif
 
        MAP_VERIFY(map);
        preg = preg_free = NULL;
index 7cf0bdfea784c6a49d40ff6e8ecbef4eb7774b02..c0059cfe194ba340d9208e5a55833d3966f79551 100644 (file)
@@ -135,19 +135,20 @@ void tmpl_attr_ref_debug(const tmpl_attr_t *ar, int i)
                        return;
                }
 
-               FR_FAULT_LOG("\t[%u] %s %s %s%s%s%s (%u)",
+               FR_FAULT_LOG("\t[%u] %s %s %s%s%s%s (%p) attr %u",
                             i,
                             fr_table_str_by_value(attr_table, ar->type, "<INVALID>"),
                             fr_table_str_by_value(fr_value_box_type_table, ar->da->type, "<INVALID>"),
-                             ar->da->name,
+                            ar->da->name,
                             ar->num != NUM_ANY ? "[" : "",
                             ar->num != NUM_ANY ? fr_table_str_by_value(attr_num_table, ar->num, buffer) : "",
                             ar->num != NUM_ANY ? "]" : "",
+                            ar->da,
                             ar->da->attr
                );
-               if (ar->ar_parent) FR_FAULT_LOG("\t    parent     : %s", ar->ar_parent->name);
                FR_FAULT_LOG("\t    is_raw     : %s", ar->da->flags.is_raw ? "yes" : "no");
                FR_FAULT_LOG("\t    is_unknown : %s", ar->da->flags.is_unknown ? "yes" : "no");
+               if (ar->ar_parent) FR_FAULT_LOG("\t    parent     : %s (%p)", ar->ar_parent->name, ar->ar_parent);
                break;