1
/*******************************************************************************
2
* Copyright (c) 2000, 2010 QNX Software Systems 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
9
* QNX Software Systems - Initial API and implementation
10
* Marc-Andre Laperle - use -thread-list-ids for mac, fix for bug 294538
11
*******************************************************************************/
12
package org.eclipse.cdt.debug.mi.core.command.factories.macos;
14
import org.eclipse.cdt.debug.mi.core.MIException;
15
import org.eclipse.cdt.debug.mi.core.command.CLIInfoThreads;
16
import org.eclipse.cdt.debug.mi.core.output.CLIInfoThreadsInfo;
17
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
18
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
20
class MacOSCLIInfoThreads extends CLIInfoThreads {
21
public MacOSCLIInfoThreads() {
23
// with apple-gdb, we use -thread-list-ids as a replacement for info
25
setOperation("-thread-list-ids"); //$NON-NLS-1$
28
// MI doesn't work with a space between the token and the
29
// operation, so we override CLICommmand's toString
30
public String toString() {
31
return getToken() + getOperation() + "\n"; //$NON-NLS-1$
34
public MIInfo getMIInfo() throws MIException {
36
MIOutput out = getMIOutput();
38
info = new MacOsCLIInfoThreadsInfo(out);
40
throwMIException(info, out);
46
public CLIInfoThreadsInfo getMIInfoThreadsInfo() throws MIException {
47
return (CLIInfoThreadsInfo) getMIInfo();