This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: httpd/monitor problem
- From: "Daniel Lidsten" <Daniel dot Lidsten at combitechsystems dot com>
- To: "Andrew Lunn" <andrew dot lunn at ascom dot ch>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 15 May 2003 12:54:58 +0200
- Subject: RE: [ECOS] httpd/monitor problem
Maybe i have misunderstod but the below function expects a thread as
input since its parameter is a pointer. I assume that the function
returns the next thread AFTER the one that was sent into the function?
cyg_bool_t cyg_thread_get_next( cyg_handle_t *current, cyg_uint16 *id )
However, in the monitor.c, the following code is present (see below). It
calls the cyg_thread_get_next function with both thread and id set to
zero. Probably the usage of the above function is wrong...?
cyg_handle_t thread = 0;
cyg_uint16 id = 0;
while( cyg_thread_get_next( &thread, &id ) )
Regards, Daniel
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew.lunn@ascom.ch]
> Sent: den 15 maj 2003 12:46
> To: Daniel Lidsten
> Cc: ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] httpd/monitor problem
>
>
> On Thu, May 15, 2003 at 12:19:35PM +0200, Daniel Lidsten wrote:
> > Hi,
> >
> > I have included the httpd/monitor in my build and i get a strange
> > assert when i hit the "thread" option in the "monitor/index.html".
> >
> > Here is my printout:
> >
> > ASSERT FAIL: <2>kapi.cxx [ 334] cyg_bool_t
> cyg_thread_get_next()
> > class pointer (thread) is valid
> >
> > The printout comes from the following row in cyg_thread_get_next:
> >
> > CYG_ASSERT_CLASSC( thread );
> >
> > What does this mean?
>
> I suspect the "is valid" should be "is invalid". The macro causes the
> check_this() method to be called on the thread class. You can
> find that function in packages/kernel/current/src/common/thread.cxx.
>
> Probably the thread is a null pointer, although it could be
> the stack pointer is out of range. If it is a null pointer,
> that means *current passed into the function is a null
> pointer. That should be easy to check with gdb. I would
> checked what is going on in the monitor.c code when it
> enumerates the threads. I've had this working with synth, but
> never tried it on real hardware.
>
> Andrew
>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss