From: Danny Smith Date: Sat, 22 Mar 2003 21:04:50 +0000 (+0000) Subject: * dlltool.c (gen_def_file): Put demangled name comments on X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2630b4ca5f7582a000df87f693a3269c892e2c1e;p=binutils-gdb.git * dlltool.c (gen_def_file): Put demangled name comments on own line preceding export name. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 39ff54a78aa..7fce8769c7e 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 a4e7bfa362c..81b6b92246e 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"));