* Re: [PATCH] Switch to demangle ObjC symbols in maint.c
[not found] <1037738917.12618.ezmlm@sources.redhat.com>
@ 2002-11-19 18:52 ` Adam Fedor
0 siblings, 0 replies; 3+ messages in thread
From: Adam Fedor @ 2002-11-19 18:52 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
>
>>This is a very simple patch to allow languages other than C to be demangled.
>>
>
>
>>2002-11-19 Adam Fedor <fedor@gnu.org>
>>
>> * gdb/maint.c (maintenance_demangle): Add switch to demangle
>> other language's symbols.
>
>
>Shouldn't this be in a wrapper somewhere? Aren't we going to need to
>demangle ObjC symbols in a lot of places where we demangle C++ symbols?
>
Objective-C is much simpler than C++ and has other ways to get things
like class information (for instance), so this needs to be done in only
a few places (Three, to be exact. Well, really, just two, and this is
the second one).
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Switch to demangle ObjC symbols in maint.c
@ 2002-11-19 7:32 Adam Fedor
2002-11-19 7:49 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Adam Fedor @ 2002-11-19 7:32 UTC (permalink / raw)
To: gdb-patches
[-- 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);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Switch to demangle ObjC symbols in maint.c
2002-11-19 7:32 Adam Fedor
@ 2002-11-19 7:49 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-11-19 7:49 UTC (permalink / raw)
To: gdb-patches
On Tue, Nov 19, 2002 at 08:32:42AM -0700, Adam Fedor wrote:
> This is a very simple patch to allow languages other than C to be demangled.
>
> 2002-11-19 Adam Fedor <fedor@gnu.org>
>
> * gdb/maint.c (maintenance_demangle): Add switch to demangle
> other language's symbols.
Shouldn't this be in a wrapper somewhere? Aren't we going to need to
demangle ObjC symbols in a lot of places where we demangle C++ symbols?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-20 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1037738917.12618.ezmlm@sources.redhat.com>
2002-11-19 18:52 ` [PATCH] Switch to demangle ObjC symbols in maint.c Adam Fedor
2002-11-19 7:32 Adam Fedor
2002-11-19 7:49 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox