Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350075 - [remote][threads] Interrupting an exited thread gives not feedback
Summary: [remote][threads] Interrupting an exited thread gives not feedback
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 12:07 EDT by Marc Khouzam CLA
Modified: 2020-09-04 15:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-06-22 12:07:40 EDT
Bug 280631 showed us that thread started/exited events are not being sent automatically from GDB when dealing with a remote target.  This is true for gdbserver also, and on Linux.

We forcibly refresh the list of threads on every Suspend event, if that option is selected by the user.  However, it is still possible to try to interrupt a thread that has in fact exited, except we were never told about it because we haven't gotten any suspend event yet.

To reproduce:
1- have a program with two threads where the second on exits after a little while
2- debug the program using a remote launch (select the option "force thread update")
3- set a breakpoint on the first thread, after it has created the second thread
4- run the program let it run to the breakpoint
5- because the breakpoint causes a suspend event, we refresh the thread list and we see the second thread.
6- wait the time necessary for that second thread to exit (you will not see anything in Eclipse or GDB)
7- select that second thread and interrupt it (although it is actually gone).
=> nothing will happen, and GDB will not complain.

My first thought is that we should automatically refresh the thread list when we use the interrupt command.