[Ecls-list] Attach-GDB restart in Slime CVS

Matthew Mondor mm_lists at pulsar-zone.net
Thu Mar 18 20:56:44 UTC 2010


On Thu, 18 Mar 2010 12:03:18 -0400
Matthew Mondor <mm_lists at pulsar-zone.net> wrote:

> On Thu, 18 Mar 2010 11:53:42 -0400
> Matthew Mondor <mm_lists at pulsar-zone.net> wrote:
> 
> > > Seems to work for me just fine. Perhaps GDB will look at the argv[0] of
> > > the process and try that as file?
> 
> Actually, I should test from within ECL itself with SI:SYSTEM after
> building it with debug symbols to really test this.  I'll try to do it
> today.

I confirmed that without specifying the object to load symbols from,
GDB has no symbols to work with so argv[0] is not automatically looked
up, it's most probably relying on a /proc file on Linux to recover the
fullpath to the executable.

> (si:system "gdb -p 8021")
GNU gdb 6.5
Copyright (C) 2006 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--netbsdelf".
Attaching to process 8021
0xbb956e27 in ?? ()
(gdb) bt
#0  0xbb956e27 in ?? ()
(gdb) q
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: , process 8021

0
> (si:system "gdb -p 8021 /usr/local/ecl/bin/ecl")
GNU gdb 6.5
Copyright (C) 2006 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--netbsdelf"...
Attaching to program: /usr/local/ecl/bin/ecl, process 8021
Reading symbols from /usr/local/ecl/lib/libecl.so.10.3...done.
Loaded symbols for /usr/local/ecl/lib//libecl.so.10.3
Reading symbols from /usr/lib/libpthread.so.0...done.
Loaded symbols for /usr/lib/libpthread.so.0
Reading symbols from /usr/lib/libm.so.0...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
0xbb956e27 in __sigtimedwait () from /usr/lib/libc.so.12
(gdb) bt
#0  0xbb956e27 in __sigtimedwait () from /usr/lib/libc.so.12
#1  0xbb91a452 in sigtimedwait () from /usr/lib/libc.so.12
#2  0xbba11e46 in sigtimedwait () from /usr/lib/libpthread.so.0
#3  0xbb91a3b8 in sigwait () from /usr/lib/libc.so.12
#4  0xbbb3ea22 in asynchronous_signal_servicing_thread () at /home/mmondor/work/ecl-cvs/src/c/unixint.d:907
#5  0xbbb54af6 in APPLY_fixed (n=0, fn=0xbb5ffa6c, x=0x0) at /home/mmondor/work/ecl-cvs/src/c/apply.d:350
#6  0xbbb012ae in ecl_apply_from_stack_frame (frame=0xbb5ffcb0, x=0x0) at /home/mmondor/work/ecl-cvs/src/c/eval.d:52
#7  0xbbb01588 in cl_apply (narg=2, fun=0x8fa7a80, lastarg=0x1) at /home/mmondor/work/ecl-cvs/src/c/eval.d:163
#8  0xbbb4c72a in thread_entry_point (arg=0x8f3d210) at /home/mmondor/work/ecl-cvs/src/c/threads.d:177
#9  0xbbb6458a in GC_inner_start_routine (sb=0xbb5ffd74, arg=0x8143cd0) at /home/mmondor/work/ecl-cvs/src/gc/pthread_support.c:1073
#10 0xbbb6145c in GC_call_with_stack_base (fn=0xbbb644e0 <GC_inner_start_routine>, arg=0x8143cd0) at /home/mmondor/work/ecl-cvs/src/gc/misc.c:1167
#11 0xbbb63e77 in GC_start_routine (arg=0x8143cd0) at /home/mmondor/work/ecl-cvs/src/gc/pthread_support.c:1104
#12 0xbba175e6 in pthread_create () from /usr/lib/libpthread.so.0
#13 0xbb93e950 in swapcontext () from /usr/lib/libc.so.12
(gdb)

Thanks again,
-- 
Matt




More information about the ecl-devel mailing list