This is the mail archive of the gdb-testers@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]

[binutils-gdb] Remove some $ARCH_read_pc and $ARCH_write_pc


*** TEST RESULTS FOR COMMIT 3f8c94b478c8f2e5c82a1425fd49e977ed969a7f ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 3f8c94b478c8f2e5c82a1425fd49e977ed969a7f

Remove some $ARCH_read_pc and $ARCH_write_pc

Nowadays, gdbarch_read_pc is called in this way,

  if (gdbarch_read_pc_p (gdbarch))
    pc_val = gdbarch_read_pc (gdbarch, regcache);
  /* Else use per-frame method on get_current_frame.  */
  else if (gdbarch_pc_regnum (gdbarch) >= 0)
    {
      ULONGEST raw_val;

      if (regcache_cooked_read_unsigned (regcache,
					 gdbarch_pc_regnum (gdbarch),
					 &raw_val) == REG_UNAVAILABLE)

some ports don't have to define its own gdbarch read_pc method if the
pc value is simply a unsigned value from "pc" register.  The same rule
applies to regcache_write_pc.  This patch removes these $ARCH_read_pc
and $ARCH_write_pc functions.

gdb:

2018-02-06  Yao Qi  <yao.qi@linaro.org>

	* ft32-tdep.c (ft32_read_pc): Remove.
	(ft32_write_pc): Remove.
	(ft32_gdbarch_init): Update.
	* m32r-tdep.c (m32r_read_pc): Remove.
	(m32r_gdbarch_init): Update.
	* mep-tdep.c (mep_read_pc): Remove.
	(mep_gdbarch_init): Update.
	* microblaze-tdep.c (microblaze_write_pc): Remove.
	(microblaze_gdbarch_init): Update.
	* mn10300-tdep.c (mn10300_read_pc): Remove.
	(mn10300_write_pc): Remove.
	(mn10300_gdbarch_init): Update.
	* moxie-tdep.c (moxie_read_pc): Remove.
	(moxie_write_pc): Remove.
	(moxie_gdbarch_init): Update.


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