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]

[tic6x] Remove tic6x_register_to_value and tic6x_value_to_register


Hi,
gdbarch_register_to_value and gdbarch_value_to_register will be called
when gdbarch_convert_register_p is hooked and returns 1.  In tic6x,
gdbarch_convert_register_p is not hooked, because we don't have any
special registers to convert.  So these two functions
tic6x_register_to_value and tic6x_value_to_register are dead code.
This patch is to remove them.  Regression tested on tic6x-unknown-elf.

I'll check it in.

gdb:

2012-08-07  Yao Qi  <yao@codesourcery.com>

	* tic6x-tdep.c (tic6x_register_to_value): Remove.
	(tic6x_value_to_register): Likewise.
	(tic6x_gdbarch_init): Don't call set_gdbarch_register_to_value
	and set_gdbarch_value_to_register.
---
 gdb/tic6x-tdep.c |   24 ------------------------
 1 files changed, 0 insertions(+), 24 deletions(-)

diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 1fefcf3..a8d518d 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -715,27 +715,6 @@ tic6x_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
   return align_down (addr, 8);
 }
 
-/* This is the implementation of gdbarch method register_to_value.  */
-
-static int
-tic6x_register_to_value (struct frame_info *frame, int regnum,
-			 struct type *type, gdb_byte * to,
-			 int *optimizedp, int *unavailablep)
-{
-  get_frame_register (frame, regnum, (char *) to);
-  *optimizedp = *unavailablep = 0;
-  return 1;
-}
-
-/* This is the implementation of gdbarch method value_to_register.  */
-
-static void
-tic6x_value_to_register (struct frame_info *frame, int regnum,
-			 struct type *type, const gdb_byte *from)
-{
-  put_frame_register (frame, regnum, from);
-}
-
 /* Given a return value in REGCACHE with a type VALTYPE, extract and copy its
    value into VALBUF.  */
 
@@ -1341,9 +1320,6 @@ tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Call dummy code.  */
   set_gdbarch_frame_align (gdbarch, tic6x_frame_align);
 
-  set_gdbarch_register_to_value (gdbarch, tic6x_register_to_value);
-  set_gdbarch_value_to_register (gdbarch, tic6x_value_to_register);
-
   set_gdbarch_return_value (gdbarch, tic6x_return_value);
 
   set_gdbarch_dummy_id (gdbarch, tic6x_dummy_id);
-- 
1.7.7.6


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