04-05-2007, 17:40
|
מנהל פורומי "תכנות ובניית אתרים" ו"חומרה ורשתות"
|
|
חבר מתאריך: 25.10.01
הודעות: 42,775
|
|
אתה יכול להריץ אותו דרך gdb ולהוציא backtrace (פקודה: bt, אחרי שזה קורס) כדי לראות מה הפונקציות האחרונות שהורצו לפני הקריסה - אבל אלא אם כן מקור הבעייה הוא בספריה חיצונית (שאולי תוכל לשדרג) - כל דבר אחר אומר שתצטרך ממש להתחיל להבין מה קורה בתוכנה - וזה כבר תלוי אם אתה מתכנת או לא.
תן לנו את ה backtrace ואולי נהיה יותר חכמים...
דוגמא על התוכנה bc (עם עצירה מכוונת של התוכנה כדי להדגים את gdb - בפועל אתה אמור לקבל את gdb חזרה כשהתוכנה קורסת) :
shimi@matrix ~ $ gdb bc
GNU gdb 6.3
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 "x86_64-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/bc
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
Program received signal SIGINT, Interrupt.
0x00002b5b2114b462 in read () from /lib/libc.so.6
(gdb) bt
#0 0x00002b5b2114b462 in read () from /lib/libc.so.6
#1 0x00002b5b20e2a441 in rl_getc () from /lib/libreadline.so.5
#2 0x00002b5b20e2a40e in rl_read_key () from /lib/libreadline.so.5
#3 0x00002b5b20e176c9 in readline_internal_char () from /lib/libreadline.so.5
#4 0x00002b5b20e17bf5 in readline () from /lib/libreadline.so.5
#5 0x0000000000403629 in ?? ()
#6 0x0000000000404282 in ?? ()
#7 0x0000000000403f54 in ?? ()
#8 0x0000000000401d00 in ?? ()
#9 0x000000000040181f in ?? ()
#10 0x00002b5b210bcd00 in __libc_start_main () from /lib/libc.so.6
#11 0x000000000040135a in ?? ()
#12 0x00007fff89dbbc08 in ?? ()
#13 0x000000000000001c in ?? ()
#14 0x0000000000000001 in ?? ()
#15 0x00007fff89dbc191 in ?? ()
#16 0x0000000000000000 in ?? ()
#17 0x00007fff89dbc19d in ?? ()
#18 0x00007fff89dbc29c in ?? ()
#19 0x00007fff89dbc2af in ?? ()
#20 0x00007fff89dbc2c3 in ?? ()
#21 0x00007fff89dbc2d3 in ?? ()
#22 0x00007fff89dbc2e3 in ?? ()
#23 0x00007fff89dbc2fb in ?? ()
#24 0x00007fff89dbc306 in ?? ()
#25 0x00007fff89dbc369 in ?? ()
---Type <return> to continue, or q <return> to quit---
|