Debugging problem with Mac OSX

256 views
Skip to first unread message

S. M.

unread,
Feb 24, 2012, 8:41:07 AM2/24/12
to omnetpp
Dear All,

I tried to publish this post in an older discussion about the same
arguments, since it has not been published I created here a new
discussion, sorry if this is not correct.

This is the old discussion:
http://groups.google.com/group/omnetpp/browse_thread/thread/837270fb3c237ca7/284dfdc2e5e64d65?lnk=gst&q=debugging+problem#284dfdc2e5e64d65


I have been facing a lot of problems during the debugging session: the
breakpoints are skipped and I can't debug my source code anyway.
Moreover if I manually switch the Debug prospective in the console
output (for the gdb configuration) the following errors are reported
many times:

unable to read unknown load command 0x24
unable to read unknown load command 0x26


I'm using Mac OS X Lion 10.7.3 with OMNeT 4.2. The version of gcc is
4.2.1, the version of Xcode is 4.3 and then the version of gdb is
6.3.50-20050815 (Apple version gdb-1346).

Do you have any suggestions?
Many thanks in advance,
Simone.

Rudolf Hornig

unread,
Feb 24, 2012, 9:53:53 AM2/24/12
to omn...@googlegroups.com
I've just tested it with the same configuration (except I'm using OMNeT++ 4.2.1) and debugging seems to working (debugger stops at breakpoints etc.)

Could you try this with the aloha example? (inet is compiled as a shared lib so it is a more complex issue).

Start debugging aloha and set the checbox that is should stop at main().
- Does it stop there:
- If it has stopped, set your breakpoint at this point (let's say somewhere in the initilize() method of the Server) and press resume.
- Run the simulation. Does it stop in intit?

Rudolf


--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp

A S Al

unread,
Feb 24, 2012, 11:02:26 AM2/24/12
to omn...@googlegroups.com
Dear all,
Best wishes.
I am a Ph.D. student and I have a project with omnet++.
Now I am working on “Wireless Sensor/Actuator Network (WSAN) for DCS applications".
Can you help me with giving me ideas or related works regarding how
to create wireless network and how it simulation. And I would work on ad hoc protocols.
I would appreciate any help

Thank you.
Yours faithfully,
A S 
  

S. M.

unread,
Feb 25, 2012, 8:41:58 AM2/25/12
to omnetpp
Dear Rudolf and all,

First of all thank you for your reply and for your help.

I tried the debugging in the alhoa example, but unfortunately:

- The debugging doesn't stop at main()
- The same errors are still present (for the gdb config)
- When I try to set a breakpoint (in the init() of the aloha Server as
you suggested me) a warning reports UNRESOLVED BREAKPOINT,and clearly
the simulation doesn't stop...

I would send you a couple of captures, 1 for the output and 1 for the
used configuration but I don't know if it's possible and then I'm not
able to do it :-)

Any kind of help is really appreciated! ;-)

Thanks,
Simone.


On 24 Feb, 15:53, Rudolf Hornig <rudolf.hor...@gmail.com> wrote:
> I've just tested it with the same configuration (except I'm using OMNeT++
> 4.2.1) and debugging seems to working (debugger stops at breakpoints etc.)
>
> Could you try this with the aloha example? (inet is compiled as a shared
> lib so it is a more complex issue).
>
> Start debugging aloha and set the checbox that is should stop at main().
> - Does it stop there:
> - If it has stopped, set your breakpoint at this point (let's say somewhere
> in the initilize() method of the Server) and press resume.
> - Run the simulation. Does it stop in intit?
>
> Rudolf
>
>
>
>
>
>
>
> On Fri, Feb 24, 2012 at 2:41 PM, S. M. <simo_mor...@tin.it> wrote:
> > Dear All,
>
> > I tried to publish this post in an older discussion about the same
> > arguments, since it has not been published I created here a new
> > discussion, sorry if this is not correct.
>
> > This is the old discussion:
>
> >http://groups.google.com/group/omnetpp/browse_thread/thread/837270fb3...

Rudolf Hornig

unread,
Feb 27, 2012, 4:48:21 AM2/27/12
to omn...@googlegroups.com
Ok, I assume you made sure that you have compiled the debug version of aloha. (make sure that the simlink samples/aloha/aloha points to the out/gcc-debug directory.

If that is correct, just send me the console logs for the GDB start. I would take a look at that.
Rudolf

S. M.

unread,
Feb 27, 2012, 9:16:26 AM2/27/12
to omnetpp
Solved.

I simply re-installed Xcode downloading all the components (Xcode-->
preferences --> Download).
Now it works!

Thank you very much for your kind help again Rudolf!

Rudolf Hornig

unread,
Feb 27, 2012, 10:32:34 AM2/27/12
to omn...@googlegroups.com
Great, at least we know where the fault was lurking...
Have fun debugging your code :)
Rudolf
Reply all
Reply to author
Forward
0 new messages