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

Bug 313372

Summary: [event] Thread created event with wrong id after restart
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: john.cortell, pawel.1.piech
Version: 7.0Flags: john.cortell: review+
Target Milestone: 7.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 339456    
Attachments:
Description Flags
Fix marc.khouzam: iplog-

Description Marc Khouzam CLA 2010-05-18 10:55:13 EDT

    
Comment 1 Marc Khouzam CLA 2010-05-18 10:57:56 EDT
For GDB < 7.0, we use the class CLIEventProcessor which triggers the ThreadCreate event based on CLI printouts.  The threadId used is a simple counter starting from 0 (fLastThreadId).

When we restart the application, this threadId should be reset to 0.
Comment 2 Marc Khouzam CLA 2010-05-18 11:25:50 EDT
Created attachment 168951 [details]
Fix

Simple solution that avoids new APIs.

Committed to HEAD.
Comment 3 Marc Khouzam CLA 2010-05-18 11:26:15 EDT
John, can you review?
Comment 4 CDT Genie CLA 2010-07-28 15:28:06 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 313372: Re-create the CLIEventProcessor when we restart the program, so as to reset the internal threadId count.

[*] GDBControl.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java?root=Tools_Project&r1=1.14&r2=1.15