summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-23 23:23:41 -0400
committermidipix <writeonce@midipix.org>2016-11-11 00:22:48 -0500
commit27f67f01e4066e3bb437029d7c18bd984a5a333f (patch)
tree029783971ed1444ab14e998455b79d2589904334 /src
parent8cb533819773c88a89c767497043700c0bcd6c4a (diff)
downloadmdso-27f67f01e4066e3bb437029d7c18bd984a5a333f.tar.bz2
mdso-27f67f01e4066e3bb437029d7c18bd984a5a333f.tar.xz
mdso_create_implib_sources(): added error trace support.
Diffstat (limited to 'src')
-rw-r--r--src/logic/mdso_create_implib_sources.c16
1 files 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 <stdint.h>
#include <stdio.h>
#include <string.h>
+
#include <mdso/mdso.h>
+#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);