Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
03850188
Commit
03850188
authored
Mar 10, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
different debug
parent
f70ce0b3
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
27 additions
and
31 deletions
+27
-31
libasn1fix/asn1fix.c
libasn1fix/asn1fix.c
+2
-2
libasn1fix/asn1fix_bitstring.c
libasn1fix/asn1fix_bitstring.c
+2
-3
libasn1fix/asn1fix_class.c
libasn1fix/asn1fix_class.c
+1
-3
libasn1fix/asn1fix_compat.c
libasn1fix/asn1fix_compat.c
+1
-1
libasn1fix/asn1fix_constr.c
libasn1fix/asn1fix_constr.c
+3
-6
libasn1fix/asn1fix_constraint.c
libasn1fix/asn1fix_constraint.c
+2
-0
libasn1fix/asn1fix_cstring.c
libasn1fix/asn1fix_cstring.c
+1
-2
libasn1fix/asn1fix_dereft.c
libasn1fix/asn1fix_dereft.c
+2
-2
libasn1fix/asn1fix_enum.c
libasn1fix/asn1fix_enum.c
+1
-1
libasn1fix/asn1fix_integer.c
libasn1fix/asn1fix_integer.c
+1
-1
libasn1fix/asn1fix_internal.h
libasn1fix/asn1fix_internal.h
+3
-2
libasn1fix/asn1fix_param.c
libasn1fix/asn1fix_param.c
+2
-2
libasn1fix/asn1fix_retrieve.c
libasn1fix/asn1fix_retrieve.c
+3
-3
libasn1fix/asn1fix_value.c
libasn1fix/asn1fix_value.c
+3
-3
No files found.
libasn1fix/asn1fix.c
View file @
03850188
...
@@ -347,7 +347,7 @@ asn1f_resolve_constraints(arg_t *arg) {
...
@@ -347,7 +347,7 @@ asn1f_resolve_constraints(arg_t *arg) {
etype
=
top_parent
->
expr_type
;
etype
=
top_parent
->
expr_type
;
else
etype
=
A1TC_INVALID
;
else
etype
=
A1TC_INVALID
;
DEBUG
(
"
asn1f_resolve_constraints
(%s)"
,
arg
->
expr
->
Identifier
);
DEBUG
(
"(%s)"
,
arg
->
expr
->
Identifier
);
ret
=
asn1constraint_resolve
(
arg
,
arg
->
expr
->
module
,
ret
=
asn1constraint_resolve
(
arg
,
arg
->
expr
->
module
,
arg
->
expr
->
constraints
,
etype
,
0
);
arg
->
expr
->
constraints
,
etype
,
0
);
...
@@ -367,7 +367,7 @@ asn1f_check_constraints(arg_t *arg) {
...
@@ -367,7 +367,7 @@ asn1f_check_constraints(arg_t *arg) {
int
rvalue
=
0
;
int
rvalue
=
0
;
int
ret
;
int
ret
;
DEBUG
(
"
asn1f_check_constraints
(%s{%d/%d})"
,
DEBUG
(
"(%s{%d/%d})"
,
arg
->
expr
->
Identifier
,
arg
->
expr
->
Identifier
,
arg
->
expr
->
meta_type
,
arg
->
expr
->
expr_type
);
arg
->
expr
->
meta_type
,
arg
->
expr
->
expr_type
);
...
...
libasn1fix/asn1fix_bitstring.c
View file @
03850188
...
@@ -13,8 +13,7 @@ asn1f_fix_bit_string(arg_t *arg) {
...
@@ -13,8 +13,7 @@ asn1f_fix_bit_string(arg_t *arg) {
if
(
expr
->
meta_type
==
AMT_VALUE
)
{
if
(
expr
->
meta_type
==
AMT_VALUE
)
{
asn1p_expr_t
*
ttype
;
asn1p_expr_t
*
ttype
;
DEBUG
(
"%s(%s) for line %d"
,
__func__
,
DEBUG
(
"(%s) for line %d"
,
expr
->
Identifier
,
expr
->
_lineno
);
expr
->
Identifier
,
expr
->
_lineno
);
ttype
=
asn1f_find_terminal_type
(
arg
,
expr
);
ttype
=
asn1f_find_terminal_type
(
arg
,
expr
);
if
(
ttype
&&
ttype
->
expr_type
==
ASN_BASIC_BIT_STRING
)
{
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) {
...
@@ -31,7 +30,7 @@ asn1f_fix_bit_string_value(arg_t *arg, asn1p_expr_t *ttype) {
asn1p_expr_t
*
expr
=
arg
->
expr
;
asn1p_expr_t
*
expr
=
arg
->
expr
;
int
r_value
=
0
;
int
r_value
=
0
;
DEBUG
(
"
%s(%s) for line %d"
,
__func__
,
DEBUG
(
"
(%s) for line %d"
,
expr
->
Identifier
,
expr
->
_lineno
);
expr
->
Identifier
,
expr
->
_lineno
);
switch
(
expr
->
value
->
type
)
{
switch
(
expr
->
value
->
type
)
{
...
...
libasn1fix/asn1fix_class.c
View file @
03850188
...
@@ -32,9 +32,7 @@ asn1f_class_access(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
...
@@ -32,9 +32,7 @@ asn1f_class_access(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
assert
(
ref
->
comp_count
>
1
);
assert
(
ref
->
comp_count
>
1
);
DEBUG
(
"%s(%s) for line %d"
,
__func__
,
DEBUG
(
"(%s) for line %d"
,
asn1f_printable_reference
(
ref
),
ref
->
_lineno
);
asn1f_printable_reference
(
ref
),
ref
->
_lineno
);
/*
/*
* Fetch the first part of the reference (OBJECT or ObjectSet).
* Fetch the first part of the reference (OBJECT or ObjectSet).
...
...
libasn1fix/asn1fix_compat.c
View file @
03850188
...
@@ -13,7 +13,7 @@ asn1f_check_type_compatibility(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b) {
...
@@ -13,7 +13,7 @@ asn1f_check_type_compatibility(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b) {
atype
=
a
->
expr_type
;
atype
=
a
->
expr_type
;
btype
=
b
->
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
,
a
->
Identifier
,
atype
,
a
->
_lineno
,
b
->
Identifier
,
btype
,
b
->
_lineno
);
b
->
Identifier
,
btype
,
b
->
_lineno
);
...
...
libasn1fix/asn1fix_constr.c
View file @
03850188
...
@@ -104,8 +104,7 @@ asn1f_fix_constr_ext(arg_t *arg) {
...
@@ -104,8 +104,7 @@ asn1f_fix_constr_ext(arg_t *arg) {
return
0
;
return
0
;
}
}
DEBUG
(
"%s(%s) for line %d"
,
__func__
,
DEBUG
(
"(%s) for line %d"
,
expr
->
Identifier
,
expr
->
_lineno
);
expr
->
Identifier
,
expr
->
_lineno
);
TQ_INIT
(
&
root_list
);
TQ_INIT
(
&
root_list
);
TQ_INIT
(
&
ext_list
);
TQ_INIT
(
&
ext_list
);
...
@@ -181,8 +180,7 @@ asn1f_fix_constr_tag(arg_t *arg, int fix_top_level) {
...
@@ -181,8 +180,7 @@ asn1f_fix_constr_tag(arg_t *arg, int fix_top_level) {
int
component_number
=
0
;
int
component_number
=
0
;
int
r_value
=
0
;
int
r_value
=
0
;
DEBUG
(
"%s(%s) for line %d"
,
__func__
,
DEBUG
(
"(%s) for line %d"
,
expr
->
Identifier
,
expr
->
_lineno
);
expr
->
Identifier
,
expr
->
_lineno
);
/*
/*
* Fix the top-level type itself first.
* Fix the top-level type itself first.
...
@@ -296,8 +294,7 @@ asn1f_fix_constr_autotag(arg_t *arg) {
...
@@ -296,8 +294,7 @@ asn1f_fix_constr_autotag(arg_t *arg) {
return
0
;
return
0
;
}
}
DEBUG
(
"%s(%s) for line %d"
,
__func__
,
DEBUG
(
"(%s) for line %d"
,
expr
->
Identifier
,
expr
->
_lineno
);
expr
->
Identifier
,
expr
->
_lineno
);
TQ_FOR
(
v
,
&
(
expr
->
members
),
next
)
{
TQ_FOR
(
v
,
&
(
expr
->
members
),
next
)
{
int
must_explicit
;
int
must_explicit
;
...
...
libasn1fix/asn1fix_constraint.c
View file @
03850188
...
@@ -124,6 +124,8 @@ asn1constraint_resolve(arg_t *arg, asn1p_module_t *mod, asn1p_constraint_t *ct,
...
@@ -124,6 +124,8 @@ asn1constraint_resolve(arg_t *arg, asn1p_module_t *mod, asn1p_constraint_t *ct,
int
rvalue
=
0
;
int
rvalue
=
0
;
int
ret
;
int
ret
;
DEBUG
(
"%s"
,
arg
->
expr
->
Identifier
);
if
(
!
ct
)
return
0
;
if
(
!
ct
)
return
0
;
/* Don't touch information object classes */
/* Don't touch information object classes */
...
...
libasn1fix/asn1fix_cstring.c
View file @
03850188
...
@@ -17,8 +17,7 @@ asn1f_fix_cstring(arg_t *arg) {
...
@@ -17,8 +17,7 @@ asn1f_fix_cstring(arg_t *arg) {
int
buflen
=
expr
->
value
->
value
.
string
.
size
;
int
buflen
=
expr
->
value
->
value
.
string
.
size
;
int
start
=
0
;
int
start
=
0
;
DEBUG
(
"%s(%s) for line %d"
,
__func__
,
DEBUG
(
"(%s) for line %d"
,
expr
->
Identifier
,
expr
->
_lineno
);
expr
->
Identifier
,
expr
->
_lineno
);
while
(
_asn1f_cstring_find_line_pattern
(
buf
+
start
,
&
cp
))
{
while
(
_asn1f_cstring_find_line_pattern
(
buf
+
start
,
&
cp
))
{
assert
(
cp
.
length
);
assert
(
cp
.
length
);
...
...
libasn1fix/asn1fix_dereft.c
View file @
03850188
...
@@ -15,8 +15,8 @@ asn1f_fix_dereference_types(arg_t *arg) {
...
@@ -15,8 +15,8 @@ asn1f_fix_dereference_types(arg_t *arg) {
return
0
;
/* Just ignore it */
return
0
;
/* Just ignore it */
}
}
DEBUG
(
"
%s
(
\"
%s
\"
:%x ::=
\"
%s
\"
) for line %d"
,
DEBUG
(
"(
\"
%s
\"
:%x ::=
\"
%s
\"
) for line %d"
,
__func__
,
expr
->
Identifier
,
expr
->
expr_type
,
expr
->
Identifier
,
expr
->
expr_type
,
asn1f_printable_value
(
expr
->
value
),
asn1f_printable_value
(
expr
->
value
),
expr
->
_lineno
);
expr
->
_lineno
);
...
...
libasn1fix/asn1fix_enum.c
View file @
03850188
...
@@ -15,7 +15,7 @@ asn1f_fix_enum(arg_t *arg) {
...
@@ -15,7 +15,7 @@ asn1f_fix_enum(arg_t *arg) {
if
(
expr
->
expr_type
!=
ASN_BASIC_ENUMERATED
)
if
(
expr
->
expr_type
!=
ASN_BASIC_ENUMERATED
)
return
0
;
/* Just ignore it */
return
0
;
/* Just ignore it */
DEBUG
(
"
%s(%s)"
,
__func__
,
expr
->
Identifier
);
DEBUG
(
"
(%s)"
,
expr
->
Identifier
);
/*
/*
* 1. Scan the enumeration values in search for inconsistencies.
* 1. Scan the enumeration values in search for inconsistencies.
...
...
libasn1fix/asn1fix_integer.c
View file @
03850188
...
@@ -23,7 +23,7 @@ asn1f_fix_integer(arg_t *arg) {
...
@@ -23,7 +23,7 @@ asn1f_fix_integer(arg_t *arg) {
if
(
expr
->
expr_type
!=
ASN_BASIC_INTEGER
)
if
(
expr
->
expr_type
!=
ASN_BASIC_INTEGER
)
return
0
;
/* Just ignore it */
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
);
expr
->
Identifier
,
expr
->
expr_type
,
expr
->
_lineno
);
/*
/*
...
...
libasn1fix/asn1fix_internal.h
View file @
03850188
...
@@ -104,8 +104,9 @@ typedef struct arg_s {
...
@@ -104,8 +104,9 @@ typedef struct arg_s {
int _save_errno = errno; \
int _save_errno = errno; \
if(code < 0) { \
if(code < 0) { \
if(arg->debug) \
if(arg->debug) \
arg->debug(code, fmt " in %s (%s:%d)", \
arg->debug(code, \
##args, \
"%s: " fmt " in %s (%s:%d)", \
__func__, ##args, \
arg->mod->source_file_name, \
arg->mod->source_file_name, \
__FILE__, __LINE__); \
__FILE__, __LINE__); \
} else if(arg->eh) { \
} else if(arg->eh) { \
...
...
libasn1fix/asn1fix_param.c
View file @
03850188
...
@@ -15,8 +15,8 @@ asn1f_fix_parametrized_assignment(arg_t *arg) {
...
@@ -15,8 +15,8 @@ asn1f_fix_parametrized_assignment(arg_t *arg) {
assert
(
expr
->
expr_type
==
A1TC_PARAMETRIZED
);
assert
(
expr
->
expr_type
==
A1TC_PARAMETRIZED
);
assert
(
expr
->
reference
);
assert
(
expr
->
reference
);
DEBUG
(
"
%s
(
\"
%s
\"
::=
\"
%s
\"
{ %s }) for line %d"
,
DEBUG
(
"(
\"
%s
\"
::=
\"
%s
\"
{ %s }) for line %d"
,
__func__
,
expr
->
Identifier
,
expr
->
Identifier
,
asn1f_printable_reference
(
expr
->
reference
),
asn1f_printable_reference
(
expr
->
reference
),
asn1f_printable_value
(
expr
->
value
),
asn1f_printable_value
(
expr
->
value
),
expr
->
_lineno
);
expr
->
_lineno
);
...
...
libasn1fix/asn1fix_retrieve.c
View file @
03850188
...
@@ -152,7 +152,7 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
...
@@ -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.
* 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
),
asn1f_printable_reference
(
ref
),
mod
->
Identifier
,
mod
->
Identifier
,
ref
->
_lineno
);
ref
->
_lineno
);
...
@@ -292,8 +292,8 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, int type_or_value) {
...
@@ -292,8 +292,8 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, int type_or_value) {
ref
=
expr
->
reference
;
ref
=
expr
->
reference
;
}
}
DEBUG
(
"%s
:%s
(%s->%s) for line %d"
,
DEBUG
(
"%s(%s->%s) for line %d"
,
__func__
,
type_or_value
?
"VALUE"
:
"TYPE"
,
type_or_value
?
"VALUE"
:
"TYPE"
,
expr
->
Identifier
,
asn1f_printable_reference
(
ref
),
expr
->
Identifier
,
asn1f_printable_reference
(
ref
),
expr
->
_lineno
);
expr
->
_lineno
);
...
...
libasn1fix/asn1fix_value.c
View file @
03850188
...
@@ -16,14 +16,14 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
...
@@ -16,14 +16,14 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
if
(
expr
->
value
->
type
!=
ATV_REFERENCED
)
if
(
expr
->
value
->
type
!=
ATV_REFERENCED
)
return
0
;
return
0
;
DEBUG
(
"
%s(=
\"
%s
\"
, %x)"
,
__func__
,
DEBUG
(
"
(=
\"
%s
\"
, %x)"
,
asn1f_printable_value
(
expr
->
value
),
expr
->
expr_type
);
asn1f_printable_value
(
expr
->
value
),
expr
->
expr_type
);
/*
/*
* 1. Find the terminal type for this assignment.
* 1. Find the terminal type for this assignment.
*/
*/
type_expr
=
asn1f_find_terminal_type
(
arg
,
expr
);
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
)
{
if
(
type_expr
==
0
)
{
FATAL
(
"Terminal type for is %s not found"
,
expr
->
Identifier
);
FATAL
(
"Terminal type for is %s not found"
,
expr
->
Identifier
);
return
-
1
;
return
-
1
;
...
@@ -148,7 +148,7 @@ asn1f_look_value_in_type(arg_t *arg,
...
@@ -148,7 +148,7 @@ asn1f_look_value_in_type(arg_t *arg,
&&
type_expr
->
expr_type
!=
ASN_BASIC_ENUMERATED
)
&&
type_expr
->
expr_type
!=
ASN_BASIC_ENUMERATED
)
return
0
;
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
),
asn1f_printable_value
(
value_expr
->
value
),
type_expr
->
Identifier
,
type_expr
->
Identifier
,
type_expr
->
expr_type
,
type_expr
->
expr_type
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment