Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358438

Summary: -gdb-exit can be sent too early resulting in other commands which should be processed before arriving after
Product: [Tools] CDT Reporter: Daniel Thomas <daniel.thomas>
Component: cdt-debug-dsf-gdbAssignee: Project Inbox <cdt-debug-dsf-gdb-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch adding delayedQueueCommand to AbstractMIControl and using it in GDBControl* none

Description Daniel Thomas CLA 2011-09-21 11:00:35 EDT
Build Identifier: 

When -gdb-exit is sent by GDBControl(_7_0) in terminate(RequestMonitor) using createMiGDBExit it can arrive before other commands which should be sent first arrive. For example when the inferior has just exited and this is the reason why terminate is being called "-data-evaluate-expression $_exitcode" needs to be sent to check the exit code of the just terminated inferior but this can arrive after -gdb-exit and so not return correctly.
To fix this wait two executor dispatch cycles before sending the -gdb-exit.

I have a patch to do this.

Reproducible: Always
Comment 1 Daniel Thomas CLA 2011-09-21 11:01:50 EDT
Created attachment 203783 [details]
Patch adding delayedQueueCommand to AbstractMIControl and using it in GDBControl*