This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Entering GDB stubs from an application
- From: Gary Thomas <gary at mlbassoc dot com>
- To: "Doyle, Patrick" <WPD at dtccom dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 04 Sep 2003 13:01:56 -0600
- Subject: Re: [ECOS] Entering GDB stubs from an application
- Organization: MLB Associates
- References: <F18ED44D2778844592DFB732956B6651B529DE@DTCNT40S4>
On Thu, 2003-09-04 at 13:00, Doyle, Patrick wrote:
> I am trying to track down a problem right now and I would like to drop my
> application into GDB stubs when an external event happens. (I have to use
> the serial port to configure and control the application, but I want to go
> in after the fact and poke around). I tried accessing non-existent memory
> and dividing by zero, neither of which dropped me into GDB stubs. I tried
> reading the CDL for an option that looked like it would do the trick, but
> came up empty (after trying a few things) there too, so now I turn to you.
>
> I think I have run into a case where the kernel is helping me by ignoring
> the exception. In a production system, I think that's a great idea (I don't
> want the production system to drop into GDB stubs for no apparent (to the
> end user) reason), but in this case, I would like to force it to happen.
>
> Any ideas?
>
> Since I wrote the HAL myself, it is possible/likely that I missed something.
Try 'breakpoint()' - this should cause an immediate entry into GDB. If
you then want to continue, you'll have to advance the PC manually over
the breakpoint instruction.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss