This is the mail archive of the gdb-patches@sources.redhat.com 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]

PATCH: provide comments for PowerPC sim regno functions


Kevin requested these in:

http://sources.redhat.com/ml/gdb-patches/2004-07/msg00338.html

but I lost track of that in the shuffle.  Here they are.

2004-08-09  Jim Blandy  <jimb@redhat.com>

	* rs6000-tdep.c (set_sim_regno, init_sim_regno_table,
	rs6000_register_sim_regno): Doc fixes.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.228
diff -c -p -c -p -F'^(' -r1.228 rs6000-tdep.c
*** rs6000-tdep.c	4 Aug 2004 17:45:30 -0000	1.228
--- rs6000-tdep.c	9 Aug 2004 18:42:11 -0000
*************** ppc_floating_point_unit_p (struct gdbarc
*** 192,197 ****
--- 192,205 ----
            && tdep->ppc_fpscr_regnum >= 0);
  }
  
+ 
+ /* Check that TABLE[GDB_REGNO] is not already initialized, and then
+    set it to SIM_REGNO.
+ 
+    This is a helper function for init_sim_regno_table, constructing
+    the table mapping GDB register numbers to sim register numbers; we
+    initialize every element in that table to -1 before we start
+    filling it in.  */
  static void
  set_sim_regno (int *table, int gdb_regno, int sim_regno)
  {
*************** set_sim_regno (int *table, int gdb_regno
*** 201,206 ****
--- 209,218 ----
    table[gdb_regno] = sim_regno;
  }
  
+ 
+ /* Initialize ARCH->tdep->sim_regno, the table mapping GDB register
+    numbers to simulator register numbers, based on the values placed
+    in the ARCH->tdep->ppc_foo_regnum members.  */
  static void
  init_sim_regno_table (struct gdbarch *arch)
  {
*************** init_sim_regno_table (struct gdbarch *ar
*** 281,286 ****
--- 293,301 ----
    tdep->sim_regno = sim_regno;
  }
  
+ 
+ /* Given a GDB register number REG, return the corresponding SIM
+    register number.  */
  static int
  rs6000_register_sim_regno (int reg)
  {


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