Re: [RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub

Pedro Alves
2013-03-01T15:59:50Z

On 03/01/2013 02:07 PM, Jiong Wang wrote:
>
> * tilegx-tdep.c (tilegx_analyze_prologue): Improve the evaluation
> of "instbuf_size".
> (tilegx_skip_prologue): Improve the evaluation of the end address
> for prologue analyze.

"improve" is a "Why?", and subjective. ChangeLogs are objective, and document
the "What" changed. I suggest:

* tilegx-tdep.c (tilegx_analyze_prologue): Limit bundle reading to END_ADDR.
(tilegx_skip_prologue): Limit prologue analysis to section end.

> tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
> {
> - CORE_ADDR func_start;
> + CORE_ADDR func_start, end_pc;
> + struct obj_section *s = NULL;

No need to initialize 's' here, it's unconditionally initialized below.

> + s = find_pc_section (start_pc);

OK with these changes.

Thanks.

--
Pedro Alves