blob: fb74133a395d792c80e387276efdda9f07d4b842 [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
* Broadcom - addition of properties API
*******************************************************************************/
package org.eclipse.cdt.debug.edc.symbols;
import java.util.Map;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.debug.edc.IStreamBuffer;
/**
* This abstracts access to a particular section in an executable
*/
public interface IExecutableSection extends IAddressInterval, IHasSize {
/** @since 3.0*/
static final String PROPERTY_CONTAINER = "container"; //$NON-NLS-1$
/** @since 3.0*/
static final String PROPERTY_WRITABLE = "writable"; //$NON-NLS-1$
/** @since 3.0*/
static final String PROPERTY_EXECUTABLE = "executable"; //$NON-NLS-1$
/** @since 3.0*/
static final String PROPERTY_ALLOCATABLE = "allocatable"; //$NON-NLS-1$
/**
* Get the base link address of the section
*
* @return the base link address
* @since 3.0
*/
IAddress getLinkAddress();
/**
* Get the file offset of the section
*
* @return the file offset
* @since 3.0
*/
long getFileOffset();
/**
* Get the buffer for the section. This may be thrown away and reloaded on demand.
* The buffer has the correct endianness already set.
* @return buffer, or <code>null</code> if failed to load
*/
IStreamBuffer getBuffer();
/**
* Free the buffer allocated for this section.
*/
void dispose();
/**
* Get the properties of the section
*
* @return the section properties
* @since 3.0
*/
Map<String, Object> getProperties();
}