blob: 9cd64084d468070647ebfabf5e4b113f68949dbe [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 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 getPhysicalAddress() to API
*******************************************************************************/
package org.eclipse.cdt.debug.edc.internal.symbols;
import java.util.Map;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.debug.edc.symbols.IHasSize;
import org.eclipse.cdt.debug.edc.symbols.IAddressInterval;
/**
* Interface representing a section in memory. It is segment in Elf file and a
* section in PE file.
*/
public interface ISection extends IAddressInterval, IHasSize {
/**
* Commonly known properties of a section
*/
static final String PROPERTY_ID = "id"; //$NON-NLS-1$
static final String PROPERTY_SIZE = "size"; //$NON-NLS-1$
static final String PROPERTY_LINK_ADDRESS = "link_address"; //$NON-NLS-1$
static final String PROPERTY_PHYSICAL_ADDRESS = "physical_address"; //$NON-NLS-1$
/** Canonical section name: one of NAME_TEXT, NAME_DATA, NAME_RODATA, or NAME_BSS */
static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
static final String NAME_TEXT = ".text"; //$NON-NLS-1$
static final String NAME_DATA = ".data"; //$NON-NLS-1$
static final String NAME_RODATA = ".rodata"; // read only data //$NON-NLS-1$
static final String NAME_BSS = ".bss"; // uninitialized data //$NON-NLS-1$
/**
* Get the section id
*
* @return the section id
*/
int getId();
/**
* Get the base link address of the section
*
* @return the base link address
*/
IAddress getLinkAddress();
/**
* Get the physical address in memory of the start of this section
*
* @return the physical address in memory of the start of this section
*/
IAddress getPhysicalAddress();
/**
* Get the properties of the section
*
* @return the section properties
*/
Map<String, Object> getProperties();
}