This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: replace [...]_write_pc methods by pc_regnum gdbarch value?
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 25 Apr 2013 16:03:58 -0700
- Subject: Re: replace [...]_write_pc methods by pc_regnum gdbarch value?
- References: <20130415132116 dot GD3525 at adacore dot com>
On Mon, 15 Apr 2013 15:21:16 +0200
Joel Brobecker <brobecker@adacore.com> wrote:
> In the following tdep files...
> - m32r-tdep.c
> - mep-tdep.c
>
> ... the unit defines a _write_pc gdbarch method which simply calls
> regcache_cooked_write_unsigned with the appropriate PC regnum.
> It seems to me that setting the pc_regnum gdbarch value would
> be sufficient. See attached diff.
>
> I cannot test the changes, but if people agree, I don't mind checking
> it in.
>
> gdb/ChangeLog:
>
> * m32r-tdep.c (m32r_write_pc): Delete.
> (m32r_gdbarch_init): Remove call to set_gdbarch_write_pc.
> Add call to set_gdbarch_pc_regnum.
>
> gdb/ChangeLog:
>
> * mep-tdep.c (mep_write_pc): Delete.
> (mep_gdbarch_init): Remove call to set_gdbarch_write_pc.
> Add call to set_gdbarch_pc_regnum.
Hi Joel,
Sorry for the late reply.
Your changes look good to me. Feel free to check it in. If there's
any breakage, in those targets, I'll fix them.
Kevin