aboutsummaryrefslogtreecommitdiff
path: root/binutils/dlltool.c
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/dlltool.c
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/dlltool.c')
-rw-r--r--binutils/dlltool.c18
1 files changed, 10 insertions, 8 deletions
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"));