This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] nto-tdep.c - adjust addr_low addr_high
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Aleksandar Ristovski <aristovski at qnx dot com>
- Date: Fri, 24 Jul 2009 14:25:45 +0100
- Subject: Re: [patch] nto-tdep.c - adjust addr_low addr_high
- References: <h32abf$f65$1@ger.gmane.org>
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?
> + 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
--
Pedro Alves