From: Adam Fedor <fedor@doc.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Switch to demangle ObjC symbols in maint.c
Date: Tue, 19 Nov 2002 07:32:00 -0000 [thread overview]
Message-ID: <3DDA599A.2080005@doc.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 78 bytes --]
This is a very simple patch to allow languages other than C to be demangled.
[-- Attachment #2: objc10.patch --]
[-- Type: text/plain, Size: 1569 bytes --]
2002-11-19 Adam Fedor <fedor@gnu.org>
* gdb/maint.c (maintenance_demangle): Add switch to demangle
other language's symbols.
Index: maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.28
diff -u -r1.28 maint.c
--- maint.c 18 Sep 2002 23:53:51 -0000 1.28
+++ maint.c 19 Nov 2002 15:27:31 -0000
@@ -151,7 +151,17 @@
}
else
{
- demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
+ switch (current_language->la_language)
+ {
+ case language_objc:
+ /* Commented out until ObjC handling is enabled. */
+ /* demangled = objc_demangle (args); */
+ /* break; */
+ case language_cplus:
+ default:
+ demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
+ break;
+ }
if (demangled != NULL)
{
printf_unfiltered ("%s\n", demangled);
@@ -651,7 +661,7 @@
"Commands for use by GDB maintainers.\n\
Includes commands to dump specific internal GDB structures in\n\
a human readable form, to cause GDB to deliberately dump core,\n\
-to test internal functions such as the C++ demangler, etc.",
+to test internal functions such as the C++/ObjC demangler, etc.",
&maintenancelist, "maintenance ", 0,
&cmdlist);
@@ -713,7 +723,7 @@
&maintenancelist);
add_cmd ("demangle", class_maintenance, maintenance_demangle,
- "Demangle a C++ mangled name.\n\
+ "Demangle a C++/ObjC mangled name.\n\
Call internal GDB demangler routine to demangle a C++ link name\n\
and prints the result.",
&maintenancelist);
next reply other threads:[~2002-11-19 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-19 7:32 Adam Fedor [this message]
2002-11-19 7:49 ` Daniel Jacobowitz
[not found] <1037738917.12618.ezmlm@sources.redhat.com>
2002-11-19 18:52 ` Adam Fedor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DDA599A.2080005@doc.com \
--to=fedor@doc.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox