~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOSCLIInfoThreads.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
7
 
 *
8
 
 * Contributors:
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;
13
 
 
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;
19
 
 
20
 
class MacOSCLIInfoThreads extends CLIInfoThreads {
21
 
        public MacOSCLIInfoThreads() {
22
 
                super();
23
 
                // with apple-gdb, we use -thread-list-ids as a replacement for info
24
 
                // threads
25
 
                setOperation("-thread-list-ids"); //$NON-NLS-1$
26
 
        }
27
 
 
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$
32
 
        }
33
 
 
34
 
        public MIInfo getMIInfo() throws MIException {
35
 
                MIInfo info = null;
36
 
                MIOutput out = getMIOutput();
37
 
                if (out != null) {
38
 
                        info = new MacOsCLIInfoThreadsInfo(out);
39
 
                        if (info.isError()) {
40
 
                                throwMIException(info, out);
41
 
                        }
42
 
                }
43
 
                return info;
44
 
        }
45
 
 
46
 
        public CLIInfoThreadsInfo getMIInfoThreadsInfo() throws MIException {
47
 
                return (CLIInfoThreadsInfo) getMIInfo();
48
 
        }
49
 
 
50
 
}