This is the mail archive of the ecos-discuss@sources.redhat.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]
Other format: [Raw text]

Re: how gdb know all threads running and get their info?


     >  Could you tell me how gdb found all threads existed in
     > system and got their info?

     >    I think,gdb will not found thread list in system(this
     > varible name is not same to another system),so who tell gdb
     > these info?

gdb has no built-in knowledge of eCos threads. When debugging a
typical embedded system gdb will interact with the target hardware via
gdb stubs (usually embedded inside RedBoot) running on that target.
Communication between gdb on the host and gdb stubs on the target uses
a suitable protocol, the remote protocol, as described in the gdb
documentation.

One of the requests in the remote protocol allows gdb to ask the stubs
for a list of threads. The gdb stubs have some knowledge of eCos
internals, enough to access Cyg_Thread::thread_list, and hence can
respond to the gdb request with the appropriate information.

With some targets, for example the synthetic target, debugging does
not involve interacting with gdb stubs. gdb does not automatically
support thread-aware debugging on such targets.

Bart

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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