1
/*******************************************************************************
2
* Copyright (c) 2008, 2009 Wind River 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
* Wind River Systems - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.examples.dsf.pda.service.commands;
13
import java.util.ArrayList;
14
import java.util.List;
15
import java.util.StringTokenizer;
17
import org.eclipse.cdt.dsf.concurrent.Immutable;
21
* @see PDARegistersCommand
24
public class PDARegistersCommandResult extends PDACommandResult {
27
* Array of registers returned by the registers commands.
29
final public PDARegister[] fRegisters;
31
PDARegistersCommandResult(String response) {
33
StringTokenizer st = new StringTokenizer(response, "#");
34
List<PDARegister> regList = new ArrayList<PDARegister>();
36
while (st.hasMoreTokens()) {
37
regList.add(new PDARegister(st.nextToken()));
39
fRegisters = regList.toArray(new PDARegister[regList.size()]);