Oddities in debug build

When running an application that was built as debug using MsgSendv(),
the debugger seems to be showing that no msg is ever sent. MsgReceivev()
unblocks but never sets the IOV. However, the same application when
built without debug runs perfictly. This doesn’t seem to be related
simple (vs IOV) messeging as everything works fine with MsgSend(). I am
completly at a loss as to why this is happening, and it would be nice to
be able to debug again. :wink:
–Gavin
Principia Solar Car Team

Gavin Carothers <gcarothers@principa.edu> wrote:

When running an application that was built as debug using MsgSendv(),
the debugger seems to be showing that no msg is ever sent.



MsgReceivev() unblocks but never sets the IOV.

That sentence, right there, suggests a certain amount of confusion.

MsgReceviev() is not supposed to modify the iov array it is passed –
what is supposed to do, is to fill the buffers described by the iov
array with data that has been sent by the client. Is that what you
meant?


However, the same application when
built without debug runs perfictly. This doesn’t seem to be related
simple (vs IOV) messeging as everything works fine with MsgSend(). I am
completly at a loss as to why this is happening, and it would be nice to
be able to debug again. > :wink:

Can you post the code you have around the MsgSendv and MsgReceivev
calls where you setup the iovs and use them?

In my experience, usually if there is a problem that changes behaviour
between debug/non-debug, it is a code problem that has been masked
by the different layout of memory or code in the different compile
cases.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

On 3/24/03 3:14 PM, in article b5nsfo$cmm$1@nntp.qnx.com, “David Gibbs”
<dagibbs@qnx.com> wrote:

Gavin Carothers <> gcarothers@principa.edu> > wrote:
When running an application that was built as debug using MsgSendv(),
the debugger seems to be showing that no msg is ever sent.


MsgReceivev() unblocks but never sets the IOV.

That sentence, right there, suggests a certain amount of confusion.

Definitely, some where between reading that how they worked, writing it
once, confusion took over. Also explains why the first part of the messages
worked.

However, the same application when
built without debug runs perfictly. This doesn’t seem to be related
simple (vs IOV) messeging as everything works fine with MsgSend(). I am
completly at a loss as to why this is happening, and it would be nice to
be able to debug again. > :wink:

Can you post the code you have around the MsgSendv and MsgReceivev
calls where you setup the iovs and use them?

No need that all works wonderfully now that I’m actually doing things the
right way. Thanks for pointing me in the right direction.

Having fixed that we have of course come upon another interesting problem.
In our application we started out using a serial head mounted display for
displaying information to the driver, however since then we have had to
change to an actual LCD for display. This means that we now need Photon for
drawing out to the screen. The section on using the Input handler talks
about the fact that if your using name_attach you need to tell photon to use
the same channel. It says that you must call PhChannelAttach() first.
However, what chid should be passed to it as the chid isn’t returned until
you call name_attach(). So once again confused. Not sure if this is the
right place to post this but figured I might as well try.
–Gavin

Gavin Carothers <gcarothers@prinicipa.edu> wrote:

On 3/24/03 3:14 PM, in article b5nsfo$cmm$> 1@nntp.qnx.com> , “David Gibbs”
dagibbs@qnx.com> > wrote:

Gavin Carothers <> gcarothers@principa.edu> > wrote:

Can you post the code you have around the MsgSendv and MsgReceivev
calls where you setup the iovs and use them?

No need that all works wonderfully now that I’m actually doing things the
right way. Thanks for pointing me in the right direction.

No problem, glad to help.

Having fixed that we have of course come upon another interesting problem.
In our application we started out using a serial head mounted display for
displaying information to the driver, however since then we have had to
change to an actual LCD for display. This means that we now need Photon for
drawing out to the screen. The section on using the Input handler talks
about the fact that if your using name_attach you need to tell photon to use
the same channel. It says that you must call PhChannelAttach() first.
However, what chid should be passed to it as the chid isn’t returned until
you call name_attach(). So once again confused. Not sure if this is the
right place to post this but figured I might as well try.

You would normally do something like:
attach = name_attach(…);
PhChannelAttach( attach->chid, -1, NULL );
PtAppAddInput(…);

And, yes, the documentation is wrong – I’ll issue a PR against the
docs to get that fixed. (It should say “before calling PtAppAddInput()”
not “before calling name_attach() or PtAppAddInput()”.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.