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:14:29 -0600
- Subject: RE: [ECOS] Entering GDB stubs from an application
- Organization: MLB Associates
- References: <F18ED44D2778844592DFB732956B6651B529DF@DTCNT40S4>
On Thu, 2003-09-04 at 13:09, Doyle, Patrick wrote:
> Thanks Gary,
> The problem is 'breakpoint()' is undefined (at link time). I guess I'll try
> including GDB stubs in my application (instead of relying on RedBoot) --
> perhaps that will make it be defined.
>
> --wpd
Or just look in the appropriate hal_arch.h file and define it yourself
for this purpose. After all, this is only for debugging.
>
>
> > -----Original Message-----
> > From: Gary Thomas [mailto:gary@mlbassoc.com]
> > Sent: Thursday, September 04, 2003 3:02 PM
> > To: Doyle, Patrick
> > Cc: eCos Discussion
> > Subject: Re: [ECOS] Entering GDB stubs from an application
> >
> >
> > 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
> >
--
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