Bug 462482 - TCF Path Mapping bug
Summary: TCF Path Mapping bug
Status: NEW
Alias: None
Product: TCF
Classification: Tools
Component: Debug (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows 8
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 12:14 EDT by David Docteur CLA
Modified: 2015-04-13 10:59 EDT (History)
1 user (show)

See Also:


Attachments
Unresolved source line information (49.10 KB, image/png)
2015-03-18 12:14 EDT, David Docteur CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Docteur CLA 2015-03-18 12:14:01 EDT
Created attachment 251706 [details]
Unresolved source line information

Hi guys,

After further discussions with Christophe Augier, we have noticed a bug in the path mapping of the source directory. Here are more details about the configuration used:

Host OS : Windows 8.1
Agent OS : Same machine (local debug)
Eclipse Kepler SR2
TCF plugin 1.2

The following operations have been verified:
_ dbghelp.dll replaced in the Visual Studio 2013 folder (6.3 by 6.12)
_ the path in agent/system/Windows/tcf/windbgcache.c is correct

static wchar_t * pathes[] = {
    L"%\\Microsoft Visual Studio 12.0\\Common7\\IDE\\dbghelp.dll",
    L"%\\Microsoft Visual Studio 11.0\\Common7\\IDE\\dbghelp.dll",
    L"%\\Microsoft Visual Studio 10.0\\Common7\\IDE\\dbghelp.dll",
    L"%\\Microsoft Visual Studio 9.0\\Common7\\IDE\\dbghelp.dll",
    L"%\\Debugging Tools for Windows (x86)\\dbghelp.dll",
    L"%\\Debugging Tools for Windows\\dbghelp.dll",
    L".\\dbghelp.dll",
    L"dbghelp.dll",
    NULL
};


Debugging session:

In Eclipse, when I try to debug a simple HelloWorld C++ project, the toggled line breakpoints generate an error "unresolved source line information" and the debugger does not stop on them during a debug (only the step by step is possible). But it turns out that Function breakpoints can be added(planted) and the debugger stops on them without any problems.

Thanks to Christophe, we have noticed that we need to force Eclipse to ask us to locate the CPP file in moving it to another directory for it to be able to properly map the source directory, which means that there might be a bug in the source path mapping.

After moving the .cpp file to another directory, the debugger allows me to stop on each toggled breakpoint and the source file path is mapped in the "Source" tab in my TCF debug configuration.

I do not have this error in the following contexts:
Host + agent : Ubuntu 14.04 (local debug)
Host (Windows 8.1) + Agent (Ubuntu 14.04) (remote debug)
Comment 1 Eugene Tarassov CLA 2015-03-27 15:30:40 EDT
I cannot reproduce. Source line breakpoints work fine for me.
This bug report needs detailed "steps to reproduce" info.
Comment 2 David Docteur CLA 2015-04-13 10:59:56 EDT
Hi Eugene,

thank you very much for your answer. Okay, I have tried again on a clean version of our Eclipse version and I still get the same issue “Failed to plant: unresolved source line information” on the breakpoints.

Here are the steps that I have followed: (same machine)

Host OS: Windows 8.1
Agent OS: Same machine (local debug)
Eclipse Kepler SR2
TCF plugin 1.2


I)	Installation
_ installed CDT (8.3.0)
_ installed Visual C/C++ Support (new eclipse software)
_ installed TCF 1.2

II)	Building
_ Agent built with MSVC 2013 (x64 Release) and running …
   (I have added two lines to windbgcache.c as per my previous message).
_ I updated the DBGHELP.dll to 6.12 instead of 6.3.
_ Created new hello world C++ project (configured lib and includes as well)

III)	Debug Configuration with TCF

Project Explorer -> Project -> Right click -> Debug As -> Debug configurations …

_ Target tab
-	Checked “run instance of TCF agent on the local host”
-	Checked “use local host as the target”
       _ Application tab
-	Local file path -> search -> select my project
-	Unchecked “Disconnect when last debug context exits”
      _ Source tab
-	Removed the “Default” project from the list
-	Add -> Project -> select my project
-	Apply -> Debug

Behavior:

If I set two breakpoints in my “hello word” program, the debug session does not stop at each of them using the “Resume” button. It just stops at main() and exits.

Moreover, I have noticed that when I start debugging, I need to go manually to the Eclipse Debug view, which I don’t for the Local GNU/Linux and Remote Windows configurations. Eclipse doesn’t ask me to change to the Debug view as usually. The automatic view switching is, of course, activated in the Eclipse settings.

However, I can see the line numbers above each asm instruction using the “Step Over” functionality.


I can give you more details if you need them. Maybe I have forgotten something at some point?
The same configuration is done within GNU/Linux Ubuntu 14.04 and it works well. Same for a remote debug configuration using a Windows 8.1 client and a GNU/Linux agent running.

Thank you very much for your help.

David Docteur