Bug 335325 - [multi-process][sourcelookup] Make the container (process) the sourcelookup context
Summary: [multi-process][sourcelookup] Make the container (process) the sourcelookup c...
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-01-25 10:08 EST by Marc Khouzam CLA
Modified: 2020-09-04 15:21 EDT (History)
5 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-01-25 10:08:51 EST
To properly support multi-process, I believe the source lookup must be handled per individual process. Therefore, the ISourceLookupDMContext must be a container (process) instead of being the commandControl (GDBControlDMContext).

This is a pretty drastic change that may impact extenders of DSF-GDB.
Comment 1 Pawel Piech CLA 2011-01-27 12:29:03 EST
More importantly, the source lookup data is serialized into the launch configuration.  So to allow different source lookup per process, we need to also extend source lookup UI and launch configurations.
Comment 2 Doug Schaefer CLA 2011-01-27 12:56:15 EST
Ouch. Good point. That does lead me to wonder whether supporting multiple processes with the same launch is the right thing to do with the Eclipse platform we have.

My initial thought has been to leave the concept of Processes to the Target Management domain and then attach to processes from there, creating separate launches for each attach.

But then you would have to deal with the shared gdb instances and MI connections between launches but if it simplifies the user experience, then it might be worth it.
Comment 3 Marc Khouzam CLA 2011-01-27 13:38:25 EST
Adding Ken who has gone through this already.
Comment 4 Ken Ryall CLA 2011-01-31 14:12:02 EST
EDC handles this by having the EDCLaunch represent a device or PC being debugged. So all of the launch configurations that target that device are contained in one EDCLaunch.

This means that several launch configurations can be associated with one EDC launch (the last one launched is returned in EDCLaunch.getLaunchConfiguration). All affiliated launch configurations are used for source lookup.

This solution is anything but air-tight, but does handle the vast bunk of use cases and provides a much better user experience within the confines of the existing debug platform design. Ideally source lookup settings could be specified per executable and managed in a central place independent of launch configurations.