emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb emacs reporting 'Function "x_error_quitter" not defined' [includ


From: Andrew M. Scott
Subject: Re: gdb emacs reporting 'Function "x_error_quitter" not defined' [includes PATCH]
Date: Tue, 1 Feb 2005 09:37:17 -0700

     rms> How about this change?

     *** xterm.c        29 Jan 2005 12:15:37 -0500      1.859
     --- xterm.c        31 Jan 2005 07:56:43 -0500      
     ***************
     *** 7770,7779 ****
          It kills all frames on the display that we got the error for.
          If that was the only one, it prints an error message and kills Emacs. 
 */
       
     ! /* It is after x_error_handler so that it won't get inlined in
     !    x_error_handler.  */
       
     ! static void
       x_error_quitter (display, error)
            Display *display;
            XErrorEvent *error;
     --- 7770,7787 ----
          It kills all frames on the display that we got the error for.
          If that was the only one, it prints an error message and kills Emacs. 
 */
       
     ! /* .gdbinit puts a breakpoint here, so make sure it is not inlined.  */
       
     ! #if __GNUC__ >= 3  /* On GCC 3.0 we might get a warning.  */
     ! #define NO_INLINE __attribute__((noinline))
     ! #else
     ! #define NO_INLINE
     ! #endif
     ! 
     ! /* On older GCC versions, just putting x_error_quitter
     !    after x_error_handler prevents inlining into the former.  */
     ! 
     ! static void NO_INLINE
       x_error_quitter (display, error)
            Display *display;
            XErrorEvent *error;

This works! 
I applied the above patch to a Feb1, 2005 CVS snapshot; bootstrap
builds using *both* gcc-3.3.2 and gcc-3.4.2 now properly allow
breakpoints on x_error_quitter under gdb 6.3.

gcc-3.4.2 build
$ nm xterm.o | grep quitter
0000c840 t x_error_quitter
0000c530 t x_io_error_quitter


gcc-3.3.2 build
$ nm xterm.o | grep quitter
00009510 t x_error_quitter
00009590 t x_io_error_quitter

Thank you!
Andy Scott




reply via email to

[Prev in Thread] Current Thread [Next in Thread]