Subject: Re: bug#9684: Emacs 23.3 and 24.0.90 don't build on IRIX 6.5

From: Rainer Orth <[email-masked]>
Date: Fri, 07 Oct 2011 17:57:33 +0200

Eli Zaretskii <[email-masked]> writes:

> Please show what these commands produce:
>
>  (gdb) frame 3
>  (gdb) pp fun
>  (gdb) frame 1
>  (gdb) pp args[0]
>  (gdb) pp args[1]

Unfortunately, they don't really work:

Breakpoint 3, xsignal1 (error_symbol=274352730, arg=274355066) at /vol/src/gnu/emacs/emacs-24.0.90/src/eval.c:1773
(gdb) frame 3
#3  0x1029963c in funcall_lambda (fun=272695997, nargs=0, arg_vector=0x7ffb7d14) at /vol/src/gnu/emacs/emacs-24.0.90/src/eval.c:3139
(gdb) pp fun
Address of symbol "print_output_debug_flag" is unknown.
(gdb) frame 1
#1  0x10298f1c in Ffuncall (nargs=2, args=0x7ffb7a10) at /vol/src/gnu/emacs/emacs-24.0.90/src/eval.c:3029
(gdb) pp args[0]
Address of symbol "print_output_debug_flag" is unknown.
(gdb)pp args[1] 
Address of symbol "print_output_debug_flag" is unknown.

This is really strange, though:

ro@columba 221 > nm print.o|grep print_output_debug_flag
[44]    |         0|       4|OBJT |GLOB |DEFAULT  |3      |print_output_debug_flag
ro@columba 222 > nm emacs|grep print_output_debug_flag
[2868]  | 273886352|       4|OBJT |GLOB |DEFAULT  |MIPS_SCOMMON|print_output_debug_flag

Since the save/restore of print_output_debug_flag seems to be for the
benefit of w32 only, I've tried the following instead:

Breakpoint 3, xsignal1 (error_symbol=274352730, arg=274355066) at /vol/src/gnu/emacs/emacs-24.0.90/src/eval.c:1773
(gdb) dis 3
(gdb) frame 3
#3  0x1029963c in funcall_lambda (fun=272695997, nargs=0, arg_vector=0x7ffb7d34) at /vol/src/gnu/emacs/emacs-24.0.90/src/eval.c:3139
(gdb) set $tmp = fun
(gdb) set safe_debug_print ($tmp)
emacs: Invalid function: external-debugging-output
[Inferior 1 (process 24041591) exited with code 01]
The program being debugged exited while in a function called from GDB.
Evaluation of the expression containing the function
(safe_debug_print) will be abandoned.
(gdb) frame 1
No registers.

Seriously ugly.  This is all gdb 7.3, so nothing newer to try (except
perhaps for gdb mainline).

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University