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]

[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

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