Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Breakpoints in a custom editor that extends CEditor

Hi Sadik,

Is your GDB session running, IIRC error messages like that that error message will come from GDB - so to diagnose why it is happening I would turn on MI trace in Preferences -> C/C++ -> Debug -> GDB -> Show the GDB traces consoles, and then examine the MI trace to identify what is different. 

If not from GDB session, then I am not sure what is wrong. But eventually you want to end up at org.eclipse.cdt.debug.core.CDIDebugModel.createLineBreakpoint(String, IResource, int, int, boolean, int, String, boolean) (or similar method) to actually create a breakpoint.  

You probably want to enable breakpoint target factories like the CEditor does, here is an example of enabling breakpoints for the disassembly (from org.eclipse.cdt.dsf.ui/plugin.xml):


   <extension point="org.eclipse.debug.ui.toggleBreakpointsTargetFactories">
      <toggleTargetFactory
            id="org.eclipse.cdt.dsf.ui.ToggleBreakpointsTargetFactory"
            class="org.eclipse.cdt.dsf.debug.internal.ui.ToggleBreakpointsTargetFactory">
          <enablement>
            <!-- Enable the breakpoint toggle for DSF Disassembly -->
             <test
                   property="org.eclipse.cdt.dsf.debug.ui.isDisassemblyViewSupportsCBreakpoint">
             </test>
         </enablement>
      </toggleTargetFactory>
   </extension>

HTH,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Fri, 23 Apr 2021 at 08:58, Sadik Özoguz via cdt-dev <cdt-dev@xxxxxxxxxxx> wrote:
Hello everyone,

I have a custom editor in my eclipse plugin that extends CDT's CEditor.
When I open a file with the CEditor, I can set breakpoints. However,
when I try to set breakpoints in my editor, I get the generic message
that says something like "The operation is not permitted". Nothing you
can google for. Does anyone here have a quick guess what I'm missing or
where I can get more information on how to enable breakpoints? The
breakpoints don't have to function as breakpoints for now, I just want
to see them in the editor and in the breakpoints view.

best regards

Sadik

--
M.Sc. Sadik Özoguz                      phone  +49 421 57204286
Verified Systems International GmbH       fax  +49-421-5720422
Am Fallturm 1 (Eingang E, 3.OG)         email  soezoguz@xxxxxxxxxxx
28359 Bremen, Germany                     www  https://www.verified.de
--------------------------------------------------------------------
Verified Systems International GmbH
Geschäftsführung: Dr. Cornelia Zahlten, Dr. Jörg Brauer, Dr. Oliver Meyer
HR B 18341 Amtsgericht Bremen

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top