[rfa/doc/threads] thread breakpoints and system calls

Daniel Jacobowitz drow@mvista.com
Sun Oct 26 17:39:00 GMT 2003


On Sun, Oct 26, 2003 at 07:30:33PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 26 Oct 2003 09:59:25 -0500
> > From: Michael Elizabeth Chastain <mec@shout.net>
> > 
> > Looking for approval from a thread guy such as Daniel J for content,
> > and Eli Z for syntax.

Also approved - pretty good!

> Approved, with one gotcha: the GNU project standards discourage the
> use of ``illegal'' for anything other than actions that break the law.
> So I would rewrite the following sentence:
> 
> > + It is legal behavior for a system call to return early, so @value{GDBN}
> > + does not cause your program to behave illegally.
> 
> like this:
> 
>   It is perfectly okay for a system call to return early, so @value{GDBN}
>   does not cause your problem to behave erratically.
> 
> I would also suggest to add that the early return is due to a signal
> (SIGTRAP, right?) caused by the breaking breakpoint.  This will help
> programmers who know that a system call can return early due to a
> signal to understand better what's going on.

Well, it's actually due to a SIGSTOP sent by GDB to the thread.  The
thread never receives the SIGSTOP (GDB cancels it later) but it causes
the system call to exit early.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list