From 2630b4ca5f7582a000df87f693a3269c892e2c1e Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Sat, 22 Mar 2003 21:04:50 +0000 Subject: [PATCH] * dlltool.c (gen_def_file): Put demangled name comments on own line preceding export name. --- binutils/ChangeLog | 5 +++++ binutils/dlltool.c | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 39ff54a..7fce876 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2003-03-22 Danny Smith + + * dlltool.c (gen_def_file): Put demangled name comments on + own line preceding export name. + 2003-03-17 Nick Clifton * objdump.c (disassemble_data): Use disasm_info.fprintf_func not diff --git a/binutils/dlltool.c b/binutils/dlltool.c index a4e7bfa..81b6b92 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -1670,23 +1670,28 @@ gen_def_file () char *quote = strchr (exp->name, '.') ? "\"" : ""; char *res = cplus_demangle (exp->internal_name, DMGL_ANSI | DMGL_PARAMS); + if (res) + { + fprintf (output_def,";\t%s\n", res); + free (res); + } + if (strcmp (exp->name, exp->internal_name) == 0) { - fprintf (output_def, "\t%s%s%s @ %d%s%s ; %s\n", + fprintf (output_def, "\t%s%s%s @ %d%s%s\n", quote, exp->name, quote, exp->ordinal, exp->noname ? " NONAME" : "", - exp->data ? " DATA" : "", - res ? res : ""); + exp->data ? " DATA" : ""); } else { char *quote1 = strchr (exp->internal_name, '.') ? "\"" : ""; /* char *alias = */ - fprintf (output_def, "\t%s%s%s = %s%s%s @ %d%s%s ; %s\n", + fprintf (output_def, "\t%s%s%s = %s%s%s @ %d%s%s\n", quote, exp->name, quote, @@ -1695,11 +1700,8 @@ gen_def_file () quote1, exp->ordinal, exp->noname ? " NONAME" : "", - exp->data ? " DATA" : "", - res ? res : ""); + exp->data ? " DATA" : ""); } - if (res) - free (res); } inform (_("Added exports to output file")); -- 2.7.4