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] add 'rs6000_in_function_epilogue_p()'


On Fri, Dec 02, 2005 at 08:20:48PM -0800, Jim Blandy wrote:
> But we can do a bit better than that.  If skip_prologue were sure that
> lim_pc represents a real PC value (its callers know), and scanning
> from the entry point wasn't able to reach lim_pc, and lim_pc points
> directly at a return instruction, then we *know* that the current SP
> is our CFA.  And if you actually understand all the instructions
> between lim_pc and the return instruction, then you may again be able
> to derive the CFA.  This information can be used in preference to that
> obtained with the from-entry-point scan.

Fascinating.  So, do both prologue and epilogue recognition.  It would
be useful for backtraces in epilogues, but not for much else, and it
would be a lot of work, so I have trouble seeing this get implemented.
But, maybe.

Of course this is only useful without CFI and the main reason PPC
doesn't use CFI has been solved.  And the problem is likely to
reoccur with CFI that doesn't describe the epilogue, which today is
prevalent.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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