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/TileGX 2/6] simplify the handling of skip prologue for plt stub


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


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