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: Regression on prelinked-sepdebug-shlibs


Hi Tristan,

On Mon, 04 Jan 2010 16:23:22 +0100, Tristan Gingold wrote:
> can you try and/or comment this patch before I officially submit it ?  No sepdebug.exp regressions.

it works (for the reproducer I provided - you could not run it?) after
removing:

+  /* In most cases, the offsets are 0.  In this case we return NULL to reduce
+     overhead.  */
+  for (i = 0; i < objfile->num_sections; i++)
+    if (objfile->section_offsets->offsets[i])
+      break;
+  if (i >= objfile->num_sections)
+    return NULL;

These offsets are for file vs. memory displacement.  If I have .so prelinked at
0x3404200190 it gets loaded at 0x3404200190 so
objfile->section_offsets->offsets[*] will be 0 but still the .so.debug file is
0x0-based and the .so.debug file needs to be relocated to 0x3404200190.


Thanks,
Jan


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