山田さん

こんにちは。茂木と申します。

gdbはWindows上でのデバッグビルドで生成されるデバッグ情報に対応していない
ため、VisualC++やWinDbgを使ってデバッグする必要があります。VC2012の
Expressの場合、下記ででできます。

1. デバッグビルドされたlibreofficeを起動する
2. ツールバーの「アタッチ」ボタンかメニューの「デバッグ→プロセスにアタッチ」
3. soffice.binを一覧から探して選ぶ
4. ツールバーの一時停止ボタンかメニューの「デバッグ→すべて中断」
5. ソースコードをIDE内に開けばブレークポイント置いたりとかできるようになる

起動した瞬間に落ちるなどの理由でアタッチできない場合、Express版だと対応
できなかったと思うので、WinDbgを使うと良いです。下記に情報があります
https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg

本当に起動した瞬間に落ちる場合下記のように、windbg -I をしておくと落ちた
瞬間にwindbgが起動して原因のソースの箇所とかがわかって便利です。
http://stackoverflow.com/questions/5638251/setup-windbg-as-default-debugger

(2013/05/20 4:19), 山田太郎 wrote:
> 初めて投稿させて頂きます。
> 
> 以下の環境で日本語版LibreOffice4.0.3.3をデバッグビルドしたのですが、デバッグシンボルが生成されていない様です。
> どなたか解決方法をご存知の方いらっしゃいますでしょうか?
> 
> ■参考にした手順
> https://wiki.documentfoundation.org/Development/How_to_debug
> 
> ■ソースファイル
> http://ja.libreoffice.org/download/?type=src&version=4.0.3からダウンロードした
> バージョン4.0.3.3ソースファイル
> 
> ■ビルド環境
> OS:Windows7(64bit)
> Cygwin:1.7.18(0.263/5/3)
> コンパイラ:Visual Studio 2012 Express for Desktop
> make:LOパッチが当てられたGNU make 3.82
> http://dev-www.libreoffice.org/bin/cygwin/make
> 
> ■autogen.shに渡したパラメータ
> $ ./autogen.sh --disable-activex --disable-atl
> --with-nss-build-tools='/cygdrive/c/mozilla-build'
> --with-ant-home='D:\apache-ant-1.9.0' --without-junit
>   --with-cl-home='C:\PROGRA~2\MICROS~2.0\VC' --without-help
> --without-myspell-dicts --enable-debug --with-lang="en-US ja"
> 
> ■gdb起動結果
> LOROOT=`pwd`
> $ /opt/lo/bin/make debugrun
> /opt/lo/bin/make -r -f /home/test/libreoffice-4.0.3.3/Makefile.top debugrun
> make[1]: Entering directory `/home/test/libreoffice-4.0.3.3'
> /opt/lo/bin/make -j 4 -rs -f Makefile.post debugrun
> make[1]: Leaving directory `/home/test/libreoffice-4.0.3.3'
> 
> $ cd $LOROOT/solver/wntmsci14.pro/installation/opt/program
> 
> $ gdb ./soffice.bin
> GNU gdb (GDB) 7.6.50.20130508-cvs (cygwin-special)
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-cygwin".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /home/test/libreoffice-4.0.3.3/solver/
> wntmsci14.pro/installation/opt/program/soffice.bin...(no debugging symbols
> found)...done.
> (gdb) q
> 
> 以上、宜しくお願い致します。
> 


-- 
Unsubscribe instructions: E-mail to [email protected]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/ja/discuss/
All messages sent to this list will be publicly archived and cannot be deleted

メールによる返信