开发者

CDT, SCons, and debug with attach

I am new to development in Eclipse/CDT, and not very experienced with gcc/gdb.

My project (a shared library) is built in Eclipse by using SCons. The generated .so is at the end of the SCons script copied to an other place (maybe it's an important point).

My application is so a plug-in that the user must load in the host application. So I want to launch the host application, load my plug-in/library, and then attach the debug session to the host application (I think that's what I am supposed to do).

I created a debug configuration. I chose "C/C++ Attach to Application" to create my configuration. In the main Tab, I set my Project, the Build Configuration (calling the SCons script), and for "C/C++ Application", I put the path to the host application.

But that doesn't work. Maybe because of the location of the generated .so. In the Builder Settings, the Build Location is ${workspace_loc:/myProjectName}. I don't understand this syntax, even if I unders开发者_Python百科tand workspace_loc stands for my project root. Anyway, iot isn't related where the SCons file generates the .so. Maybe that's the source of the problem ?

Thanks for your help. The Eclipse documentation is pretty porr about these points.

Update : I get the following error : ptrace: Operation not permitted.


Well, actually, it does work. But no well. gdb takes about 15 seconds to attach to host process.

After this delay, I get this trace:

.gdbinit: No such file or directory.
(no debugging symbols found)
attach 25678
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

But I still cannot debug: I have to do a "Resume", because gdb is stopped when the attachment is finished, with the host application frozen. So I thought it was crashed.

I so still have to find why it is so long to attach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜