Andras
> --
> You received this message because you are subscribed to the Google
> Groups "omnetpp" group.
> To post to this group, send email to omn...@googlegroups.com.
> To unsubscribe from this group, send email to
> omnetpp+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/omnetpp?hl=en.
Sent from my iPhone
A few tips on getting it to work:
1. Do not ever, ever rename your project. It causes CDT to mess up
things internally.
(see also http://stackoverflow.com/questions/307367/eclipse-cdt-invalid-project-path)
If you already renamed your project and you experience these issues,
make a new project, copy your code from the old to the new one and
recompile.
2. If you compile your code to a shared library, the breakpoints in
those shared libraries are not always recognized automatically,
because the dll/so/dylib file is loaded at runtime.
For this reason
you can configure your simulation (when debugging) to stop at the main
function, so you can, at that moment in time,
set breakpoints in code
that is compiled into a shared library.
I think that GDB also has
mechanisms to automatically load/initialize these breakpoints after
loading the dynamic library, but for some reason that doesn't work
with me.
My issues were actually a combination of 1 and 2, making gdb say 'No
source file named ...' to a perfectly valid file path.
388,020 (gdb)
388,028 28-stack-info-depth --thread 1 11
388,057 29-break-insert -f /home/user1/project/eclipse-luna/dir/file.cpp:2437
388,172 28^done,depth="10"
388,196 (gdb)
388,196 &"No source file named /home/user1/project/eclipse-luna/dir/file.cpp.\n"
388,203 29^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending=\
"/home/user1/project/eclipse-luna/dir/file.cpp:2437",times="0",original-location="/home/use\
r1/project/eclipse-luna/dir/file.cpp:2437"}
After an entire day of fiddling and a lot of frustration I finally got
it working. There are many different variables/circumstances to
consider here.
A few tips on getting it to work:
1. Do not ever, ever rename your project. It causes CDT to mess up
things internally.
(see also http://stackoverflow.com/questions/307367/eclipse-cdt-invalid-project-path)
If you already renamed your project and you experience these issues,
make a new project, copy your code from the old to the new one and
recompile.
2. If you compile your code to a shared library, the breakpoints in
those shared libraries are not always recognized automatically,
because the dll/so/dylib file is loaded at runtime. For this reason
you can configure your simulation (when debugging) to stop at the main
function, so you can, at that moment in time, set breakpoints in code
that is compiled into a shared library. I think that GDB also has
mechanisms to automatically load/initialize these breakpoints after
loading the dynamic library, but for some reason that doesn't work
with me.
My issues were actually a combination of 1 and 2, making gdb say 'No
source file named ...' to a perfectly valid file path.
Hey ??
+1 for adding noise to google results
1) No "strip" option is to be found around the Omnet IDE! (unless you do so from the cmd line, or ?).
2) It is not an solving the problem discussed in the thread.
I am actually facing the same issue. I get this "no source file.." message popping up every time I set breakpoint somewhere in the code which is located in some file deep in a subdirectory of the project's src/ dir. Moreover if that is the first breakpoint, the debugger does not stop there.