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: [RFC] mn10300: Rewrite prologue analyzer


On Mon, 16 Mar 2009 13:24:38 -0400
Joel Brobecker <brobecker@adacore.com> wrote:

> > I've rewritten the prologue analyzer to use the "prologue-value"
> > machinery.  It already knows about more instructions than the existing
> > prologue analyzer, and will accept instructions in any order.
> 
> Nice! I've always wanted to take a look and see how it can simplify
> prologue parsing... How did you find it?

The prologue-value machinery is great.  You basically write a
simulator for the various instructions that might appear in a
prologue.  When the simulation is done, either due to running to the
limit, or encountering an instruction that prologue analyzer doesn't
handle, you look at the resulting state to figure out the various
frame-related offsets, including those of saved registers.  The
prologue-value machinery is used to manipulate the state and for
analyzing the state when the simulation is done.

I've used this machinery twice now, both for mn10300 as well as for
another port that I can't talk about yet.  In both cases, construction
of the prologue analyzer was quicker and required less debugging than
the ad-hoc analyzers that I've written in the past.

> Looks like overall your patch is a nice improvement compared to
> the previous implementation. I quickly scanned the patch. I am not
> very familiar with prologue-value, but everything seemed OK to me.

Thanks for looking it over.

Kevin


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