chmdump fails

點閱人數:78次 八月 5th, 2009 by ㄚ琪 | 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

編譯是成功了,但是會有這類的錯誤:

Getting ::DataSpace/NameList, de = 00000000

6 [main] chmdump 4036 _cygtls::handle_exceptions: Error while dumping stat

e (probably corrupted stack)

Segmentation fault (core dumped)

只好繼續debug,看到Google有兩篇很有用的文章,紀錄如下:

Malicious CHM
Microsoft’s HTML Help (.chm) format

在cygwin下偵錯時,因為程式都是用fprintf(stderr,…之類的作輸出,所以如果要輸出到檔案,得要這麼作才行:

我要如何將 csh 的 stdout 與 stderr 導向到不同的地方呢?

我要如何將 csh 的 stdout 與 stderr 導向到不同的地方呢?

在 csh 中,用 ”>” 將 stdout 導向,用 ”>&” 則能將 stdout 與 stderr 一起導向。可是不能只單獨把 stderr 轉向。最好的方法是

	        ( command >stdout_file ) >&stderr_file

以上的命令會開一個 subshell 執行 ”command”;而這個 subshell 的  stdout 則被轉向到 stdout_file,同時這個 subshell 的 stdout 和  stderr 則都被轉向到 stderr_file,但是因為 stdout 已經先被轉向了, 所以 stderr 就會被轉到 stderr_file 了。

如果你只是單純的不想把 stdout 做轉向,那麼就用 sh 來幫你吧。

	        sh -c 'command 2>stderr_file'
喜歡這篇文章嗎?請幫這篇加入共用書籤,謝謝:
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Hemidemi
  • MyShare
  • Technorati
  • StumbleUpon
  • Diigo
  • Facebook
  • Twitter

Random Posts

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

發表迴響

名稱:(必)
電子郵件位址(並不會被公開)(必)
個人網站


Fatal error: Call to undefined function cbnet_comment_captcha() in /home/job/public_html/wp-content/themes/achi/comments.php on line 84