| Summary: | Debugger configured error in ADT | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Yocto Project Subprojects] Eclipse Plugin | Reporter: | Tong Lin <tong.lin> | ||||
| Component: | eclipse-plugin | Assignee: | Lianhao Lu <lianhao.lu> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium | CC: | jessica.zhang, poky.adt.watcher, poky.watcher, yp.ep.watcher, yp.watcher | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 1.1 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | Patch created and being tested | ||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | --- | |||||
| Attachments: |
|
||||||
can't reproduce this bug on my machine. which steps to reproduce this? (In reply to comment #1) > can't reproduce this bug on my machine. which steps to reproduce this? How many projects in your eclipse? I try once more, but the bug really exists when the project's number more than 2. This bug seems happening randomly. Here is a relatively easy way to reproduce it: Repeated create new yocto C helloworld projects using the default settings configured in "Windows->Preference->Yocto ADT" without any interruption(i.e. no debug breakpoint). After you've successfully created more than 2 projects, go back to check the debug configurations for those created projects, and you would find some debug configurations are not correctly set for items "GDB debugger" and "GDB command file". In the .launch file for the wrongly configured project, you could find that the attribute "org.eclipse.cdt.debug.mi.core.DEBUG_NAME" was corrected set, but the attribute "org.eclipse.cdt.dsf.gdb.DEBUG_NAME" is not. Need more investigation to find why. It seems quite tricky. If I just created the projects, without clicking "Run->Debug Configurations..." to view the debug configurations created for the projects, then I searched the .launch file stored in each project's root directory which is used to store the attributes' values for the debug configuration. At this point, all the attributes are correct in the .launch file. Then I clicked "Run->Debug Configurations..." to view the debug configurations. The first debug configuration I clicked always had the correct values, but some of the other configurations might show incorrect values. After this point, I rechecked the .launch files, the incorrect values had been populated to the corresponding .launch files. I also tried to dump the in-memory attributes' values of the debug configurations, before and after I clicked "Run->Debug Configurations..." to view the debug configurations' detailed attributes, it also turned out that some debug configuration's in-memory attribute values were changed. Need to dig deep to see what's wrong when "Run->Debug Configurations..." got clicked. This is because org.eclipse.cdt.launch.remote.tabs.RemoteCDebuggerTab.setDefaults() gets called by initializeForm() when the Eclipse tries to draw the LaunchConfigurationDiaglogue to display the configuration settings. The setDefaults() will override the attributes "xxx.DEBUG_NAME" and "xxx.GDB_INIT" we set during the new project creation time. The only exception is that the very first configuration the user clicked, because at that time the AbstractCDebuggerTab.fDynamicTab is not set so Eclipse doesn't call the dynamicTab's setDefaults() to set the default value. Patch created at http://git.yoctoproject.org/cgit.cgi/eclipse-poky/commit/?h=llu/bug1397&id=abb5ce7df9c16c6c3644b13fdbe1ad2e127ce2ad. Need more test before merge into master. |
Created attachment 211 [details] screenshot When I create the 3rd project, the GDB Debugger and GDB command text field in Debugger tab are configured error by default. But it configured well when the projects are less than 3 in Eclipse. Even click "project->Reconfigure project" menu, it can not be configured well.The screenshot is in the attachment.