This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: unnecessary aarch64_write_pc ?
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yufeng Zhang <Yufeng dot Zhang at arm dot com>
- Cc: Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 17 Apr 2013 16:37:45 +0200
- Subject: Re: unnecessary aarch64_write_pc ?
- References: <20130415125021 dot GB3525 at adacore dot com> <516EB29D dot 2030409 at arm dot com>
> Thanks for the heads up; yes, aarch64_write_pc doesn't appear
> necessary. I've prepared the attached patch to remove the function.
Awesome, thanks for confirming. The patch is approved if you throw in
a ChangeLog entry :).
> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
> index ebc78d6..2b03106 100644
> --- a/gdb/aarch64-tdep.c
> +++ b/gdb/aarch64-tdep.c
> @@ -2499,14 +2499,6 @@ aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache,
> gdb_assert_not_reached ("regnum out of bound");
> }
>
> -/* Implement the "write_pc" gdbarch method. */
> -
> -static void
> -aarch64_write_pc (struct regcache *regcache, CORE_ADDR pc)
> -{
> - regcache_cooked_write_unsigned (regcache, AARCH64_PC_REGNUM, pc);
> -}
> -
> /* Callback function for user_reg_add. */
>
> static struct value *
> @@ -2618,8 +2610,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
> set_gdbarch_push_dummy_call (gdbarch, aarch64_push_dummy_call);
> set_gdbarch_frame_align (gdbarch, aarch64_frame_align);
>
> - set_gdbarch_write_pc (gdbarch, aarch64_write_pc);
> -
> /* Frame handling. */
> set_gdbarch_dummy_id (gdbarch, aarch64_dummy_id);
> set_gdbarch_unwind_pc (gdbarch, aarch64_unwind_pc);
--
Joel