Bug 497592 - IProcesses.getExecutionData() does not wait for the request to GDB for the inferior name to be completed
Summary: IProcesses.getExecutionData() does not wait for the request to GDB for the in...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.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: 2016-07-08 17:57 EDT by Marc Khouzam CLA
Modified: 2020-09-04 15:22 EDT (History)
4 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 2016-07-08 17:57:06 EDT
While working on the GDB console feature (bug 303808), I used IProcesses.getExecutionData() to get the name of the process to use for the inferior's console label.

However, the call to IProcesses.getExecutionData() was done before the name was finished being fetched from GDB and the call returned a default name instead.

The problem is that in GDBProcesses_7_0, we fetch the inferior name from GDB when getting =thread-group-started, but if a call to IProcesses.getExecutionData() arrives before the name is received back, IProcesses.getExecutionData() will return a default value.

What we want instead is that the asynchronous request to IProcesses.getExecutionData() wait until the name is received back.

It was probably a mistake to fetch the name when getting =thread-group-started as it didn't follow the usual DSF pattern.  Instead, such a request should be done in the service API that requests it, namely IProcesses.getExecutionData().  So, I suggest we move the name-fetching logic to the implementation of GDBProcesses_7_0.getExecutionData().
Comment 1 Eclipse Genie CLA 2016-07-10 15:20:36 EDT
New Gerrit change created: https://git.eclipse.org/r/76996