[PATCH] automated demangling styles list.
Elias Athanasopoulos
eathan@otenet.gr
Wed Jun 5 02:11:00 GMT 2002
More information about the Binutils mailing list
Wed Jun 5 02:11:00 GMT 2002
- Previous message (by thread): alpha-osf: Undefined reference in libbfd.a causes GDB build failure
- Next message (by thread): [PATCH] automated demangling styles list.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, These patches add automated list of demangling styles. Alan, Nick is the changelog below ok? Elias 2002-6-5 Elias Athanasopoulos <eathan@otenet.gr> * bucomm.c: Add list_supported_demangling_styles (). * bucomm.h: Add prototype of list_supported_demangling_styles (). * nm.c: Use list_supported_demangling_styles (). * objdump.c: Likewise. --- bucomm.c.orig Wed Jun 5 12:05:56 2002 +++ bucomm.c Wed Jun 5 12:13:57 2002 @@ -26,6 +26,7 @@ #include "libiberty.h" #include "bucomm.h" #include "filenames.h" +#include "demangle.h" #include <sys/stat.h> #include <time.h> /* ctime, maybe time_t */ @@ -159,6 +160,26 @@ fprintf (f, "\n"); } + +/* List the supported demangling styles. */ + +void +list_supported_demangling_styles (name, f) + const char *name; + FILE *f; +{ + const struct demangler_engine *demangler = libiberty_demanglers; + + if (name == NULL) + fprintf (f, _("Supported demangling styles:")); + else + fprintf (f, _("%s: supported demangling_styles:"), name); + + for (; demangler->demangling_style != unknown_demangling; ++ demangler) + fprintf (f, " `%s'", demangler->demangling_style_name); + fprintf (f, "\n"); +} + /* Display the archive header for an element as if it were an ls -l listing: Mode User\tGroup\tSize\tDate Name */ --- bucomm.h.orig Wed Jun 5 12:08:23 2002 +++ bucomm.h Wed Jun 5 12:10:10 2002 @@ -166,6 +166,8 @@ void list_supported_architectures PARAMS ((const char *, FILE *)); +void list_supported_demangling_styles PARAMS ((const char *, FILE *)); + void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose)); char *make_tempname PARAMS ((char *)); --- nm.c.orig Wed Jun 5 12:15:56 2002 +++ nm.c Wed Jun 5 12:15:01 2002 @@ -305,8 +305,6 @@ -A, --print-file-name Print name of the input file before every symbol\n\ -B Same as --format=bsd\n\ -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n\ - The STYLE, if specified, can be `auto' (the default),\n\ - `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-abi'\n\ --no-demangle Do not demangle low-level symbol names\n\ -D, --dynamic Display dynamic symbols instead of normal symbols\n\ --defined-only Display only defined symbols\n\ @@ -330,6 +328,7 @@ -h, --help Display this information\n\ -V, --version Display this program's version number\n\ \n")); + list_supported_demangling_styles (program_name, stream); list_supported_targets (program_name, stream); if (status == 0) fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO); --- objdump.c.orig Tue Jun 4 21:43:34 2002 +++ objdump.c Wed Jun 5 12:09:45 2002 @@ -197,8 +197,6 @@ --file-start-context Include context from start of file (with -S)\n\ -l, --line-numbers Include line numbers and filenames in output\n\ -C, --demangle[=STYLE] Decode mangled/processed symbol names\n\ - The STYLE, if specified, can be `auto', 'gnu',\n\ - 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-abi'\n\ -w, --wide Format output for more than 80 columns\n\ -z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\ --start-address=ADDR Only process data whoes address is >= ADDR\n\ @@ -207,6 +205,7 @@ --[no-]show-raw-insn Display hex alongside symbolic disassembly\n\ --adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\ \n")); + list_supported_demangling_styles (program_name, stream); list_supported_targets (program_name, stream); list_supported_architectures (program_name, stream);
- Previous message (by thread): alpha-osf: Undefined reference in libbfd.a causes GDB build failure
- Next message (by thread): [PATCH] automated demangling styles list.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list