logo       

[patch/5.3] No __FUNCTION__: msg#00708

Subject: [patch/5.3] No __FUNCTION__
I've committed the attached (with a hesatant ok from MarkK) (HEAD and branch).

What GDB needs is something that works regardless of the compiler.

Andrew
2002-09-29  Andrew Cagney  <ac131313@xxxxxxxxxx>

        * gnu-nat.h (debug): Use __FILE__ and __LINE__ instead of
        __FUNCTION__.
        * gnu-nat.c (do_mach_notify_no_senders): Replace __FUNCTION__
        with function name.
        (do_mach_notify_port_deleted, do_mach_notify_msg_accepted): Ditto.
        (do_mach_notify_port_destroyed, do_mach_notify_send_once): Ditto.
        (S_proc_setmsgport_reply, S_proc_getmsgport_reply): Ditto.
        (S_msg_sig_post_reply): Ditto.
        
Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.23
diff -u -r1.23 gnu-nat.c
--- gnu-nat.c   26 Aug 2002 19:18:33 -0000      1.23
+++ gnu-nat.c   29 Sep 2002 15:23:37 -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   29 Sep 2002 15:23:37 -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__ */
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe