Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-09-06 01:17:15 +0000
committereutarass2008-09-06 01:17:15 +0000
commitf3c8d3454087f450915c41aced0da34f6376ec64 (patch)
tree19990f279db1b20d198e0bf83f5c314aaa9e8fc3 /dwarfio.c
parentc72f24c7147b0653436d837296b9b62e2a642903 (diff)
downloadorg.eclipse.tcf.agent-f3c8d3454087f450915c41aced0da34f6376ec64.tar.gz
org.eclipse.tcf.agent-f3c8d3454087f450915c41aced0da34f6376ec64.tar.xz
org.eclipse.tcf.agent-f3c8d3454087f450915c41aced0da34f6376ec64.zip
TCF Agent: Got rid of libelf dependency. Use mmap() to access ELF sections data.
Diffstat (limited to 'dwarfio.c')
-rw-r--r--dwarfio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwarfio.c b/dwarfio.c
index 39d5517b..4b09e96d 100644
--- a/dwarfio.c
+++ b/dwarfio.c
@@ -117,11 +117,12 @@ static DIO_Cache * dio_GetCache(ELF_File * File) {
}
void dio_EnterSection(ELF_Section * Section, U8_T Offset) {
+ if (elf_load(Section)) exception(errno);
sSection = Section;
+ sData = Section->data;
sDataPos = Offset;
sDataLen = Section->size;
sBigEndian = Section->file->big_endian;
- if (elf_load(Section, &sData)) exception(errno);
dio_gVersion = 0;
dio_g64bit = 0;
dio_gAddressSize = 4;
@@ -304,9 +305,10 @@ static U1_T * dio_LoadStringTable(U4_T * StringTableSize) {
}
Cache->mStringTableSize = (size_t)Section->size;
- if (elf_load(Section, &Cache->mStringTable) < 0) {
+ if (elf_load(Section) < 0) {
str_exception(ERR_INV_DWARF, "invalid .debug_str section");
}
+ Cache->mStringTable = Section->data;
}
*StringTableSize = Cache->mStringTableSize;

Back to the top