This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
New -p/--no-params option for c++filt
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: binutils at sources dot redhat dot com
- Date: 22 Nov 2003 20:11:56 -0500
- Subject: New -p/--no-params option for c++filt
I checked in the appended patch to add a -p/--no-param option to
c++filt.
This option is mainly for debugging the demangler. As such, I don't
think it's worth adding an entry in the NEWS file.
Ian
2003-11-22 Ian Lance Taylor <ian@wasabisystems.com>
* cxxfilt.c (long_options): Add --no-params.
(main): Handle -p/--no-params.
* doc/binutils.texi (c++filt): Document -p/--no-params.
Index: cxxfilt.c
===================================================================
RCS file: /cvs/src/src/binutils/cxxfilt.c,v
retrieving revision 1.2
diff -u -p -r1.2 cxxfilt.c
--- cxxfilt.c 14 Sep 2003 12:20:16 -0000 1.2
+++ cxxfilt.c 23 Nov 2003 01:09:03 -0000
@@ -100,6 +100,7 @@ static const struct option long_options[
{"strip-underscores", no_argument, 0, '_'},
{"format", required_argument, 0, 's'},
{"help", no_argument, 0, 'h'},
+ {"no-params", no_argument, 0, 'p'},
{"no-strip-underscores", no_argument, 0, 'n'},
{"version", no_argument, 0, 'v'},
{0, no_argument, 0, 0}
@@ -171,7 +172,7 @@ main (int argc, char **argv)
strip_underscore = TARGET_PREPENDS_UNDERSCORE;
- while ((c = getopt_long (argc, argv, "_ns:", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "_nps:", long_options, (int *) 0)) != EOF)
{
switch (c)
{
@@ -182,6 +183,9 @@ main (int argc, char **argv)
usage (stdout, 0);
case 'n':
strip_underscore = 0;
+ break;
+ case 'p':
+ flags &= ~ DMGL_PARAMS;
break;
case 'v':
print_version ("c++filt");
Index: doc/binutils.texi
===================================================================
RCS file: /cvs/src/src/binutils/doc/binutils.texi,v
retrieving revision 1.48
diff -u -p -r1.48 binutils.texi
--- doc/binutils.texi 11 Nov 2003 17:50:26 -0000 1.48
+++ doc/binutils.texi 23 Nov 2003 01:09:04 -0000
@@ -2314,6 +2314,7 @@ the Info entries for @file{binutils}.
c++filt [@option{-_}|@option{--strip-underscores}]
[@option{-j}|@option{--java}]
[@option{-n}|@option{--no-strip-underscores}]
+ [@option{-p}|@option{--no-params}]
[@option{-s} @var{format}|@option{--format=}@var{format}]
[@option{--help}] [@option{--version}] [@var{symbol}@dots{}]
@c man end
@@ -2368,6 +2369,11 @@ syntax.
@item -n
@itemx --no-strip-underscores
Do not remove the initial underscore.
+
+@item -p
+@itemx --no-params
+When demangling the name of a function, do not display the types of
+the function's parameters.
@item -s @var{format}
@itemx --format=@var{format}