1
/*******************************************************************************
2
* Copyright (c) 2000, 2006 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
*******************************************************************************/
11
package org.eclipse.cdt.debug.mi.core.output;
14
* GDB/MI whatis parsing.
16
public class CLIPTypeInfo extends MIInfo {
20
public CLIPTypeInfo(MIOutput out) {
25
public String getType() {
30
StringBuffer buffer = new StringBuffer();
32
MIOutput out = getMIOutput();
33
MIOOBRecord[] oobs = out.getMIOOBRecords();
34
for (int i = 0; i < oobs.length; i++) {
35
if (oobs[i] instanceof MIConsoleStreamOutput) {
36
MIStreamRecord cons = (MIStreamRecord) oobs[i];
37
String str = cons.getString();
38
// We are interested in the shared info
41
if (str.startsWith ("type")) { //$NON-NLS-1$
42
int equal = str.indexOf('=');
44
str = str.substring(equal + 1);
52
type = buffer.toString().trim();