This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] nto-tdep.c - adjust addr_low addr_high
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 08 Jul 2009 10:26:55 -0400
- Subject: [patch] nto-tdep.c - adjust addr_low addr_high
Hello,
This adjusts so->addr_low and so->addr_high for proper "info
sahredlibrary" output.
Thanks,
--
Aleksandar Ristovski
QNX Software Systems
ChangeLog:
* nto-tdep.c (nto_relocate_section_address): Adjust
so->addr_low and
so->addr_high.
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);
+ 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