This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] nto-tdep.c - adjust addr_low addr_high


Pedro Alves wrote:
On Wednesday 08 July 2009 15:26:55, Aleksandar Ristovski wrote:

This adjusts so->addr_low and so->addr_high for proper "info sahredlibrary" output.

Index: gdb/nto-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/nto-tdep.c,v
retrieving revision 1.34
@@ -315,6 +316,10 @@ nto_relocate_section_addresses (struct s
sec->addr = nto_truncate_ptr (sec->addr + LM_ADDR (so) - vaddr);
sec->endaddr = nto_truncate_ptr (sec->endaddr + LM_ADDR (so) - vaddr);
+ if (so->addr_low == 0)
+ so->addr_low = LM_ADDR (so);

Isn't LM_ADDR an offset, not an absolute address?

In our case, it's absolute address of .text (that is why we subtract vaddr as read from phdr).



+ if (so->addr_high < sec->endaddr)
+ so->addr_high = sec->endaddr;
}
/* This is cheating a bit because our linker code is in libc.so. If we



Thanks,

--
Aleksandar Ristovski
QNX Software Systems


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]