mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 388338 - [breakpoints] event breakpoints broken for DSF
This commit is contained in:
parent
b5f0251622
commit
3eed310ca2
5 changed files with 56 additions and 3 deletions
|
@ -21,12 +21,14 @@ import java.util.List;
|
|||
import org.eclipse.cdt.debug.core.breakpointactions.BreakpointActionManager;
|
||||
import org.eclipse.cdt.debug.core.command.CCommandAdapterFactory;
|
||||
import org.eclipse.cdt.debug.core.disassembly.IDisassemblyContextService;
|
||||
import org.eclipse.cdt.debug.core.model.ICDebugElement;
|
||||
import org.eclipse.cdt.debug.core.model.IRestart;
|
||||
import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer;
|
||||
import org.eclipse.cdt.debug.core.sourcelookup.CProjectSourceContainer;
|
||||
import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
|
||||
import org.eclipse.cdt.debug.core.sourcelookup.ProgramRelativePathSourceContainer;
|
||||
import org.eclipse.cdt.debug.internal.core.DebugConfiguration;
|
||||
import org.eclipse.cdt.debug.internal.core.DebugModelProvider;
|
||||
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
|
||||
import org.eclipse.cdt.debug.internal.core.ListenerList;
|
||||
import org.eclipse.cdt.debug.internal.core.SessionManager;
|
||||
|
@ -348,6 +350,8 @@ public class CDebugCorePlugin extends Plugin {
|
|||
createDisassemblyContextService();
|
||||
setSessionManager(new SessionManager());
|
||||
setDefaultLaunchDelegates();
|
||||
|
||||
Platform.getAdapterManager().registerAdapters(new DebugModelProvider(), ICDebugElement.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.core;
|
||||
|
||||
import org.eclipse.cdt.debug.core.CDIDebugModel;
|
||||
import org.eclipse.cdt.debug.core.model.ICDebugElement;
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.debug.core.model.IDebugModelProvider;
|
||||
|
||||
/**
|
||||
* Debug model provider returns additional model ID to use with
|
||||
* GDB event breakpoints.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class DebugModelProvider implements IDebugModelProvider, IAdapterFactory {
|
||||
|
||||
private final static Class[] ADAPTER_LIST = new Class[] { IDebugModelProvider.class };
|
||||
private final static String GDB_MODEL_ID = "org.eclipse.cdt.gdb"; //$NON-NLS-1$
|
||||
private final static String[] MODEL_IDS = new String[] { CDIDebugModel.getPluginIdentifier(), GDB_MODEL_ID };
|
||||
|
||||
@Override
|
||||
public String[] getModelIdentifiers() {
|
||||
return MODEL_IDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getAdapter(Object adaptableObject, Class adapterType) {
|
||||
if ( adaptableObject instanceof ICDebugElement && IDebugModelProvider.class.equals(adapterType) ) {
|
||||
return this;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class[] getAdapterList() {
|
||||
return ADAPTER_LIST;
|
||||
}
|
||||
|
||||
}
|
|
@ -6,7 +6,9 @@ Bundle-Version: 7.0.0.qualifier
|
|||
Bundle-Activator: org.eclipse.cdt.gdb.ui.internal.Activator
|
||||
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0",
|
||||
org.eclipse.ui;bundle-version="3.6.0",
|
||||
org.eclipse.cdt.debug.ui;bundle-version="7.0.0"
|
||||
org.eclipse.cdt.debug.ui;bundle-version="7.0.0",
|
||||
org.eclipse.debug.core;bundle-version="3.8.0",
|
||||
org.eclipse.cdt.debug.core;bundle-version="7.3.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-Vendor: %providerName
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plugin>
|
||||
<extension point="org.eclipse.cdt.debug.ui.breakpointContribution">
|
||||
<breakpointLabels
|
||||
debugModelId="org.eclipse.cdt.debug.core"
|
||||
debugModelId="org.eclipse.cdt.gdb"
|
||||
markerType="org.eclipse.cdt.debug.core.cEventBreakpointMarker">
|
||||
<attribute name="org.eclipse.cdt.debug.core.eventbreakpoint_event_id" label="%catchType.label" type="string">
|
||||
<value
|
||||
|
|
|
@ -204,7 +204,7 @@ public class GdbAdapterFactory
|
|||
// @see org.eclipse.debug.core.model.IDebugModelProvider#getModelIdentifiers()
|
||||
@Override
|
||||
public String[] getModelIdentifiers() {
|
||||
return new String[] { GdbLaunchDelegate.GDB_DEBUG_MODEL_ID, ICBreakpoint.C_BREAKPOINTS_DEBUG_MODEL_ID };
|
||||
return new String[] { GdbLaunchDelegate.GDB_DEBUG_MODEL_ID, ICBreakpoint.C_BREAKPOINTS_DEBUG_MODEL_ID, "org.eclipse.cdt.gdb" }; //$NON-NLS-1$
|
||||
}
|
||||
};
|
||||
session.registerModelAdapter(IDebugModelProvider.class, fDebugModelProvider);
|
||||
|
|
Loading…
Add table
Reference in a new issue