This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: gdb - info thread
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Phungte-Ha <phungte at decru dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 10 Jun 2004 13:35:57 -0600
- Subject: Re: [ECOS] gdb - info thread
- Organization: MLB Associates
- References: <200406101928.i5AJSdZ22588@phungte-15.decru.com>
On Thu, 2004-06-10 at 13:28, Phungte-Ha wrote:
> Hello all,
>
> I am running twothreads.c on a ppc405 platform, which has redboot
> compiled with gdb multi-thread debug. The application is loaded using gdb,
> connected by serial line.
>
> Everything seems to work fine, but I wonder about info thread.
> I changed twothreads.c, added a 3rd thread to it, and info thread command
> invariably returns:
>
> (gdb) info thread
> 2 Thread 2 ( Name: main, State: ready, Priority: 10 ) 0xfffeadf0 in ?? ()
> * 1 Thread 1 ( Name: Idle Thread, State: running, Priority: 31 ) simple_program_2 (
> data=4) at twothreads.c:122
> (gdb)
>
> The 3 threads started fine as stated by the printf from the application:
> [New Thread 1]
> 0xfffee85c in ?? ()
> $1 = 0x17400
> Entering twothreads' cyg_user_start() function
> resuming threads
> Beginning execution; thread data is 0
> Beginning execution; thread data is 1
> Beginning execution; thread data is 2
> Thread 0: and now a delay of 100 clock ticks
> Thread 1: and now a delay of 100 clock ticks
> Thread 2: and now a delay of 100 clock ticks
> Thread 0: and now a delay of 100 clock ticks
> Thread 1: and now a delay of 100 clock ticks
> Thread 2: and now a delay of 100 clock ticks
>
>
> The questions are:
> . is the info thread command printing out the thread information of
> redboot rather than the one from twothreads?
> . is it possible to get real twothreads' thread information (the list would
> have at least 3 threads then) while running the application this way
> (application running ontop of redboot, instead of gdb stub)?
>
> Thanks a lot for your ideas.
The 'info threads' command only tells you about the threads that exist
at the time of the command (since threads in eCos are totally dynamic).
I think that if you set a breakpoint somewhere in your program, *after*
the three threads have been created, it would tell you something quite
different than what you show.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss