|
Added
Link Here
|
| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2008 Ericsson and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
| 8 |
* Contributors: |
| 9 |
* Ericsson - initial API and implementation |
| 10 |
* Marc-Andre Laperle - fix for bug 269838 |
| 11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.cdt.dsf.gdb.service.macos; |
| 13 |
|
| 14 |
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent; |
| 15 |
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService; |
| 16 |
import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; |
| 17 |
import org.eclipse.cdt.dsf.gdb.service.GDBProcesses; |
| 18 |
import org.eclipse.cdt.dsf.gdb.service.command.GDBControl; |
| 19 |
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; |
| 20 |
import org.eclipse.cdt.dsf.service.DsfServicesTracker; |
| 21 |
import org.eclipse.cdt.dsf.service.DsfSession; |
| 22 |
|
| 23 |
public class MacOSGDBProcesses extends GDBProcesses { |
| 24 |
|
| 25 |
private GDBControl commandControl; |
| 26 |
|
| 27 |
public MacOSGDBProcesses(DsfSession session) { |
| 28 |
super(session); |
| 29 |
DsfServicesTracker serviceTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), session.getId()); |
| 30 |
commandControl = (GDBControl)serviceTracker.getService(ICommandControlService.class); |
| 31 |
session.addServiceEventListener(this, null); |
| 32 |
} |
| 33 |
|
| 34 |
@Override |
| 35 |
@DsfServiceEventHandler |
| 36 |
public void eventDispatched(ISuspendedDMEvent e) { |
| 37 |
// With Apple-gdb, we flush the command cache because we need |
| 38 |
// new results from -thread-list-ids |
| 39 |
flushCache(commandControl.getInferiorProcess().getExecutionContext()); |
| 40 |
super.eventDispatched(e); |
| 41 |
} |
| 42 |
|
| 43 |
} |