| Summary: | Enable thread name display | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Norbert Plött <norbert.ploett> | ||||
| Component: | cdt-debug | Assignee: | cdt-debug-inbox <cdt-debug-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | cdtdoug | ||||
| Version: | 3.0 | ||||||
| Target Milestone: | 3.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 114793 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Norbert Plött
Created attachment 29693 [details]
Implements CLIInfoThreadsInfo
This patch supplies the code to properly implement
CLIInfoThreadsInfo.getThreadNames().
Note that the implemenation handles threads without names gracefully but does
extract the name for those threads which do have a thread name set.
Norbert, The patch looks good on the platforms I have access to, but it may break something else. The best solution for this problem is to provide an extension point to allow the contributions of command factories. By doing this we will solve the problems we have with the gdb backend specific commands like "info threads", "info shared", etc. So, you would be able to contribute your own plugin that contains a command factory (a simple extension of the existing one) and select Siemens gdb in the launch configuration. I am planning to propose this feature for the next release (3.1 or 3.2, whatever it is). So, my question is: do you need it to 3.0.2 or you can wait for 3.1(3.2)? Thanks Mikhail, I can go by distributing the patched plug-in for in-house use. Would have been nice to have it contributed but ... I can wait. So what will you do? Move the target milestone or something? (In reply to comment #3) > Thanks Mikhail, I can go by distributing the patched plug-in for in-house use. > Would have been nice to have it contributed but ... I can wait. > So what will you do? Move the target milestone or something? Currently I am working on the plan proposals which include the mentioned feature. If the feature is approved, I will create an enhancement request and mark this bug as dependent on the new request. [from Stefan Bylund] Hi Norbert, I was the one who added the support for optionally displaying thread names in the CDT debug view. This feature was added in the patch http://dev.eclipse.org/mhonarc/lists/cdt-patch/msg02506.html and described in the corresponding bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=69711. This patch was initiated by a discussion of this issue found here: http://dev.eclipse.org/mhonarc/lists/cdt-debug-dev/msg00462.html The conclusion was that there is no reliable way to retrieve thread names and other thread metadata from the output of the "info threads" command in a platform-independent manner. Instead, we choose to only provide the foundation for a third party to do this. Your patch seems to assume that thread names from the output of "info threads" are in the form "Name: <name>", which is not true on all platforms. Until there is an MI-version of the "info threads" command that reports thread metadata in a strict form, I think that we should leave parsing thread names to third party extensions using the foundation provided by the patch 69711. Regards, /Stefan > Your patch seems to assume that thread names from the output of "info
> threads" are in the form "Name: <name>", which is not true on all
> platforms.
Yes, my pragmatic rationale was
- Provide a solution that works on the platforms I know of
- Take care that things don't get worse for other platforms (I trust that my code will just nicely return the empty string for platforms which don't have the same pattern for encoding the name, it won't throw exceptions or do other nasty stuff)
and leave improvements for more platforms to others who need it.
As it is now I'll go by patching CDT until the extension point that Mikhail mentioned is in place, then I'll contribute my modified command factory.
Bug fixed through the solution made possible by 114793 (see comment #2) |