This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: info threads on Synthetic target


>>>>> "Jifl" == Jonathan Larmour <jlarmour@cygnus.co.uk> writes:

    >> For the Synthetic linux target, is gdb supposed to be able to
    >> see the threads? The "info threads" command does not work. I
    >> have the HAL option CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
    >> enabled.

    Jifl> Simple answer: nope. It would require gdb support to be
    Jifl> added I'm afraid.

Or for a more complete explanation (although be warned that I am not a
gdb expert)...

On embedded targets such as an evaluation board, gdb typically works
by interacting with gdb stub code on the target via a serial line.
With eCos we have control over the gdb stubs, so they know how eCos
threads work and can send back the right data in response to the
relevant gdb packets.

For the synthetic target there are no target-side stubs involved.
Instead gdb will use exactly the same debugging techniques that it
would use for a native Linux application, i.e. the ptrace() system
call or something along those lines. For gdb to provide thread-aware
debugging in these circumstances, it would need to know about eCos
kernel data structures so that it can peek around the synthetic target
address space. This is not impossible (although implementing it
cleanly is non-trivial), but the work has not yet been done.

Bart Veer // eCos net maintainer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]