Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH]: Replace DEPRECIATED_SYMBOL_NAME in objc-lang.c
@ 2003-04-03 15:40 Adam Fedor
  2003-04-03 17:21 ` David Carlton
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Fedor @ 2003-04-03 15:40 UTC (permalink / raw)
  To: GDB Patches

[-- Attachment #1: Type: text/plain, Size: 60 bytes --]

I'll commit this in a few days if there are no objections.


[-- Attachment #2: objc_depreciated.patch --]
[-- Type: text/plain, Size: 3650 bytes --]

2003-04-01  Adam Fedor  <fedor@gnu.org>

	* gdb/objc-lang.c (selectors_info): Replace calls to
	SYMBOL_DEMANGLED_NAME and DEPRECIEATED_SYMBOL_NAME with
	SYMBOL_NATURAL_NAME.
	(classes_info, find_methods): Likewise.

Index: objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.15
diff -u -p -r1.15 objc-lang.c
--- objc-lang.c	2 Apr 2003 03:02:46 -0000	1.15
+++ objc-lang.c	2 Apr 2003 03:35:01 -0000
@@ -897,9 +897,7 @@ selectors_info (char *regexp, int from_t
   ALL_MSYMBOLS (objfile, msymbol)
     {
       QUIT;
-      name = SYMBOL_DEMANGLED_NAME (msymbol);
-      if (name == NULL)
-	name = DEPRECATED_SYMBOL_NAME (msymbol);
+      name = SYMBOL_NATURAL_NAME (msymbol);
       if (name &&
 	 (name[0] == '-' || name[0] == '+') &&
 	  name[1] == '[')		/* Got a method name.  */
@@ -930,9 +928,7 @@ selectors_info (char *regexp, int from_t
       ALL_MSYMBOLS (objfile, msymbol)
 	{
 	  QUIT;
-	  name = SYMBOL_DEMANGLED_NAME (msymbol);
-	  if (name == NULL)
-	    name = DEPRECATED_SYMBOL_NAME (msymbol);
+	  name = SYMBOL_NATURAL_NAME (msymbol);
 	  if (name &&
 	     (name[0] == '-' || name[0] == '+') &&
 	      name[1] == '[')		/* Got a method name.  */
@@ -956,9 +952,7 @@ selectors_info (char *regexp, int from_t
 	  char *p = asel;
 
 	  QUIT;
-	  name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]);
-	  if (name == NULL)
-	    name = DEPRECATED_SYMBOL_NAME (sym_arr[ix]);
+	  name = SYMBOL_NATURAL_NAME (sym_arr[ix]);
 	  name = strchr (name, ' ') + 1;
 	  if (p[0] && specialcmp(name, p) == 0)
 	    continue;		/* Seen this one already (not unique).  */
@@ -1040,9 +1034,7 @@ classes_info (char *regexp, int from_tty
   ALL_MSYMBOLS (objfile, msymbol)
     {
       QUIT;
-      name = SYMBOL_DEMANGLED_NAME (msymbol);
-      if (name == NULL)
-	name = DEPRECATED_SYMBOL_NAME (msymbol);
+      name = SYMBOL_NATURAL_NAME (msymbol);
       if (name &&
 	 (name[0] == '-' || name[0] == '+') &&
 	  name[1] == '[')			/* Got a method name.  */
@@ -1066,9 +1058,7 @@ classes_info (char *regexp, int from_tty
       ALL_MSYMBOLS (objfile, msymbol)
 	{
 	  QUIT;
-	  name = SYMBOL_DEMANGLED_NAME (msymbol);
-	  if (name == NULL)
-	    name = DEPRECATED_SYMBOL_NAME (msymbol);
+	  name = SYMBOL_NATURAL_NAME (msymbol);
 	  if (name &&
 	     (name[0] == '-' || name[0] == '+') &&
 	      name[1] == '[')			/* Got a method name.  */
@@ -1085,9 +1075,7 @@ classes_info (char *regexp, int from_tty
 	  char *p = aclass;
 
 	  QUIT;
-	  name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]);
-	  if (name == NULL)
-	    name = DEPRECATED_SYMBOL_NAME (sym_arr[ix]);
+	  name = SYMBOL_NATURAL_NAME (sym_arr[ix]);
 	  name += 2;
 	  if (p[0] && specialcmp(name, p) == 0)
 	    continue;	/* Seen this one already (not unique).  */
@@ -1348,9 +1336,7 @@ find_methods (struct symtab *symtab, cha
 	  /* Not in the specified symtab.  */
 	  continue;
 
-      symname = SYMBOL_DEMANGLED_NAME (msymbol);
-      if (symname == NULL)
-	symname = DEPRECATED_SYMBOL_NAME (msymbol);
+      symname = SYMBOL_NATURAL_NAME (msymbol);
       if (symname == NULL)
 	continue;
 
@@ -1386,10 +1372,8 @@ find_methods (struct symtab *symtab, cha
       sym = find_pc_function (SYMBOL_VALUE_ADDRESS (msymbol));
       if (sym != NULL)
         {
-          const char *newsymname = SYMBOL_DEMANGLED_NAME (sym);
+          const char *newsymname = SYMBOL_NATURAL_NAME (sym);
 	  
-          if (newsymname == NULL)
-            newsymname = DEPRECATED_SYMBOL_NAME (sym);
           if (strcmp (symname, newsymname) == 0)
             {
               /* Found a high-level method sym: swap it into the

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]: Replace DEPRECIATED_SYMBOL_NAME in objc-lang.c
  2003-04-03 15:40 [PATCH]: Replace DEPRECIATED_SYMBOL_NAME in objc-lang.c Adam Fedor
@ 2003-04-03 17:21 ` David Carlton
  0 siblings, 0 replies; 2+ messages in thread
From: David Carlton @ 2003-04-03 17:21 UTC (permalink / raw)
  To: Adam Fedor; +Cc: GDB Patches

On Thu, 03 Apr 2003 08:40:35 -0700, Adam Fedor <fedor@doc.com> said:

> I'll commit this in a few days if there are no objections.

Seems obviously correct to me; I wouldn't bother waiting that long.

David Carlton
carlton@math.stanford.edu


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-03 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 15:40 [PATCH]: Replace DEPRECIATED_SYMBOL_NAME in objc-lang.c Adam Fedor
2003-04-03 17:21 ` David Carlton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox