The session below tries to debug a post-mortem dump (of some hacked emacs
version) on HP-UX 10.20.

Rather than showing the actual cause for the crash being debugged, gdb shows
only what happens in the SIGSEGV signal handler. (Maybe another segfault
happened there.)  The bt command does not manage to get over the signal
handler boundary and crashes gdb (overwriting the emacs core file).  The
second invocation of gdb (on itself) below is meant to give you a first clue
why this might happen.

Both, gdb and emacs were compiled with the official 2.95.2 release of gcc
(which I believe was bootstrapped with `-g -O3').  Gdb is the official 5.0
release and was compiled with `-g -O3'.  The hacked emacs whose post-mortem
dump could not be debugged was compiled with `-g -O2'.

bash-2.03$ src/emacs
Segmentation fault (core dumped)
bash-2.03$ ../gdb-5.0/gdb/gdb src/emacs core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "hppa1.1-hp-hpux10.20"...
Core was generated by `emacs'.
Program terminated with signal 11, Segmentation fault.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

Reading symbols from src/emacs...done.
Reading symbols from /usr/lib/X11R5/libX11.1...done.
Reading symbols from /usr/lib/libc.1...done.
Re#0  0x166080 in _free_internal (ptr=0x70000) at gmalloc.c:922
922       type = _heapinfo[block].busy.type;
(gdb) bt
#0  0x166080 in _free_internal (ptr=0x70000) at gmalloc.c:922
#1  0x1665ac in free (ptr=0x70000) at gmalloc.c:1139
#2  0x104040 in emacs_blocked_free (ptr=0x70000) at alloc.c:555
#3  0x16659c in free (ptr=0x70000) at gmalloc.c:1137
#4  0x103d78 in xfree (block=0x70000) at alloc.c:457
#5  0x294e8 in free_glyph_matrix (matrix=0x4022fc00) at dispnew.c:450
#6  0x2b5d8 in free_glyphs (f=0x4010b600) at dispnew.c:2212
#7  0x2b794 in check_glyph_memory () at dispnew.c:2282
#8  0xb6044 in shut_down_emacs (sig=458752, no_x=350, stuff=269417476)
    at emacs.c:1869
#9  0xb4378 in fatal_error_signal (sig=11) at emacs.c:336
Segmentation fault (core dumped)
bash-2.03$ ../gdb-5.0/gdb/gdb ../gdb-5.0/gdb/gdb core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
ading symbols from /usr/lib/libdld.sl...done.
This GDB was configured as "hppa1.1-hp-hpux10.20"...
Core was generated by `gdb'.
Program terminated with signal 11, Segmentation fault.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

Reading symbols from ../gdb-5.0/gdb/gdb...done.
Reading symbols from /usr/lib/libcurses.1...done.
Reading symbols from /usr/lib/libc.1...done.
Reading symbols from /usr/lib/libdld.sl...done.
#0  0xa3bcc in find_proc_framesize (pc=3222470832) at hppa-tdep.c:658
658       return u->HP_UX_interrupt_marker && !IN_SIGTRAMP (pc, SYMBOL_NAME (msym_us));
(gdb) bt
#0  0xa3bcc in find_proc_framesize (pc=3222470832) at hppa-tdep.c:658
#1  0xa4330 in frame_chain (frame=0x40b5bed0) at hppa-tdep.c:1176
#2  0x66b78 in get_prev_frame (next_frame=0x40b5bed0) at blockframe.c:407
#3  0x4c178 in backtrace_command_1 (count_exp=0x40b5bed0 "{\003ÔX", 
    show_locals=0, from_tty=1) at stack.c:1176
#4  0x4c384 in backtrace_command (arg=0xc01300b0 "7\232", from_tty=1)
    at stack.c:1252
#5  0x5bb08 in execute_command (p=0x4002c8e2 "", from_tty=1) at top.c:1546
#6  0x98a80 in command_handler (command=0x4002c8e0 "bt") at event-top.c:515
#7  0x99230 in command_line_handler (rl=0x4097c768 "@\227È ")
    at event-top.c:811
#8  0x167200 in rl_callback_read_char () at callback.c:122
#9  0x999b4 in rl_callback_read_char_wrapper (client_data=0xc01300b0)
    at event-top.c:166
#10 0x998d4 in stdin_event_handler (error=-1072496464, client_data=0x0)
    at event-top.c:422
#11 0xc7c60 in handle_file_event (event_file_desc=1073741998)
    at event-loop.c:742
#12 0xc7694 in gdb_do_one_event (data=0xc01300b0) at event-loop.c:377
#13 0x5ab94 in catch_errors (func=0x400148c2 <DINFINITY+4642>, args=0x0, 
    errstring=0x409efee8 "@¹F\230@º©4", mask=6) at top.c:615
#14 0xc8410 in start_event_loop () at event-loop.c:450
#15 0x98404 in cli_command_loop () at event-top.c:196
---Type <return> to continue, or q <return> to quit---
#16 0x4b07c in captured_command_loop (data=0xc01300b0) at main.c:104
#17 0x5ab94 in catch_errors (func=0x40013bda <DINFINITY+1338>, args=0x0, 
    errstring=0x409efee8 "@¹F\230@º©4", mask=6) at top.c:615
#18 0x4af54 in captured_main (data=0xc01300b0) at main.c:704
#19 0x5ab94 in catch_errors (func=0x40013be2 <DINFINITY+1346>, 
    args=0x7b03a4b8, errstring=0x409efee8 "@¹F\230@º©4", mask=6) at top.c:615
#20 0x4b120 in main (argc=3, argv=0x7b03a370) at main.c:761
#21 0xc0060d0c in ?? () from /usr/lib/libc.1
(gdb) quit
bash-2.03$ 
-----------------------------------------------------------------
This email is confidential and intended solely for the use of the
individual to whom it is addressed.
Any views or opinions presented are solely those of the author
and do not necessarily represent those of Thyron Limited.
If you are not the intended recipient then please be advised
that you have received this email in error and that any use,
dissemination, forwarding, printing or copying of this email 
is strictly prohibited.
If you have received this email in error, please notify the 
Thyron IT Administrator on +44 (0)1923 236 050 or 
send an email to [EMAIL PROTECTED]
Thank You

Reply via email to