diff options
author | midipix <writeonce@midipix.org> | 2016-10-23 23:43:35 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-11 00:22:49 -0500 |
commit | 62fec76c0ad272943d16867c4084134f82f9157a (patch) | |
tree | ffd132dff6bc94deb3ccdf3adc2c3a9d2b43e775 | |
parent | 7f20b2f02c426c7c671b2c69eb15c6d93fb24401 (diff) | |
download | mdso-62fec76c0ad272943d16867c4084134f82f9157a.tar.bz2 mdso-62fec76c0ad272943d16867c4084134f82f9157a.tar.xz |
mdso_generate_symfn(): added error trace support.
-rw-r--r-- | include/mdso/mdso.h | 2 | ||||
-rw-r--r-- | src/logic/mdso_create_implib_sources.c | 2 | ||||
-rw-r--r-- | src/logic/mdso_generate_symfn.c | 9 |
3 files changed, 9 insertions, 4 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h index 08821ed..4d770de 100644 --- a/include/mdso/mdso.h +++ b/include/mdso/mdso.h @@ -121,7 +121,7 @@ mdso_api uint64_t mdso_crc64_mbstr (const unsigned char * str, size_t * symlen); mdso_api FILE * mdso_create_output (const struct mdso_driver_ctx *, const char * asmname); mdso_api int mdso_generate_dsometa (const struct mdso_driver_ctx *, FILE * fout); mdso_api int mdso_generate_symentry(const struct mdso_driver_ctx *, const char * sym, FILE * fout); -mdso_api int mdso_generate_symfn (const char * sym, FILE * fout); +mdso_api int mdso_generate_symfn (const struct mdso_driver_ctx *, const char * sym, FILE * fout); #ifdef __cplusplus } 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; } |