簡體   English   中英

在MacOS中設置Eclipse調試器

[英]Setup of the Eclipse debugger in MacOS

我正在嘗試從Eclipse IDE調試項目。 設置項目路徑后,我可以正確地構建和運行。 但是,當我嘗試調試時會遇到此錯誤:

ERROR: Cannot open file for reading: /Users/manfredo/Documents/Eclipse_workspace/Formind/formind-model/src/'../../formind_proj/FrenchGuiana_Paracou_Lianas/lowlandTropicalForest_9pft/formind_parameters/paracouForest_controlPlots_9pft.par' . File: ./for_iommparset.h  Line: 1356
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: ERROR: Cannot open file for reading: /Users/manfredo/Documents/Eclipse_workspace/Formind/formind-model/src/'../../formind_proj/FrenchGuiana_Paracou_Lianas/lowlandTropicalForest_9pft/formind_parameters/paracouForest_controlPlots_9pft.par' . File: ./for_iommparset.h  Line: 1356

從終端,我可以在GDB中正常運行我的可執行文件:

[src]$ gdb ./formind
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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.7.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"...
Reading symbols from ./formind...done.
(gdb) r ../../formind_proj/FrenchGuiana_Paracou_Lianas/lowlandTropicalForest_9pft/formind_parameters/paracouForest_controlPlots_9pft.par
Starting program: /Users/manfredo/Documents/Eclipse_workspace/Formind/formind-model/src/formind ../../formind_proj/FrenchGuiana_Paracou_Lianas/lowlandTropicalForest_9pft/formind_parameters/paracouForest_controlPlots_9pft.par
[New Thread 0x1403 of process 13482]
warning: unhandled dyld version (15)
Initialize lookup vectors
=================== Start Simulation=======================

...
=============== Simulation Successful =====================
Runtime: 0.809137 seconds
[Inferior 1 (process 13482) exited normally]
(gdb)

關於解決方案有什么想法嗎? 我在MacOS 10.12.6上運行Eclipse Photon

您可能正在Eclipse中使用錯誤的參數調試二進制文件。

比較路徑到Eclipse中的文件:

/Users/manfredo/Documents/Eclipse_workspace/Formind/formind-model/src/'../../formind_proj/FrenchGuiana_Paracou_Lianas/lowlandTropicalForest_9pft/formind_parameters/paracouForest_controlPlots_9pft.par'

以及獨立gdb中文件的路徑:

../../formind_proj/FrenchGuiana_Paracou_Lianas/lowlandTropicalForest_9pft/formind_parameters/paracouForest_controlPlots_9pft.par

我猜文件的路徑應該與獨立gdb的路徑相同。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM