[PATCH] [DOC] Mention what happens when the thread of a thread-specific breakpoint is gone.

Pedro Alves palves@redhat.com
Fri Oct 4 18:26:00 GMT 2013


On 10/04/2013 06:59 PM, Pedro Alves wrote:
> On 10/04/2013 06:54 PM, Pedro Alves wrote:
>> That was on purpose.  It's what GDB says too.  That's because
>> there are other ways for a thread to disappear other than
>> a regular thread exit, such as "detach", "disconnect"
>> or gdb losing the remote connection, etc.  The thread hasn't
>> really exited in those cases.
> 
> I guess that means I should update the docs to clarify that.  :-)
> A sec while I prepare a new patch.

What about this?  I'm now saying "no longer in the thread list"
instead of "is gone".

Not sure whether GDB's own wording should be changed in the
same way?  This is 78 columns:

-Thread-specific breakpoint 3 deleted - thread 28 is gone.
+Thread-specific breakpoint 3 deleted - thread 28 no longer in the thread list.

It'll of course be larger with higher breakpoint and thread numbers, but
I guess it is still within reasonable bounds...

-----
[DOC] Mention what happens when the thread of a thread-specific breakpoint is gone.

We recently made GDB auto-delete thread-specific breakpoints when the
corresponding thread is gone, but we haven't mentioned it in the manual.

gdb/
2013-10-04  Pedro Alves  <palves@redhat.com>

	PR breakpoints/11568
	* gdb.texinfo (Thread-Specific Breakpoints): Mention what happens
	when the thread is gone.
---

 gdb/doc/gdb.texinfo |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index a68556b..207a93e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -5864,6 +5864,24 @@ after the breakpoint condition, like this:
 
 @end table
 
+Thread-specific breakpoints are automatically deleted when
+@value{GDBN} detects the corresponding thread is no longer in the
+thread list.  For example:
+
+@smallexample
+(@value{GDBP}) c
+Thread-specific breakpoint 3 deleted - thread 28 is gone.
+@end smallexample
+
+There are several ways for a thread to disappear, such as a regular
+thread exit, but also when you detach from the process with the
+@code{detach} command (@pxref{Attach, ,Debugging an Already-running
+Process}), or if @value{GDBN} loses the remote connection
+(@pxref{Remote Debugging}), etc.  Note that with some targets,
+@value{GDBN} is only able to detect a thread has exited when the user
+explictly asks for the thread list with the @code{info threads}
+command.
+
 @node Interrupted System Calls
 @subsection Interrupted System Calls 
 



More information about the Gdb-patches mailing list