views:

247

answers:

2

Hello,

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 understand 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.

A: 

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.

Oodini
I've been trying to mess around with this aspect of eclipse myself and have been having very strange errors. What did you fill in for the application and the Project in the launch configuration? What were your other configurations in the launch configuration?
Ton as in Anton
A: 

Hello,

I'm coming back to my project, and I can't debug again. My own answer doesn't help me. :-) Please forget it, and read only th initial post.

Here are some extra infos :

  • the log says "no debugging symbols found"
  • for each break pints, the log says "No symbol table is loaded"

In CDT, I have the same error message for each breakpoint : "Unresolved breakpoint"

Thanks for help.

Oodini