diff options
author | midipix <writeonce@midipix.org> | 2016-10-24 00:40:33 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-11 00:22:49 -0500 |
commit | d30cda7fff55ad90fc2461f2bc8c3523b77531a1 (patch) | |
tree | 0ee7a3fd98e984636262fd58404e2f30cfd1eb1b /src/driver | |
parent | bfa928f9b408b6d930873f9fce8efc83a17473cb (diff) | |
download | mdso-d30cda7fff55ad90fc2461f2bc8c3523b77531a1.tar.bz2 mdso-d30cda7fff55ad90fc2461f2bc8c3523b77531a1.tar.xz |
utility: error trace and error information: initial integration.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/mdso_amain.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/driver/mdso_amain.c b/src/driver/mdso_amain.c index a952b02..5849911 100644 --- a/src/driver/mdso_amain.c +++ b/src/driver/mdso_amain.c @@ -52,17 +52,16 @@ static void mdso_perform_unit_actions( { uint64_t flags = uctx->cctx->fmtflags; - if (flags & MDSO_OUTPUT_EXPORT_SYMS) { - uctx->status = mdso_output_export_symbols( + if (flags & MDSO_OUTPUT_EXPORT_SYMS) + mdso_output_export_symbols( dctx,uctx,stdout); - uctx->nerrors += !!uctx->status; - } } -static int mdso_exit(struct mdso_driver_ctx * dctx, int nerrors) +static int mdso_exit(struct mdso_driver_ctx * dctx, int ret) { + mdso_output_error_vector(dctx); mdso_free_driver_ctx(dctx); - return nerrors ? 2 : 0; + return ret; } int mdso_main(int argc, char ** argv, char ** envp) @@ -82,16 +81,12 @@ int mdso_main(int argc, char ** argv, char ** envp) for (unit=dctx->units; *unit; unit++) { if (!(mdso_get_unit_ctx(dctx,*unit,&uctx))) { mdso_perform_unit_actions(dctx,uctx); - ret += uctx->nerrors; mdso_free_unit_ctx(uctx); } } - if (*dctx->units) { - dctx->status = mdso_create_implib_sources(dctx); - dctx->nerrors += !!dctx->status; - ret += dctx->nerrors; - } + if (*dctx->units) + mdso_create_implib_sources(dctx); - return mdso_exit(dctx,ret); + return mdso_exit(dctx,dctx->errv[0] ? 2 : 0); } |