blob: 70afd7ab63de159332e88ae0f9324f5f33b93485 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010, 2011 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nokia - Initial API and implementation
* refactoring of properties & readSymbols to super, added newSymbol()
* Broadcom - addition of properties
*******************************************************************************/
package org.eclipse.cdt.debug.edc.internal.arm;
import java.io.IOException;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.debug.edc.internal.symbols.elf.Elf;
import org.eclipse.cdt.debug.edc.internal.symbols.files.ElfExecutableSymbolicsReader;
import org.eclipse.cdt.debug.edc.symbols.ISymbol;
import org.eclipse.core.runtime.IPath;
/**
* This class handles reading ARM ELF files for the purposes of detecting symbolics.
*/
public class ARMElfExecutableSymbolicsReader extends ElfExecutableSymbolicsReader {
/**
* the only thing special about this reader is that it creates
* ARMSymbol objects rather than plain Symbol objects
* @param binaryFile
* @param elf
* @throws IOException
*/
public ARMElfExecutableSymbolicsReader(IPath binaryFile, Elf elf) throws IOException {
super(binaryFile, elf);
}
/** creates a new ARMSymbol instead of a plain new Symbol
* @see org.eclipse.cdt.debug.edc.internal.symbols.files.ElfExecutableSymbolicsReader#newSymbol(org.eclipse.cdt.debug.edc.internal.symbols.elf.Elf.Symbol, org.eclipse.cdt.core.IAddress)
*/
@Override
protected ISymbol newSymbol(Elf.Symbol symbol, IAddress linkAddress) {
return new ARMSymbol(symbol.toString(), linkAddress, symbol.st_size,
initSymbolProperties(symbol));
}
}