* about lin-lwp.c @ 2002-08-11 8:55 Zheng Jian-Ming 2002-08-11 9:09 ` Zheng Jian-Ming 2002-08-12 7:59 ` Kevin Buettner 0 siblings, 2 replies; 4+ messages in thread From: Zheng Jian-Ming @ 2002-08-11 8:55 UTC (permalink / raw) To: gdb Hi, I see this function "lin_lwp_resume()" in gdb/lin-lwp.c, but don't know what "gdb_assert(signo == TARGET_SIGNAL_0)" to do. Does statement "iterate_over_lwps(resume_callback, NULL)" cause all threads to resume? -- Best Regards, Zheng Jian-Ming a.k.a. zjm e-mail: zjm@cis.nctu.edu.tw ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: about lin-lwp.c 2002-08-11 8:55 about lin-lwp.c Zheng Jian-Ming @ 2002-08-11 9:09 ` Zheng Jian-Ming 2002-08-12 8:29 ` Kevin Buettner 2002-08-12 7:59 ` Kevin Buettner 1 sibling, 1 reply; 4+ messages in thread From: Zheng Jian-Ming @ 2002-08-11 9:09 UTC (permalink / raw) To: gdb Hi, Alos in gdb/lin-lwp.c, does "multi-threads" for GNU/Linux mean multile LWPs (lightweight process ids), one PID (process id)? I don't need to handle the TIDs (thread ids), do I? -- Best Regards, Zheng Jian-Ming a.k.a. zjm e-mail: zjm@cis.nctu.edu.tw ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: about lin-lwp.c 2002-08-11 9:09 ` Zheng Jian-Ming @ 2002-08-12 8:29 ` Kevin Buettner 0 siblings, 0 replies; 4+ messages in thread From: Kevin Buettner @ 2002-08-12 8:29 UTC (permalink / raw) To: Zheng Jian-Ming, gdb > Alos in gdb/lin-lwp.c, does "multi-threads" for GNU/Linux mean > multile LWPs (lightweight process ids), one PID (process id)? I don't understand the question well enough to give a yes or no answer. lin-lwp.c concerns itself with LWPs. On GNU/Linux, an LWP is just a process that shares its address space other LWPs. If you obtain a list of processes via the ``ps'' command, you'll see LWPs in addition to pure processes (which don't share their address space). When GDB wants to start, stop, or interrogate an LWP it does so via the very same facilities that are used for processes. At the moment, on GNU/Linux, there is a one-to-one mapping between threads and lwps. There is a library, libthread_db.so, which is used by GDB's thread-db.c to obtain the mapping from lwps to threads and vice versa. If you want to understand GDB's GNU/Linux thread support, you must look at lin-lwp.c, thread-db.c, and proc-service.c. (There are some other more generic files that you'll need to look at too.) There is a comment near the top of lin-lwp.c which suggests that lin-lwp.c can supply support for multi-threaded applications that don't have the support of a threads library. To best of my knowledge, this is not the case. (The comment in question may have been true at one time, or it may simply express the hopes of the author in this regard.) > I don't need to handle the TIDs (thread ids), do I? I don't know. What are you trying to do? Kevin ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: about lin-lwp.c 2002-08-11 8:55 about lin-lwp.c Zheng Jian-Ming 2002-08-11 9:09 ` Zheng Jian-Ming @ 2002-08-12 7:59 ` Kevin Buettner 1 sibling, 0 replies; 4+ messages in thread From: Kevin Buettner @ 2002-08-12 7:59 UTC (permalink / raw) To: Zheng Jian-Ming, gdb On Aug 11, 11:52pm, Zheng Jian-Ming wrote: > I see this function "lin_lwp_resume()" in gdb/lin-lwp.c, but don't > know what "gdb_assert(signo == TARGET_SIGNAL_0)" to do. gdb_assert() generates an internal error if the condition in question does NOT hold. So for the above, an internal error will be generated if !(signo == TARGET_SIGNAL_0). Please note the exact context of this assertion. I.e, we have a wait status already associated with the thread. You should also read the FIXME just prior to the assert. > Does statement "iterate_over_lwps(resume_callback, NULL)" cause all > threads to resume? Yes. (Well, technically, it causes all LWPs to resume.) Kevin ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-08-12 15:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-08-11 8:55 about lin-lwp.c Zheng Jian-Ming 2002-08-11 9:09 ` Zheng Jian-Ming 2002-08-12 8:29 ` Kevin Buettner 2002-08-12 7:59 ` Kevin Buettner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox