This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFA] Add comments to linux-nat.c


> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 14 Jun 2008 18:29:05 +0400
> 
> 
> With the introduction of async mode, linux-nat.c became even more complex that it
> was, and it became apparent that some high-level comments are needed. So, I've grabbed
> Pedro and Dan on IRC and extracted the knowledge from their heads into a text file.
> Here's the result. OK?

Thanks.  I don't know anything about the subject matter, but I spotted
a few typos in the text:

> +threads. (2.4 has the __WALL flag).  So, it we use blocking waitpid, we might
                                            ^^
"if"

> +sigsuspend.  First, we use non-blocking waitpid to get if there's event

"to get if there's event" is not quite right, you probably wanted to
say "to find out if there's event".

> +in main debugged process and in cloned processes.  child processes.  As soon
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Something's wrong here.

> +The main design point is that every time GDB is outside linux-nat.c, we have a
> +SIGCLD handler installed that is called when something happens to the target
   ^^^^^^
SIGCLD or SIGCHLD?

> +Those waitpid calls, while blocking, are guarantied to always always have
                                                          ^^^^^^^^^^^^^
"always" twice.

> +of the pipe amoung the sources. When event loop starts to process the event
               ^^^^^^
"among"

> +us. Technically, it would be possible to add new events to the local queue but
> +it's about the same amount of work than blocking SIGCHLD.
                                      ^^^^^^^^^^^^^^^^^^^^^
"as blocking SIGCHLD"

> +enter/leave linux-nat.c is somewhat ugly. Unfortunately, GDB event loop is
> +home-grown is incapable to wait on any queue.

Something's wrong in "is home-grown is incapable".

> +tkill'd.  But we never let the SIGSTOP deliver; we always intercept and cancel
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"never let SIGSTOP be delivered".


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