【 在 atppp (Big Mouse) 的大作中提到: 】
: 你前面说断线的地方gdb信息一样?能不能进一步调试看看?
: 是不是frame 3里面currboard指针有问题?
掉线前后输入bt的显示的信息是一样的
# gdb /export/home0/bbs/bin/bbsd
GNU gdb 6.0
Copyright 2003 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-pc-solaris2.9"...
(gdb) attach 19671
Attaching to program `/export/home0/bbs/bin/bbsd', process 19671
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
sol-thread active.
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1 ]
[New Thread 1 (LWP 1)]
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/local/lib/libz.so.1
Symbols already loaded for /usr/lib/libpthread.so.1
Symbols already loaded for /usr/local/lib/libltdl.so.3
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/local/lib/libgcc_s.so.1
Symbols already loaded for /usr/lib/libthread.so.1
[Switching to Thread 1 (LWP 1)]
0xd118d26d in _poll () from /usr/lib/libc.so.1
掉线前输入bt时的信息:
(gdb) bt
#0 0xd118d26d in _poll () from /usr/lib/libc.so.1
#1 0xd11a9674 in _select () from /usr/lib/libc.so.1
#2 0xd10dda92 in select () from /usr/lib/libthread.so.1
#3 0x080cd381 in igetch () at newio.c:454
#4 0x080cda30 in igetkey () at newio.c:638
#5 0x080880a2 in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:605
#6 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#7 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#8 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#9 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton")
at bbsd_single.c:914
#10 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
(gdb) l
1009 return (*handlers[mode])(argv[0]);
1010
1011
1012 /*
1013 whee = gethostbyaddr((char*)&sin.sin_addr.s_addr,sizeof(struct in_addr),AF_INET);
1014 if ((whee)&&(whee->h_name[0]))
1015 strncpy(hid, whee->h_name, 17) ;
1016 else
1017 KCN temp change it for trace IP!! don't remove. 2000.8.19 */
1018 }
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0xd117f6f4 in strlen () from /usr/lib/libc.so.1
掉线后输入bt时的信息:
(gdb) bt
#0 0xd117f6f4 in strlen () from /usr/lib/libc.so.1
#1 0xd11b8640 in _doprnt () from /usr/lib/libc.so.1
#2 0xd11bb278 in sprintf () from /usr/lib/libc.so.1
#3 0x080cc393 in showtitle (title=0xd10a38f8 "系统维护选单",
mid=0x8047880 "KBS测试站") at newmain_single.c:1275
#4 0x080cc75e in docmdtitle (title=0xd10a38f8 "系统维护选单",
prompt=0x81014fd "目前选择:") at newmain_single.c:1392
#5 0x08087a30 in domenu_screen (dopm=0xd10a0f28,
cmdprompt=0x81014fd "目前选择:") at comm_lists.c:469
#6 0x080883de in domenu (menu_name=0xd10a20df "M_ADMIN") at comm_lists.c:655
#7 0x080883bf in domenu (menu_name=0x810ef08 "TOPMENU") at comm_lists.c:651
#8 0x080cbe41 in main_bbs (convit=0, argv=0x8047eac "bbsd:linton")
at newmain_single.c:1141
#9 0x080c4be9 in bbs_main (argv=0x8047eac "bbsd:linton") at bbsd_single.c:771
#10 0x080c4db0 in bbs_standalone_main (argv=0x8047eac "bbsd:linton")
at bbsd_single.c:914
#11 0x080c4eec in main (argc=3, argv=0x8047dd4) at bbsd_single.c:1009
(gdb) list
1009 return (*handlers[mode])(argv[0]);
1010
1011
1012 /*
1013 whee = gethostbyaddr((char*)&sin.sin_addr.s_addr,sizeof(struct in_addr),AF_INET);
1014 if ((whee)&&(whee->h_name[0]))
1015 strncpy(hid, whee->h_name, 17) ;
1016 else
1017 KCN temp change it for trace IP!! don't remove. 2000.8.19 */
1018 }
(gdb) n
Single stepping until exit from function strlen,
which has no line number information.
warning: rw_common (): unable to read at addr 0xd10f6500
warning: rw_common (): unable to read at addr 0xd10f6500
thread_to_lwp: td_ta_map_id2thr Debugger service failed
--
FROM 202.193.15.*