"Terminate" under Momentics IDE

bridged with qdn.public.devtools
Post Reply
mik

"Terminate" under Momentics IDE

Post by mik » Thu Sep 25, 2003 8:28 pm

I was wondering if anyone knew how I could include code in my application
that would be triggered when
I "Terminate" the appication from my Debug Momentics window. I tried
catching all signals but Momentics "Terminate" does not trigger any of
those.

My application must clean up properly or else I have to reboot the machine.

Mike

Bill Caroselli

Re: "Terminate" under Momentics IDE

Post by Bill Caroselli » Fri Sep 26, 2003 5:12 pm

mik <mkonstantinides@connecttech.com> wrote:
m > I was wondering if anyone knew how I could include code in my application
m > that would be triggered when
m > I "Terminate" the appication from my Debug Momentics window. I tried
m > catching all signals but Momentics "Terminate" does not trigger any of
m > those.

m > My application must clean up properly or else I have to reboot the machine.

m > Mike

Does atexit() do what you need?

--
Bill Caroselli -- Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

mik

Re: "Terminate" under Momentics IDE

Post by mik » Thu Oct 02, 2003 5:16 pm

Unfortunatly atexit() does not work either.

"Bill Caroselli" <qtps@earthlink.net> wrote in message
news:bl1s2b$5g0$1@inn.qnx.com...
mik <mkonstantinides@connecttech.com> wrote:
m > I was wondering if anyone knew how I could include code in my
application
m > that would be triggered when
m > I "Terminate" the appication from my Debug Momentics window. I tried
m > catching all signals but Momentics "Terminate" does not trigger any of
m > those.

m > My application must clean up properly or else I have to reboot the
machine.

m > Mike

Does atexit() do what you need?

--
Bill Caroselli -- Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

David Gibbs

Re: "Terminate" under Momentics IDE

Post by David Gibbs » Thu Oct 02, 2003 9:17 pm

mik <mkonstantinides@connecttech.com> wrote:
I was wondering if anyone knew how I could include code in my application
that would be triggered when
I "Terminate" the appication from my Debug Momentics window. I tried
catching all signals but Momentics "Terminate" does not trigger any of
those.

My application must clean up properly or else I have to reboot the machine.
Hm... it uses whatever gdb/pdebug would use to do that, but I don't know
what they do either.

But, as a work-around, instead of "terminating" with the debugger,
in the Debug view, click on the line that says "QNX GDB Debugger",
this should make the "Disconnect" icon in the Debug command bar
(it is the 4th icon from the left -- Run, Pause, Stop, Disconnect,
looks like the letter N, but with round balls on the two ends of the
line). This will detach gdb from your program. It is now a normal
program. Then, go to the target navigator, find your program, and
right-click on it, and select "deliver signal" -- pick any signal
you want, and catch that in your signal handler, clean up...

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

Post Reply

Return to “qdn.public.devtools”