mirror of https://gerrit.osmocom.org/asn1c
different debug
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@780 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
5d0785979c
commit
fd24593938
|
@ -347,7 +347,7 @@ asn1f_resolve_constraints(arg_t *arg) {
|
|||
etype = top_parent->expr_type;
|
||||
else etype = A1TC_INVALID;
|
||||
|
||||
DEBUG("asn1f_resolve_constraints(%s)", arg->expr->Identifier);
|
||||
DEBUG("(%s)", arg->expr->Identifier);
|
||||
|
||||
ret = asn1constraint_resolve(arg, arg->expr->module,
|
||||
arg->expr->constraints, etype, 0);
|
||||
|
@ -367,7 +367,7 @@ asn1f_check_constraints(arg_t *arg) {
|
|||
int rvalue = 0;
|
||||
int ret;
|
||||
|
||||
DEBUG("asn1f_check_constraints(%s{%d/%d})",
|
||||
DEBUG("(%s{%d/%d})",
|
||||
arg->expr->Identifier,
|
||||
arg->expr->meta_type, arg->expr->expr_type);
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@ asn1f_fix_bit_string(arg_t *arg) {
|
|||
if(expr->meta_type == AMT_VALUE) {
|
||||
asn1p_expr_t *ttype;
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
expr->Identifier, expr->_lineno);
|
||||
DEBUG("(%s) for line %d", expr->Identifier, expr->_lineno);
|
||||
|
||||
ttype = asn1f_find_terminal_type(arg, expr);
|
||||
if(ttype && ttype->expr_type == ASN_BASIC_BIT_STRING) {
|
||||
|
@ -31,7 +30,7 @@ asn1f_fix_bit_string_value(arg_t *arg, asn1p_expr_t *ttype) {
|
|||
asn1p_expr_t *expr = arg->expr;
|
||||
int r_value = 0;
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
DEBUG("(%s) for line %d",
|
||||
expr->Identifier, expr->_lineno);
|
||||
|
||||
switch(expr->value->type) {
|
||||
|
|
|
@ -32,9 +32,7 @@ asn1f_class_access(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
|
|||
|
||||
assert(ref->comp_count > 1);
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
asn1f_printable_reference(ref),
|
||||
ref->_lineno);
|
||||
DEBUG("(%s) for line %d", asn1f_printable_reference(ref), ref->_lineno);
|
||||
|
||||
/*
|
||||
* Fetch the first part of the reference (OBJECT or ObjectSet).
|
||||
|
|
|
@ -13,7 +13,7 @@ asn1f_check_type_compatibility(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b) {
|
|||
atype = a->expr_type;
|
||||
btype = b->expr_type;
|
||||
|
||||
DEBUG("%s(%s:%x@%d, %s:%x@%d)", __func__,
|
||||
DEBUG("(%s:%x@%d, %s:%x@%d)",
|
||||
a->Identifier, atype, a->_lineno,
|
||||
b->Identifier, btype, b->_lineno);
|
||||
|
||||
|
|
|
@ -104,8 +104,7 @@ asn1f_fix_constr_ext(arg_t *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
expr->Identifier, expr->_lineno);
|
||||
DEBUG("(%s) for line %d", expr->Identifier, expr->_lineno);
|
||||
|
||||
TQ_INIT(&root_list);
|
||||
TQ_INIT(&ext_list);
|
||||
|
@ -181,8 +180,7 @@ asn1f_fix_constr_tag(arg_t *arg, int fix_top_level) {
|
|||
int component_number = 0;
|
||||
int r_value = 0;
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
expr->Identifier, expr->_lineno);
|
||||
DEBUG("(%s) for line %d", expr->Identifier, expr->_lineno);
|
||||
|
||||
/*
|
||||
* Fix the top-level type itself first.
|
||||
|
@ -296,8 +294,7 @@ asn1f_fix_constr_autotag(arg_t *arg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
expr->Identifier, expr->_lineno);
|
||||
DEBUG("(%s) for line %d", expr->Identifier, expr->_lineno);
|
||||
|
||||
TQ_FOR(v, &(expr->members), next) {
|
||||
int must_explicit;
|
||||
|
|
|
@ -124,6 +124,8 @@ asn1constraint_resolve(arg_t *arg, asn1p_module_t *mod, asn1p_constraint_t *ct,
|
|||
int rvalue = 0;
|
||||
int ret;
|
||||
|
||||
DEBUG("%s", arg->expr->Identifier);
|
||||
|
||||
if(!ct) return 0;
|
||||
|
||||
/* Don't touch information object classes */
|
||||
|
|
|
@ -17,8 +17,7 @@ asn1f_fix_cstring(arg_t *arg) {
|
|||
int buflen = expr->value->value.string.size;
|
||||
int start = 0;
|
||||
|
||||
DEBUG("%s(%s) for line %d", __func__,
|
||||
expr->Identifier, expr->_lineno);
|
||||
DEBUG("(%s) for line %d", expr->Identifier, expr->_lineno);
|
||||
|
||||
while(_asn1f_cstring_find_line_pattern(buf + start, &cp)) {
|
||||
assert(cp.length);
|
||||
|
|
|
@ -15,8 +15,8 @@ asn1f_fix_dereference_types(arg_t *arg) {
|
|||
return 0; /* Just ignore it */
|
||||
}
|
||||
|
||||
DEBUG("%s(\"%s\":%x ::= \"%s\") for line %d",
|
||||
__func__, expr->Identifier, expr->expr_type,
|
||||
DEBUG("(\"%s\":%x ::= \"%s\") for line %d",
|
||||
expr->Identifier, expr->expr_type,
|
||||
asn1f_printable_value(expr->value),
|
||||
expr->_lineno);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ asn1f_fix_enum(arg_t *arg) {
|
|||
if(expr->expr_type != ASN_BASIC_ENUMERATED)
|
||||
return 0; /* Just ignore it */
|
||||
|
||||
DEBUG("%s(%s)", __func__, expr->Identifier);
|
||||
DEBUG("(%s)", expr->Identifier);
|
||||
|
||||
/*
|
||||
* 1. Scan the enumeration values in search for inconsistencies.
|
||||
|
|
|
@ -23,7 +23,7 @@ asn1f_fix_integer(arg_t *arg) {
|
|||
if(expr->expr_type != ASN_BASIC_INTEGER)
|
||||
return 0; /* Just ignore it */
|
||||
|
||||
DEBUG("%s(\"%s\", %x) for line %d", __func__,
|
||||
DEBUG("(\"%s\", %x) for line %d",
|
||||
expr->Identifier, expr->expr_type, expr->_lineno);
|
||||
|
||||
/*
|
||||
|
|
|
@ -104,8 +104,9 @@ typedef struct arg_s {
|
|||
int _save_errno = errno; \
|
||||
if(code < 0) { \
|
||||
if(arg->debug) \
|
||||
arg->debug(code, fmt " in %s (%s:%d)", \
|
||||
##args, \
|
||||
arg->debug(code, \
|
||||
"%s: " fmt " in %s (%s:%d)", \
|
||||
__func__, ##args, \
|
||||
arg->mod->source_file_name, \
|
||||
__FILE__, __LINE__); \
|
||||
} else if(arg->eh) { \
|
||||
|
|
|
@ -15,8 +15,8 @@ asn1f_fix_parametrized_assignment(arg_t *arg) {
|
|||
assert(expr->expr_type == A1TC_PARAMETRIZED);
|
||||
assert(expr->reference);
|
||||
|
||||
DEBUG("%s(\"%s\" ::= \"%s\" { %s }) for line %d",
|
||||
__func__, expr->Identifier,
|
||||
DEBUG("(\"%s\" ::= \"%s\" { %s }) for line %d",
|
||||
expr->Identifier,
|
||||
asn1f_printable_reference(expr->reference),
|
||||
asn1f_printable_value(expr->value),
|
||||
expr->_lineno);
|
||||
|
|
|
@ -152,7 +152,7 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
|
|||
* All other forms are not implemented at this moment.
|
||||
*/
|
||||
|
||||
DEBUG("%s(%s) in %s for line %d", __func__,
|
||||
DEBUG("(%s) in %s for line %d",
|
||||
asn1f_printable_reference(ref),
|
||||
mod->Identifier,
|
||||
ref->_lineno);
|
||||
|
@ -292,8 +292,8 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, int type_or_value) {
|
|||
ref = expr->reference;
|
||||
}
|
||||
|
||||
DEBUG("%s:%s(%s->%s) for line %d",
|
||||
__func__, type_or_value?"VALUE":"TYPE",
|
||||
DEBUG("%s(%s->%s) for line %d",
|
||||
type_or_value?"VALUE":"TYPE",
|
||||
expr->Identifier, asn1f_printable_reference(ref),
|
||||
expr->_lineno);
|
||||
|
||||
|
|
|
@ -16,14 +16,14 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
|
|||
if(expr->value->type != ATV_REFERENCED)
|
||||
return 0;
|
||||
|
||||
DEBUG("%s(=\"%s\", %x)", __func__,
|
||||
DEBUG("(=\"%s\", %x)",
|
||||
asn1f_printable_value(expr->value), expr->expr_type);
|
||||
|
||||
/*
|
||||
* 1. Find the terminal type for this assignment.
|
||||
*/
|
||||
type_expr = asn1f_find_terminal_type(arg, expr);
|
||||
DEBUG("%s(): terminal type %p", __func__, type_expr);
|
||||
DEBUG("terminal type %p", type_expr);
|
||||
if(type_expr == 0) {
|
||||
FATAL("Terminal type for is %s not found", expr->Identifier);
|
||||
return -1;
|
||||
|
@ -148,7 +148,7 @@ asn1f_look_value_in_type(arg_t *arg,
|
|||
&& type_expr->expr_type != ASN_BASIC_ENUMERATED)
|
||||
return 0;
|
||||
|
||||
DEBUG("%s(for %s in %s %x) for line %d", __func__,
|
||||
DEBUG("(for %s in %s %x) for line %d",
|
||||
asn1f_printable_value(value_expr->value),
|
||||
type_expr->Identifier,
|
||||
type_expr->expr_type,
|
||||
|
|
Loading…
Reference in New Issue