Bug 484909 - Two instances of DsfSourceLookupParticipant registered with DsfSourceLookupDirector
Summary: Two instances of DsfSourceLookupParticipant registered with DsfSourceLookupDi...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 9.0.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: 2015-12-26 09:22 EST by Jonah Graham CLA
Modified: 2020-09-04 15:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2015-12-26 09:22:46 EST
When launching a GDB sessions, two instances of DsfSourceLookupParticipant are created, one by the DsfSourceDisplayAdapter (which is part of the Adapter set) and one by DsfSourceLookupDirector (as part of initializeParticipants in DsfSourceLookupDirector, created during the launch delegate launching process).

When a source file is not found, or when search for duplicates is on, both the instances are queried for source files.  

In the PDA example, the PDASourceLookupDirector explicitly (with a comment) does not create a DsfSourceLookupParticipant. So in the PDA example there is not a duplicate.

Neither of these bits of code have been changed since migrating DSF and DSF-GDB to the CDT project. 

This has become a bug as part of the work for Bug 472765 because it is important in that case to use the specialized version of the source director and in that case the DsfSourceDisplayAdapter's creation is problematic.
Comment 1 Eclipse Genie CLA 2015-12-26 09:57:07 EST
New Gerrit change created: https://git.eclipse.org/r/63286
Comment 2 Jonah Graham CLA 2016-03-15 13:36:46 EDT
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/63286

This has been abandoned for now, but it would be nice to reconsider this in the future again. Perhaps when there is not so much churn, or perhaps a different version of the patch (e.g. add it in in DsfSourceDisplayAdapter unless there is already a participant in).
Comment 3 Marc Khouzam CLA 2016-03-15 14:16:16 EDT
(In reply to Jonah Graham from comment #2)
> (In reply to Eclipse Genie from comment #1)
> > New Gerrit change created: https://git.eclipse.org/r/63286
> 
> This has been abandoned for now, but it would be nice to reconsider this in
> the future again. Perhaps when there is not so much churn, or perhaps a
> different version of the patch (e.g. add it in in DsfSourceDisplayAdapter
> unless there is already a participant in).

Just to clarify why we abandoned this change for now.
I was worried that removing the default DsfSourceLookupParticipant could break existing DSF extenders.  I thought such a breakage would also be difficult to chase down.  As Jonah confirmed that there is no issue besides inefficiency in having two participants, I recommended be more careful approach.  Note that we've had more than one such participants from the very start (apparently we had 3 of them).