diff options
author | Eugene Tarassov | 2012-10-26 04:40:25 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-10-26 04:40:25 +0000 |
commit | cea1024938b75740e5039c85f7327d9a8e426e28 (patch) | |
tree | a98cdf283b449a62ef7693485e1ca8158c4c05b1 /agent/tcf/services/tcf_elf.c | |
parent | d18f92aee16c7d1e3cd2d72854164b607fe914de (diff) | |
download | org.eclipse.tcf.agent-cea1024938b75740e5039c85f7327d9a8e426e28.tar.gz org.eclipse.tcf.agent-cea1024938b75740e5039c85f7327d9a8e426e28.tar.xz org.eclipse.tcf.agent-cea1024938b75740e5039c85f7327d9a8e426e28.zip |
TCF Agent: fixed regression: elf_map_to_run_time_address() should not return error for ET_EXEC even if memory map is not available
Diffstat (limited to 'agent/tcf/services/tcf_elf.c')
-rw-r--r-- | agent/tcf/services/tcf_elf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/tcf/services/tcf_elf.c b/agent/tcf/services/tcf_elf.c index 8e1ea75b..c5e1c5d5 100644 --- a/agent/tcf/services/tcf_elf.c +++ b/agent/tcf/services/tcf_elf.c @@ -1227,7 +1227,6 @@ ContextAddress elf_map_to_run_time_address(Context * ctx, ELF_File * file, ELF_S unsigned i; ContextAddress rt = 0; - errno = 0; /* Note: 'addr' is link-time address - it cannot be used as elf_get_map() argument */ if (elf_get_map(ctx, 0, ~(ContextAddress)0, &elf_map) < 0) return 0; for (i = 0; i < elf_map.region_cnt; i++) { @@ -1252,7 +1251,10 @@ ContextAddress elf_map_to_run_time_address(Context * ctx, ELF_File * file, ELF_S rt = elf_run_time_address_in_region(ctx, r, file, sec, addr); if (errno == 0) return rt; } - if (file->type == ET_EXEC) return addr; + if (file->type == ET_EXEC) { + errno = 0; + return addr; + } errno = ERR_INV_ADDRESS; return 0; } |