Vladimir Tzankov writes:
> Let's see whether it is the same problem as reported above. In order
> to do so you should change the Makefile to keep base/ folder in case
> of errors - remove "$(RMRF) base" from base target. After you make
> (and it fails) there should be base/ folder.
base : modular boot $(BASE_MODULES)
# *** $(RMRF) base
MAKE=$(MAKE) CLISP="/root/clisp/build-mt-yes/clisp -K boot -E UTF-8 -E pathname 1:1 -Emisc 1:1 -norc" with_dynamic_modules=no ./clisp-link add boot base $(BASE_MODULES) || exit 1
# *** ($(RMRF) base ; exit 1)
then make, now
$ ls base
calls.o libgnu_rx.a lisp.a modules.h regexi.o
gettext.o libgnu_sc.a lispinit.mem modules.o
libgnu_cl.a libnoreadline.a lisp.run readline.o
> Now you can run the whole thing under gdb (with all parameters as from
> make) and see where the segfault happens - please paste stack trace
> here.
>
> Something like (in your build directory):
> vtz@...$ gdb base/lisp.run
> (gdb) set args -B . -M base/lispinit.mem -norc -q -i i18n/i18n -i
> syscalls/posix -i regexp/regexp -i readline/readline
> (gdb) delete
> (gdb) handle SIGSEGV nostop noprint
> (gdb) break spvw_sigsegv.d:65
> (gdb) run
$ gdb base/lisp.run
GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
Copyright 2004 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 "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
Breakpoint 1 at 0x80a0664: file ../src/eval.d, line 4858.
Breakpoint 2 at 0x809a330: file ../src/eval.d, line 4038.
Breakpoint 3 at 0x8096f7c: file ../src/eval.d, line 2949.
Breakpoint 4 at 0x809a530: file ../src/eval.d, line 5771.
I guess we're loading a gdb init file...
...
15 breakpoint keep y 0x0812bd96 in errno_out_low
at ../src/errunix.d:723
Breakpoint 16 at 0x8081192: file ../src/spvw_sigsegv.d, line 64.
That looks pretty similar to your breakpoint, btw.
.gdbinit:197: Error in sourced command file:
No symbol "byteptr" in current context.
(gdb) set args -B . -M base/lispinit.mem -norc -q -i i18n/i18n -i syscalls/posi x -i regexp/regexp -i readline/readline
I left out the -x saveinitmem
(gdb) delete
Delete all breakpoints? (y or n) y
Please answer y or n.
Delete all breakpoints? (y or n) y
(gdb) handle SIGSEGV nostop noprint
Signal Stop Print Pass to program Description
SIGSEGV No No Yes Segmentation fault
(gdb) break spvw_sigsegv.d:65
Breakpoint 17 at 0x808119f: file ../src/spvw_sigsegv.d, line 65.
(gdb) run
Starting program: /root/clisp/build-mt-yes/base/lisp.run -B . -M base/lispinit. mem -norc -q -i i18n/i18n -i syscalls/posix -i regexp/regexp -i readline/readline
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x6dc000
[Thread debugging using libthread_db enabled]
[New Thread 1120480 (LWP 5728)]
*** - handle_fault error2 ! address = 0x1 not in
[0x208cd004,0x20a29cc4) !
[Switching to Thread 1120480 (LWP 5728)]
Breakpoint 17, sigsegv_handler_failed (address=0x1)
at ../src/spvw_sigsegv.d:65
65 fprintf(stderr,GETTEXTL("SIGSEGV cannot be cured. Fault address = 0x%lx."),
(gdb) bt
I hope I guessed right that bt is what I was supposed to do here.
#0 sigsegv_handler_failed (address=0x1) at ../src/spvw_sigsegv.d:65
#1 0x080812c4 in sigsegv_handler (fault_address=0x1, serious=1)
at ../src/spvw_sigsegv.d:80
#2 0x0816f399 in sigsegv_handler (sig=11, sc=
{gs = 51, __gsh = 0, fs = 0, __fsh = 0, es = 123, __esh = 49216, ds = 123, __dsh = 0, edi = 1120484, esi = 136579072, ebp = 3220618360, esp = 3220618324 , ebx = 136451968, edx = 546933198, ecx = 1121592, eax = 1, trapno = 14, err = 6, eip = 134689291, cs = 115, __csh = 0, eflags = 66071, esp_at_signal = 322061 8324, ss = 123, __ssh = 0, fpstate = 0xbff6fa5c, oldmask = 134244399, cr2 = 1}) at handler-unix.c:219
#3 <signal handler called>
#4 0x0807320b in module__syscalls__init_function_1 (module=0x8221ca0)
at /root/clisp/modules/syscalls/calls.c:6359
#5 0x08088cf7 in init_module_2 (module=0x8221ca0) at ../src/spvw.d:2066
#6 0x08089020 in init_other_modules_2 () at ../src/spvw.d:2070
#7 0x0808bee1 in main (argc=15, argv=0xbff6fe04) at ../src/spvw.d:3926
(gdb)
|