Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qwebaby3
asn1c
Commits
d8095522
Commit
d8095522
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
better debugging
parent
1a447955
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libasn1fix/asn1fix_retrieve.c
+37
-4
37 additions, 4 deletions
libasn1fix/asn1fix_retrieve.c
with
37 additions
and
4 deletions
libasn1fix/asn1fix_retrieve.c
+
37
−
4
View file @
d8095522
...
@@ -48,6 +48,13 @@ asn1f_lookup_in_imports(arg_t *arg, asn1p_module_t *mod, const char *name) {
...
@@ -48,6 +48,13 @@ asn1f_lookup_in_imports(arg_t *arg, asn1p_module_t *mod, const char *name) {
*/
*/
mod
=
asn1f_lookup_module
(
arg
,
xp
->
from
,
xp
->
from_oid
);
mod
=
asn1f_lookup_module
(
arg
,
xp
->
from
,
xp
->
from_oid
);
if
(
mod
==
NULL
)
{
if
(
mod
==
NULL
)
{
/* Conditional debug */
if
(
!
(
arg
->
expr
->
_mark
&
TM_BROKEN
))
{
arg
->
expr
->
_mark
|=
TM_BROKEN
;
FATAL
(
"Cannot find module %s "
"mentioned for %s at line %d"
,
xp
->
from
,
name
,
arg
->
expr
->
_lineno
);
}
/* ENOENT/ETOOMANYREFS */
/* ENOENT/ETOOMANYREFS */
return
NULL
;
return
NULL
;
}
}
...
@@ -220,6 +227,7 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
...
@@ -220,6 +227,7 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
*/
*/
if
(
imports_from
)
{
if
(
imports_from
)
{
asn1p_ref_t
tmpref
=
*
ref
;
asn1p_ref_t
tmpref
=
*
ref
;
asn1p_expr_t
*
expr
;
if
(
modulename
)
{
if
(
modulename
)
{
/*
/*
* The modulename is specified inside this reference.
* The modulename is specified inside this reference.
...
@@ -230,7 +238,26 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
...
@@ -230,7 +238,26 @@ asn1f_lookup_symbol(arg_t *arg, asn1p_module_t *mod, asn1p_ref_t *ref) {
tmpref
.
comp_count
--
;
tmpref
.
comp_count
--
;
assert
(
tmpref
.
comp_count
>
0
);
assert
(
tmpref
.
comp_count
>
0
);
}
}
return
asn1f_lookup_symbol
(
arg
,
imports_from
,
&
tmpref
);
expr
=
asn1f_lookup_symbol
(
arg
,
imports_from
,
&
tmpref
);
if
(
!
expr
&&
!
(
arg
->
expr
->
_mark
&
TM_BROKEN
))
{
arg
->
expr
->
_mark
|=
TM_BROKEN
;
if
(
modulename
)
{
FATAL
(
"Module %s referred by %s in module %s "
"does not contain the requested symbol"
,
imports_from
->
Identifier
,
asn1f_printable_reference
(
ref
),
mod
->
Identifier
);
}
else
{
FATAL
(
"Module %s referred in IMPORTS section "
"for %s of module %s does not contain "
"the requested symbol"
,
imports_from
->
Identifier
,
asn1f_printable_reference
(
ref
),
mod
->
Identifier
);
}
}
return
expr
;
}
}
/*
/*
...
@@ -316,7 +343,7 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, int type_or_value) {
...
@@ -316,7 +343,7 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, int type_or_value) {
}
}
/*
/*
* Lookup inside the default module.
* Lookup inside the default module
and its IMPORTS section
.
*/
*/
tc
=
asn1f_lookup_symbol
(
arg
,
expr
->
module
,
ref
);
tc
=
asn1f_lookup_symbol
(
arg
,
expr
->
module
,
ref
);
if
(
tc
==
NULL
)
{
if
(
tc
==
NULL
)
{
...
@@ -367,8 +394,14 @@ asn1f_compatible_with_exports(arg_t *arg, asn1p_module_t *mod, const char *name)
...
@@ -367,8 +394,14 @@ asn1f_compatible_with_exports(arg_t *arg, asn1p_module_t *mod, const char *name)
return
0
;
return
0
;
}
}
DEBUG
(
"Symbol
\"
%s
\"
contradicts with EXPORTS of module %s"
,
/* Conditional debug */
name
,
mod
->
Identifier
);
if
(
!
(
arg
->
expr
->
_mark
&
TM_BROKEN
))
{
arg
->
expr
->
_mark
|=
TM_BROKEN
;
FATAL
(
"EXPORTS section of module %s in %s "
"does not mention %s at line %d"
,
mod
->
Identifier
,
mod
->
source_file_name
,
name
,
arg
->
expr
->
_lineno
);
}
errno
=
ESRCH
;
errno
=
ESRCH
;
return
-
1
;
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment