Bug 349991 - [breakpoints] Error marker not shown in editor if file is not in the workspace
Summary: [breakpoints] Error marker not shown in editor if file is not in the workspace
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 16:29 EDT by Marc Khouzam CLA
Modified: 2020-09-04 15:24 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-06-21 16:29:17 EDT
When a breakpoint cannot be installed we show an error marker in the editor.

I have noticed that if the editor is for a file that is not in the workspace, the error marker is being set but is not shown in the editor.

Maybe this is a platform bug?

The easiest way to try this is with CDI because DSf-GDB uses pending breakpoints so it is not as obvious to make a breakpoint fail.
1- start a CDI debug session
2- set a breakpoint in a project that is not being debugged and see the error marker in the margin of the editor
3- in Eclipse, open a file on the file system, but not one that is in a project
4- set a breakpoint on that file.  GDB will retturn an error, but the error marker is not shown.

I noticed this problem why setting a fast tracepoint on a location that was too small.  I also had FAST_ONLY setting, so we didn't try to set a slow tracepoint upon the failure.  GDB returned an ^error but I didn't see the error marker which would tell the user that the installation failed.
Comment 1 Anton Leherbauer CLA 2011-06-27 07:48:43 EDT
A marker on an external resource must have the attribute org.eclipse.cdt.core.model.ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION set to the path of the file, otherwise it will not be displayed by the C/C++ Editor.  I did not take a closer look, but this might be the reason why the marker is not visible.
Comment 2 Marc Khouzam CLA 2011-06-27 23:09:56 EDT
(In reply to comment #1)
> A marker on an external resource must have the attribute
> org.eclipse.cdt.core.model.ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION set
> to the path of the file, otherwise it will not be displayed by the C/C++
> Editor.  I did not take a closer look, but this might be the reason why the
> marker is not visible.

Thanks a lot Toni!  I'll give it a try.