This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC]: Remove CONVERT_FUNCPRT from objc-lang.c
- From: Adam Fedor <fedor at doc dot com>
- To: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Mon, 26 May 2003 21:22:37 -0600
- Subject: [RFC]: Remove CONVERT_FUNCPRT from objc-lang.c
I've removed this macro since its usefullness is doubtful. I'll commit
it soon if there are no objections.
2003-05-26 Adam Fedor <fedor@gnu.org>
* objc-lang.c (CONVERT_FUNCPTR): Remove macro
(find_implementation_from_class): Replace it with the standard
case i.e. do nothing.
Index: objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.24
diff -u -p -r1.24 objc-lang.c
--- objc-lang.c 23 May 2003 16:02:30 -0000 1.24
+++ objc-lang.c 27 May 2003 03:17:46 -0000
@@ -1730,11 +1730,6 @@ static unsigned long FETCH_ARGUMENT (int
internal_error (__FILE__, __LINE__, "FETCH_ARGUMENT not implemented");
return 0;
}
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- internal_error (__FILE__, __LINE__, "CONVERT_FUNCPTR not implemented");
- return pc;
-}
#else
#if defined (__powerpc__) || defined (__ppc__)
static unsigned long FETCH_ARGUMENT (int i)
@@ -1761,20 +1756,6 @@ static unsigned long FETCH_ARGUMENT (int
#error unknown architecture
#endif
-#if defined (__hppa__) || defined (__hppa)
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- if (pc & 0x2)
- pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, 4);
-
- return pc;
-}
-#else
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- return pc;
-}
-#endif
#endif
static void
@@ -1865,7 +1846,9 @@ find_implementation_from_class (CORE_ADD
#endif
if (meth_str.name == sel)
- return CONVERT_FUNCPTR (meth_str.imp);
+ /* FIXME: hppa arch was doing a pointer dereference
+ here. There needs to be a better way to do that. */
+ return meth_str.imp;
}
mlistnum++;
}