Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313372 - [event] Thread created event with wrong id after restart
Summary: [event] Thread created event with wrong id after restart
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 339456
  Show dependency tree
 
Reported: 2010-05-18 10:55 EDT by Marc Khouzam CLA
Modified: 2011-03-09 21:29 EST (History)
2 users (show)

See Also:
john.cortell: review+


Attachments
Fix (1.76 KB, patch)
2010-05-18 11:25 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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