作者victoret (戲言~)
看板EE_DSnP
標題[問題] Dofile 的問題
時間Thu Oct 27 20:49:22 2011
在還沒修改過 openDofile 和 closeDofile 之前
直接去 make 之後
輸入 do ./dofiles/do1
會顯示出如下的狀況
mcalc> do ./dofiles/do1
mcalc> help
DOfile: execute the commands in the dofile
HELp: print this help message
HIStory: print command history
MADD: perform modular number addition
MCOMPare: compare if two variables or values are equal
MMULTiply: perform modular number multiplication
MPrint: print the variables of the modular number calculator
MSET: set the modulus of the modular number calculator
MSUBtract: perform modular number subtraction
MVARiable: set the variable value of the modular number calculator
Quit: quit the execution
mcalc>
程式記憶體區段錯誤
想請問一下,這個 " 程式記憶體區段錯誤 " 是來自於哪裡???
--
理所當然的某項事物,卻會以某天為區隔,從此變得不再理所當然。
恩田陸 夜間遠足
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.25.108
1F:推 ric2k1:你這個情況還算是單純的,用ddd/gdb trace一下就知道原因啦 10/27 21:05
2F:→ djshen:close的時候_dofile沒有=0? 10/27 22:28
3F:→ victoret:感謝教授和樓上的回答... 10/27 23:51
4F:→ victoret:結果因為 TODO 寫在 delete 的上面...就傻傻的以為只能在 10/27 23:52
5F:→ victoret:delete 之前修改了...囧ˊˋ 10/27 23:52
6F:→ victoret:不過隨便加一些東西到 openDofile 或是 closeDofile 都很 10/27 23:58
7F:→ victoret:容易造成整個 ubuntu 當在那裡不能動... 10/27 23:59
8F:→ victoret:用 ddd 比較保險一點@@ 10/27 23:59
9F:推 vuluy:我就當掉好幾次XD 10/28 00:52
10F:→ victoret:用 ddd + xkill 可以省下不少麻煩 10/28 01:05