This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub
- From: Pedro Alves <palves at redhat dot com>
- To: Jiong Wang <jiwang at tilera dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org, Walter Lee <walt at tilera dot com>
- Date: Fri, 01 Mar 2013 15:59:38 +0000
- Subject: Re: [RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub
- References: <50F91516.6010204@tilera.com> <20130118131511.GF3564@adacore.com> <50F9664D.2090008@tilera.com> <511F0FE9.8030300@codesourcery.com> <51243991.4040304@tilera.com> <51244CBA.4000009@codesourcery.com> <512623BE.2030608@tilera.com> <51309167.5050608@redhat.com> <5130B63A.1060304@tilera.com>
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