1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 250803 - org.eclipse.cdt.utils.NM.init() method is buggy

This commit is contained in:
Anton Leherbauer 2009-02-09 09:06:50 +00:00
parent 2f1c9049d9
commit 02ecde30f4

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2008 QNX Software Systems and others. * Copyright (c) 2000, 2009 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -46,10 +46,22 @@ public class NM {
private static Pattern undef_pattern = null; private static Pattern undef_pattern = null;
private static Pattern normal_pattern = null; private static Pattern normal_pattern = null;
private List<String> undef_symbols; /**
private List<AddressNamePair> text_symbols; * @since 5.1
private List<AddressNamePair> bss_symbols; */
private List<AddressNamePair> data_symbols; protected List<String> undef_symbols;
/**
* @since 5.1
*/
protected List<AddressNamePair> text_symbols;
/**
* @since 5.1
*/
protected List<AddressNamePair> bss_symbols;
/**
* @since 5.1
*/
protected List<AddressNamePair> data_symbols;
private void parseOutput(InputStream stream) throws IOException { private void parseOutput(InputStream stream) throws IOException {
@ -130,9 +142,10 @@ public class NM {
if (params == null || params.length == 0) { if (params == null || params.length == 0) {
args = new String[] {command, "-C", file}; //$NON-NLS-1$ args = new String[] {command, "-C", file}; //$NON-NLS-1$
} else { } else {
args = new String[params.length + 1]; args = new String[params.length + 2];
args[0] = command; args[0] = command;
System.arraycopy(params, 0, args, 1, params.length); System.arraycopy(params, 0, args, 1, params.length);
args[params.length+1] = file;
} }
undef_symbols = new ArrayList<String>(); undef_symbols = new ArrayList<String>();