2016-10-17 17 views
2

macOS SierraでGDBを使用してTensorFlowをデバッグしようとしています。私はpostの指示に従いました。デベロッパー版のテンソルフローをデバッグ用にインストールした後、gdbを使ってPythonセッションをアタッチしようとしました。 macOSでgdbを使用してテンソルフローをデバッグできない

私はgdb -p <pid>を実行

私はブレークポイントを設定
GNU gdb (GDB) 7.11.1 
Copyright (C) 2016 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 "x86_64-apple-darwin16.0.0". 
Type "show configuration" for configuration details. 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>. 
Find the GDB manual and other documentation resources online at: 
<http://www.gnu.org/software/gdb/documentation/>. 
For help, type "help". 
Type "apropos word" to search for commands related to "word". 
Attaching to process 18822 
Reading symbols from /Users/dtong/.virtualenvs/tensorflow/bin/python3.5...(no debugging symbols found)...done. 

warning: unhandled dyld version (15) 
0x00007fffc4d83f4e in ??() 
(gdb) 

:ポストが言うよう

(gdb) break TF_NewSession 
Function "TF_NewSession" not defined. 
Make breakpoint pending on future shared library load? (y or [n]) y 
Breakpoint 1 (TF_NewSession) pending. 

はその後も、私はsess = tf.Session()を実行します。 GDBは決してブレークポイントに入りません。

答えて

1

MacOSでlldbを使用するように変更した後、すべて正常に機能します。だから私はこの問題の解決策は "GDBの代わりにLLDBを使う"と思っています。

関連する問題