This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Can not interrupt running application
- From: Keith Seitz <keiths at redhat dot com>
- To: L P <plm at iname dot com>
- Cc: insight at sources dot redhat dot com
- Date: Mon, 27 Oct 2003 11:00:58 -0800
- Subject: Re: Can not interrupt running application
- References: <20031027093829.33429.qmail@iname.com>
L P wrote:
Hello.
I reread my mail and decided to add some more details.
I cross-compiled Insight 5.3 on RH9 machine with gcc5.2.2 for PowerPC.
I try to debug my embedded application via the BDM using bdm4gdb package.
When I run the application by plane gdb in console mode, 100% of gdb works and when I press Ctrl-C (while the application is in while(1)
loop) gdp stops saying "Program received signal SIGINT, Interrupt.".
When I try to do the same in Insight, it hangs. I can not press any button (including interrupt) or enter any menu item. Only kill command
helps.
What can be the cause of the problem?
Sounds a lot like another backend problem with the bdm code.
To be specific... Gdb has several event loops. Insight adds another. The
two really important event loops are the Tk event loop (used by
Insight's GUI code) and gdb's target_wait (which waits for an event from
the target).
When using a serial port or a network connection in one of gdb's
standard/supported targets, the target_wait loop will call out to a hook
which will keep the UI alive (ui_loop_hook). This is done all over the
place. It isn't pretty, but it's the only workable solution right now.
(Well, actually that may not be necessarily true anymore, since we can
now monitor activity on a socket for windows events in both X and
cygwin. Nonetheless, it wasn't always possible, and this is what we have
today.)
It sounds a lot like the bdm code is waiting forever for an event from
the target, and starving the UI event loop.
Keith