public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Debugging multi-threaded eCos application using GDB
@ 2001-04-23  0:28 Nadine.Albiez-extern
  2001-04-23  5:52 ` Bart Veer
  0 siblings, 1 reply; 7+ messages in thread
From: Nadine.Albiez-extern @ 2001-04-23  0:28 UTC (permalink / raw)
  To: ecos-discuss

Hello,
I have a question about debugging an eCos  multi-threaded application using gdb.
When I want to see the list of my threads , the command "info threads" returns nothing

     (gdb) info threads
          (gdb) thread 1
           Thread ID 1 not known.  Use the "info threads" command to
           see the IDs of currently known threads.

What can I do for enabling the multi-threaded ? When I use a linux test application I have no problem, "info threads" returns the list of threads.....
Is there any option when generating the eCos kernel to allow Gdb to see the eCos's Thread (cyg_thread_create)?
I observe the same behavior with the example program "two_threaded".
Is there a package to add to ecos.ecc? I use eCos version 1.4.8. , gdb version 4.18 (I try gdb 5.0 with the same result) and work on a linux target .

Thanks for your help

     Nadine Albiez


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [ECOS] Debugging multi-threaded eCos application using GDB
@ 2001-08-03  2:49 Stefan Syberichs
  2001-08-03  6:21 ` Jonathan Larmour
  2001-08-03  7:39 ` Bart Veer
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Syberichs @ 2001-08-03  2:49 UTC (permalink / raw)
  To: ecos-discuss

Hello, 

We have a similar problem like Nadine:
Debugging an eCos application for the linux target is hard, because gdb is 
not aware of
the eCos threads.

> We do have some ideas on how to fix this properly, basically making
> the thread-aware debugging inside gdb much more flexible, but so far
> nobody has been willing to contribute or fund any of the work
> involved.

> Bart


Bart, what exactly are the ideas for gdb ? Or does anybody have a solution 
meanwhile ?

regards, Stefan

----------------------------------------------------------------------------------------------------------

To: Nadine dot Albiez-extern at ascom dot fr 
Subject: Re: [ECOS] Debugging multi-threaded eCos application using GDB 
From: Bart Veer <bartv at redhat dot com> 
Date: Mon, 23 Apr 2001 13:52:09 +0100 
Cc: ecos-discuss at sources dot redhat dot com 
References: <OF8761DF62.DD359E81-ONC1256A37.00272947@ascom.fr> 
Reply-To: bartv at redhat dot com 

>>>>> "Nadine" == Nadine Albiez-extern <Nadine.Albiez-extern@ascom.fr> 
writes:

    Nadine> Hello,
    Nadine> I have a question about debugging an eCos multi-threaded
    Nadine> application using gdb. When I want to see the list of my
    Nadine> threads , the command "info threads" returns nothing

    Nadine>      (gdb) info threads
    Nadine>           (gdb) thread 1
    Nadine>            Thread ID 1 not known.  Use the "info threads" 
command to
    Nadine>            see the IDs of currently known threads.

    Nadine> What can I do for enabling the multi-threaded ? When I use
    Nadine> a linux test application I have no problem, "info threads"
    Nadine> returns the list of threads..... Is there any option when
    Nadine> generating the eCos kernel to allow Gdb to see the eCos's
    Nadine> Thread (cyg_thread_create)? I observe the same behavior
    Nadine> with the example program "two_threaded". Is there a
    Nadine> package to add to ecos.ecc? I use eCos version 1.4.8. ,
    Nadine> gdb version 4.18 (I try gdb 5.0 with the same result) and
    Nadine> work on a linux target .

Thread-aware debugging is not available on all targets, and
unfortunately that includes the synthetic target which I assume you
are referring to.

The problem is with the current implementation of thread-aware
debugging. It expects to be able to interact with some code inside the
embedded target, for example RedBoot or gdb stubs, that knows about
the specific thread implementation being used. Debugging the synthetic
target does not involve interacting with remote stubs, instead it uses
facilities provided by the system such as ptrace().

To confuse things further, gdb might think that you are trying to
debug a multi-threaded Linux application where the threading is
provided by Linux. This does not work either: synthetic target threads
are not built on top of Linux threads, you want the eCos semantics
rather than the Linux ones.

We do have some ideas on how to fix this properly, basically making
the thread-aware debugging inside gdb much more flexible, but so far
nobody has been willing to contribute or fund any of the work
involved.

Bart


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-08-03  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-23  0:28 [ECOS] Debugging multi-threaded eCos application using GDB Nadine.Albiez-extern
2001-04-23  5:52 ` Bart Veer
2001-08-03  2:49 Stefan Syberichs
2001-08-03  6:21 ` Jonathan Larmour
2001-08-03  7:39 ` Bart Veer
2001-08-03  8:11   ` Jonathan Larmour
2001-08-03  9:46     ` Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).