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

Bug 351978

Summary: [remote][breakpoints] Cannot insert breakpoints when using a remote C/C++ project
Product: [Tools] CDT Reporter: Jim Page <jim.page>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle, pawel.1.piech, Rondom, swanj
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jim Page CLA 2011-07-13 10:22:34 EDT
Build Identifier: I20110613-1736

I am using eclipse indigo on Windows 7 (64) to build a moderately complex C++ app on a linux (centos 5.3/64) host with 2GB RAM (nearly all available). I am using a 'Remote C/C++ Project', using 'Remote Tools' as a provider, and 'C/C++ Remote Application' as target debug configuration.

The problem: when debugging I am unable to set a working breakpoint on source code that I haven't stepped into. 

In more detail - I can open a source file from the project (from the project explorer view). I can switch between the types of breakpoint in the source file context menu, and I choose 'C/C++ breakpoint' (as opposed to PTP breakpoint). I then try to insert a breakpoint by either the 'toggle breakpoint' submenu entry or double clicking in the margin, but it fails silently. 

If (for example when breaking at main()) the debugger opens the source file, I can successfully set breakpoints in that tab.

In the eclipse editor UI, the difference between a file that works and a file that doesn't is that when you hover over the tab you see paths like this:

- working: c:\users\jim\work\trunk\rmnotifier\application\src\main.cpp
- not working: /rmnotifier/application/src/main.cpp

I added a debugger source path mapping: /mnt/work/trunk/rmnotifier/ => c:\users\jim\work\trunk\rmnotifier

Note: I have set the debugger executable as: 'plink <host> gdb', running gdb on the remote host as opposed to the local host.

There is no workaround that I can see apart from stepping via the debugger into the file you want to debug, then setting the breakpoint. Obviously this isn't always possible.

CDT: 8.0.0.201106081058
PTP: 5.0.1.201106271824

Reproducible: Always

Steps to Reproduce:
1. Create a 'Remote C/C++ project' in a windows instance of eclipse, referencing a C++ project on a linux host (not sure if this combination is the problem, that's how my system is set up).
2. Open a source file from the project explorer.
3. Attempt to create a 'C/C++ Breakpoint' in the source viewer - it will fail.
Comment 1 Marc-André Laperle CLA 2012-11-10 17:38:30 EST
*** Bug 393916 has been marked as a duplicate of this bug. ***
Comment 2 Marc-André Laperle CLA 2012-11-10 17:38:57 EST
Bug 393916 has a call stack.