From 27f67f01e4066e3bb437029d7c18bd984a5a333f Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 23 Oct 2016 23:23:41 -0400 Subject: mdso_create_implib_sources(): added error trace support. --- src/logic/mdso_create_implib_sources.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/logic/mdso_create_implib_sources.c b/src/logic/mdso_create_implib_sources.c index cecb680..6252387 100644 --- a/src/logic/mdso_create_implib_sources.c +++ b/src/logic/mdso_create_implib_sources.c @@ -7,7 +7,9 @@ #include #include #include + #include +#include "mdso_errinfo_impl.h" static void mdso_init_asmname(char * buf, const char * fmt, const char * str) { @@ -34,7 +36,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx) mdso_init_asmname(asmname,"__%s_dso_meta.s",dctx->cctx->libname); if (!(fout = mdso_create_output(dctx,asmname))) - return -1; + return MDSO_NESTED_ERROR(dctx); ret = mdso_generate_dsometa(dctx->cctx,fout); @@ -42,17 +44,17 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx) fclose(fout); if (ret < 0) - return -1; + return MDSO_NESTED_ERROR(dctx); for (unit=dctx->units; *unit; unit++) { if (mdso_get_unit_ctx(dctx,*unit,&uctx)) - return -1; + return MDSO_NESTED_ERROR(dctx); for (sym=uctx->syms; *sym; sym++) { mdso_init_asmname(asmname,"__%s_sym_entry.s",*sym); if (!(fout = mdso_create_output(dctx,asmname))) - return -1; + return MDSO_NESTED_ERROR(dctx); ret = mdso_generate_symentry(dctx->cctx,*sym,fout); @@ -60,12 +62,12 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx) fclose(fout); if (ret < 0) - return -1; + return MDSO_NESTED_ERROR(dctx); mdso_init_asmname(asmname,"__%s_sym_fn.s",*sym); if (!(fout = mdso_create_output(dctx,asmname))) - return -1; + return MDSO_NESTED_ERROR(dctx); ret = mdso_generate_symfn(*sym,fout); @@ -73,7 +75,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx) fclose(fout); if (ret < 0) - return -1; + return MDSO_NESTED_ERROR(dctx); } mdso_free_unit_ctx(uctx); -- cgit v1.2.3