Gdb built recently from the CVS causes a segmentation fault due to stack
growth:

343 (hiauly1)dave> ./gdb /usr/local/bin/ls
GNU gdb 20000204
Copyright 1998 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"...
(no debugging symbols found)
Pid 29798 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssiz.
Memory fault

The problem appears to be caused by init.c calling initialize_hpux_thread ()
twice:
346 (hiauly1)dave> grep _initialize_hpux_thread init.c
extern initialize_file_ftype _initialize_hpux_thread;
extern initialize_file_ftype _initialize_hpux_thread;
  _initialize_hpux_thread ();
  _initialize_hpux_thread ();

This occurs because the Makefile generated by configure defines

CONFIG_OBS=  hpux-thread.o
CONFIG_SRCS=  hpux-thread.c
CONFIG_DEPS=
CONFIG_INITS= hpux-thread.c

Both CONFIG_OBS and CONFIG_INITS are included in the INIT_FILES list
in the Makefile.

Removing hpux-thread.c from CONFIG_INITS fixes the problem.

-- 
J. David Anglin                                  [EMAIL PROTECTED]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

Reply via email to