summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-23 23:43:35 -0400
committermidipix <writeonce@midipix.org>2016-11-11 00:22:49 -0500
commit62fec76c0ad272943d16867c4084134f82f9157a (patch)
treeffd132dff6bc94deb3ccdf3adc2c3a9d2b43e775 /src
parent7f20b2f02c426c7c671b2c69eb15c6d93fb24401 (diff)
downloadmdso-62fec76c0ad272943d16867c4084134f82f9157a.tar.bz2
mdso-62fec76c0ad272943d16867c4084134f82f9157a.tar.xz
mdso_generate_symfn(): added error trace support.
Diffstat (limited to 'src')
-rw-r--r--src/logic/mdso_create_implib_sources.c2
-rw-r--r--src/logic/mdso_generate_symfn.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/logic/mdso_create_implib_sources.c b/src/logic/mdso_create_implib_sources.c
index 93c83d5..fb12e97 100644
--- a/src/logic/mdso_create_implib_sources.c
+++ b/src/logic/mdso_create_implib_sources.c
@@ -69,7 +69,7 @@ mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx * dctx)
if (!(fout = mdso_create_output(dctx,asmname)))
return MDSO_NESTED_ERROR(dctx);
- ret = mdso_generate_symfn(*sym,fout);
+ ret = mdso_generate_symfn(dctx,*sym,fout);
if (fout != stdout)
fclose(fout);
diff --git a/src/logic/mdso_generate_symfn.c b/src/logic/mdso_generate_symfn.c
index 730281a..7b3b295 100644
--- a/src/logic/mdso_generate_symfn.c
+++ b/src/logic/mdso_generate_symfn.c
@@ -6,7 +6,9 @@
#include <stdint.h>
#include <stdio.h>
+
#include <mdso/mdso.h>
+#include "mdso_errinfo_impl.h"
static const char * const asm_lines[] = {
"\t.file \"__%s_sym_fn.s\"\n",
@@ -19,13 +21,16 @@ static const char * const asm_lines[] = {
0
};
-int mdso_generate_symfn(const char * sym, FILE * fout)
+int mdso_generate_symfn(
+ const struct mdso_driver_ctx * dctx,
+ const char * sym,
+ FILE * fout)
{
const char * const * line;
for (line=asm_lines; *line; line++)
if ((fprintf(fout,*line,sym)) < 0)
- return -1;
+ return MDSO_FILE_ERROR(dctx);
return 0;
}