aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2003-03-22 21:04:50 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2003-03-22 21:04:50 +0000
commit2630b4ca5f7582a000df87f693a3269c892e2c1e (patch)
tree459f1e531b121affb0bb20d7cf2426ebe26ee7c8 /binutils
parentfd50bc42f4703d05287bf0daca15cc641a687e17 (diff)
downloadgdb-2630b4ca5f7582a000df87f693a3269c892e2c1e.zip
gdb-2630b4ca5f7582a000df87f693a3269c892e2c1e.tar.gz
gdb-2630b4ca5f7582a000df87f693a3269c892e2c1e.tar.bz2
* dlltool.c (gen_def_file): Put demangled name comments on
own line preceding export name.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dlltool.c18
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 <dannysmith@users.sourceforge,net>
+
+ * dlltool.c (gen_def_file): Put demangled name comments on
+ own line preceding export name.
+
2003-03-17 Nick Clifton <nickc@redhat.com>
* 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"));