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] workaround gcc46: prologue skip skips too far (PR 12435) #2


On Sun, 24 Jul 2011 20:03:53 +0200, Mark Kettenis wrote:
> > It does not solve overlays well, but the code just does not work for
> > overlays, it has no other negative effect.
> 
> Sorry, but what do you mean with "overlays" here?

See skip_prologue_sal:
      /* If the function is in an unmapped overlay, use its unmapped LMA address,
         so that gdbarch_skip_prologue has something unique to work on.  */
      if (section_is_overlay (section) && !section_is_mapped (section))
        pc = overlay_unmapped_address (pc, section);

      /* Skip "first line" of function (which is actually its prologue).  */
      pc += gdbarch_deprecated_function_start_offset (gdbarch);
      if (skip)
        pc = gdbarch_skip_prologue (gdbarch, pc);

      /* For overlays, map pc back into its mapped VMA range.  */
      pc = overlay_mapped_address (pc, section);

So in gdbarch_skip_prologue the PC is LMA, I do not know how
gdbarch_skip_prologue could read the bytes at PC (without introducing new
parameter(s) to gdbarch_skip_prologue).


Thanks,
Jan


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