libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Function Address


From: Jose Flavio Aguilar Paulino
Subject: Re: [Libunwind-devel] Function Address
Date: Thu, 16 Aug 2007 11:55:11 -0300

Hi David!

I'm trying to read the TOC (.opd) section from Elf file.
The major problem is that this table in filled in runtime by the loader,
so this table in elf file is not valid! Thats why I need the address
space of the debugged process do find out the function table and find
the correct address of the function!
Unhappily I don't think there is a way to find the real address of a
function in the memory!... I'm hardly working on this for 3 days and I
couldn't manage a way to solve the address in elf file by the address!
Sorry!

I really think I need the address space in function... do you think this
would be a big problem?

thanks,
Flávio

On Wed, 2007-08-15 at 19:13 -0600, David Mosberger-Tang wrote:
> On 8/15/07, Jose Flavio Aguilar Paulino <address@hidden> wrote:
> 
> > Thanks a lot for the explanation about the "min_dist", I figure out that
> > the problem is in gcc optimization -O2 (Im already reporting to gcc
> > developers) because it lose the min_dist value and because of that it's
> > not entering in the if to fill the procedure name.
> 
> Ah, I suspected an optimization problem!
> 
> > Do you know how could I read the memory address space in elf file? I'm
> > still trying to avoid to use the address space, but I couldn't make it
> > work yet!
> 
> The ELF file gets mmap'ed into libunwind's address-space, so you can
> access it directly.  The info where the image is mapped is stored in
> the elf_image struct (ei->image is the starting address and ei->size
> its size).
> 
>   --david
-- 
Jose Flavio Aguilar Paulino
(address@hidden)

Toolchain Team
LTC, Linux Technology Center
IBM Brazil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]