This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfa:gnu] __FUNCTION__ cleanup


Hello,

The attached s/__FUNCTION__/<name>/ and/or file/line. (its easier to have no files using __FUNCTION__ then one :-).

ok?
Andrew
2002-08-23  Andrew Cagney  <ac131313@redhat.com>

	* gnu-nat.h (debug): Use __FILE__ and __LINE__ instead of
	__FUNCTION__.
	* gnu-nat.c: Replace __FUNCTION__ with function name.

Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.22
diff -u -r1.22 gnu-nat.c
--- gnu-nat.c	30 Apr 2002 21:12:30 -0000	1.22
+++ gnu-nat.c	23 Aug 2002 23:35:04 -0000
@@ -1759,31 +1759,31 @@
 error_t
 do_mach_notify_no_senders (mach_port_t notify, mach_port_mscount_t count)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("do_mach_notify_no_senders");
 }
 
 error_t
 do_mach_notify_port_deleted (mach_port_t notify, mach_port_t name)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("do_mach_notify_port_deleted");
 }
 
 error_t
 do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t name)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("do_mach_notify_msg_accepted");
 }
 
 error_t
 do_mach_notify_port_destroyed (mach_port_t notify, mach_port_t name)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("do_mach_notify_port_destroyed");
 }
 
 error_t
 do_mach_notify_send_once (mach_port_t notify)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("do_mach_notify_send_once");
 }
 
 
@@ -1845,13 +1845,13 @@
 S_proc_setmsgport_reply (mach_port_t reply, error_t err,
 			 mach_port_t old_msg_port)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("S_proc_setmsgport_reply");
 }
 
 error_t
 S_proc_getmsgport_reply (mach_port_t reply, error_t err, mach_port_t msg_port)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("S_proc_getmsgport_reply");
 }
 
 
@@ -1890,7 +1890,7 @@
 error_t
 S_msg_sig_post_reply (mach_port_t reply, error_t err)
 {
-  return ill_rpc (__FUNCTION__);
+  return ill_rpc ("S_msg_sig_post_reply");
 }
 
 
Index: gnu-nat.h
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.h,v
retrieving revision 1.2
diff -u -r1.2 gnu-nat.h
--- gnu-nat.h	6 Mar 2001 08:21:07 -0000	1.2
+++ gnu-nat.h	23 Aug 2002 23:35:04 -0000
@@ -96,6 +96,6 @@
 
 #define debug(msg, args...) \
  do { if (gnu_debug_flag) \
-        fprintf_unfiltered (gdb_stdlog, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
+        fprintf_unfiltered (gdb_stdlog, "%s:%d: " msg "\r\n", __FILE__ , __LINE__ , ##args); } while (0)
 
 #endif /* __GNU_NAT_H__ */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]