blob: 9cdab44387729c60cd122f2483c253e8034d229f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*******************************************************************************
* Copyright (c) 2007 Nokia 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:
* Nokia - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.debug.core.breakpointactions;
import java.util.List;
import org.eclipse.cdt.debug.internal.core.model.CStackFrame;
import org.eclipse.cdt.debug.internal.core.model.CThread;
public class LogActionEnabler implements ILogActionEnabler {
private CThread thread;
public LogActionEnabler(CThread thread) {
this.thread = thread;
}
@Override
public String evaluateExpression(String expression) throws Exception {
List frames = thread.computeStackFrames();
CStackFrame frame = (CStackFrame) frames.get(0);
return frame.evaluateExpressionToString(expression);
}
}
|