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]

[PATCH 4/4] Add comments to uncommented functions in s390-linux-tdep.c


Moving common functions from s390-linux-tdep to s390-tdep showed that some of
the left functions are lacking a description.  Fix that now.

gdb/ChangeLog:
	* s390-linux-tdep.c: Add comments to uncommented functions
---
 gdb/s390-linux-tdep.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index c27c1f4799..30910a5364 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -60,6 +60,8 @@
 #define XML_SYSCALL_FILENAME_S390 "syscalls/s390-linux.xml"
 #define XML_SYSCALL_FILENAME_S390X "syscalls/s390x-linux.xml"
 
+/* Register handling.  */
+
 /* The "guess_tracepoint_registers" gdbarch method.  */
 
 static void
@@ -271,6 +273,8 @@ s390_iterate_over_regset_sections (struct gdbarch *gdbarch,
     }
 }
 
+/* Implement core_read_description gdbarch method.  */
+
 static const struct target_desc *
 s390_core_read_description (struct gdbarch *gdbarch,
 			    struct target_ops *target, bfd *abfd)
@@ -318,6 +322,11 @@ s390_core_read_description (struct gdbarch *gdbarch,
     }
 }
 
+/* Frame unwinding. */
+
+/* Wrapper for trad_frame_get_prev_register to allow for s390 pseudo
+   register translation.  */
+
 static struct value *
 s390_trad_frame_prev_register (struct frame_info *this_frame,
 			       struct trad_frame_saved_reg saved_regs[],
@@ -340,6 +349,9 @@ struct s390_unwind_cache {
   struct trad_frame_saved_reg *saved_regs;
 };
 
+/* Unwind THIS_FRAME and write the information into unwind cache INFO using
+   prologue analysis.  Helper for s390_frame_unwind_cache.  */
+
 static int
 s390_prologue_frame_unwind_cache (struct frame_info *this_frame,
 				  struct s390_unwind_cache *info)
@@ -524,6 +536,9 @@ s390_prologue_frame_unwind_cache (struct frame_info *this_frame,
   return 1;
 }
 
+/* Unwind THIS_FRAME and write the information into unwind cache INFO using
+   back chain unwinding.  Helper for s390_frame_unwind_cache.  */
+
 static void
 s390_backchain_frame_unwind_cache (struct frame_info *this_frame,
 				   struct s390_unwind_cache *info)
@@ -578,6 +593,9 @@ s390_backchain_frame_unwind_cache (struct frame_info *this_frame,
   info->func = get_frame_pc (this_frame);
 }
 
+/* Unwind THIS_FRAME and return the corresponding unwind cache for
+   s390_frame_unwind and s390_frame_base.  */
+
 static struct s390_unwind_cache *
 s390_frame_unwind_cache (struct frame_info *this_frame,
 			 void **this_prologue_cache)
@@ -611,6 +629,8 @@ s390_frame_unwind_cache (struct frame_info *this_frame,
   return info;
 }
 
+/* Implement this_id frame_unwind method for s390_frame_unwind.  */
+
 static void
 s390_frame_this_id (struct frame_info *this_frame,
 		    void **this_prologue_cache,
@@ -629,6 +649,8 @@ s390_frame_this_id (struct frame_info *this_frame,
   *this_id = frame_id_build (info->frame_base, info->func);
 }
 
+/* Implement prev_register frame_unwind method for s390_frame_unwind.  */
+
 static struct value *
 s390_frame_prev_register (struct frame_info *this_frame,
 			  void **this_prologue_cache, int regnum)
@@ -639,6 +661,8 @@ s390_frame_prev_register (struct frame_info *this_frame,
   return s390_trad_frame_prev_register (this_frame, info->saved_regs, regnum);
 }
 
+/* Default S390 frame unwinder.  */
+
 static const struct frame_unwind s390_frame_unwind = {
   NORMAL_FRAME,
   default_frame_unwind_stop_reason,
@@ -658,6 +682,9 @@ struct s390_stub_unwind_cache
   struct trad_frame_saved_reg *saved_regs;
 };
 
+/* Unwind THIS_FRAME and return the corresponding unwind cache for
+   s390_stub_frame_unwind.  */
+
 static struct s390_stub_unwind_cache *
 s390_stub_frame_unwind_cache (struct frame_info *this_frame,
 			      void **this_prologue_cache)
@@ -684,6 +711,8 @@ s390_stub_frame_unwind_cache (struct frame_info *this_frame,
   return info;
 }
 
+/* Implement this_id frame_unwind method for s390_stub_frame_unwind.  */
+
 static void
 s390_stub_frame_this_id (struct frame_info *this_frame,
 			 void **this_prologue_cache,
@@ -694,6 +723,8 @@ s390_stub_frame_this_id (struct frame_info *this_frame,
   *this_id = frame_id_build (info->frame_base, get_frame_pc (this_frame));
 }
 
+/* Implement prev_register frame_unwind method for s390_stub_frame_unwind.  */
+
 static struct value *
 s390_stub_frame_prev_register (struct frame_info *this_frame,
 			       void **this_prologue_cache, int regnum)
@@ -703,6 +734,8 @@ s390_stub_frame_prev_register (struct frame_info *this_frame,
   return s390_trad_frame_prev_register (this_frame, info->saved_regs, regnum);
 }
 
+/* Implement sniffer frame_unwind method for s390_stub_frame_unwind.  */
+
 static int
 s390_stub_frame_sniffer (const struct frame_unwind *self,
 			 struct frame_info *this_frame,
@@ -721,6 +754,8 @@ s390_stub_frame_sniffer (const struct frame_unwind *self,
   return 0;
 }
 
+/* S390 stub frame unwinder.  */
+
 static const struct frame_unwind s390_stub_frame_unwind = {
   NORMAL_FRAME,
   default_frame_unwind_stop_reason,
@@ -737,6 +772,9 @@ struct s390_sigtramp_unwind_cache {
   struct trad_frame_saved_reg *saved_regs;
 };
 
+/* Unwind THIS_FRAME and return the corresponding unwind cache for
+   s390_sigtramp_frame_unwind.  */
+
 static struct s390_sigtramp_unwind_cache *
 s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
 				  void **this_prologue_cache)
@@ -845,6 +883,8 @@ s390_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
   return info;
 }
 
+/* Implement this_id frame_unwind method for s390_sigtramp_frame_unwind.  */
+
 static void
 s390_sigtramp_frame_this_id (struct frame_info *this_frame,
 			     void **this_prologue_cache,
@@ -855,6 +895,8 @@ s390_sigtramp_frame_this_id (struct frame_info *this_frame,
   *this_id = frame_id_build (info->frame_base, get_frame_pc (this_frame));
 }
 
+/* Implement prev_register frame_unwind method for sigtramp frames.  */
+
 static struct value *
 s390_sigtramp_frame_prev_register (struct frame_info *this_frame,
 				   void **this_prologue_cache, int regnum)
@@ -864,6 +906,8 @@ s390_sigtramp_frame_prev_register (struct frame_info *this_frame,
   return s390_trad_frame_prev_register (this_frame, info->saved_regs, regnum);
 }
 
+/* Implement sniffer frame_unwind method for sigtramp frames.  */
+
 static int
 s390_sigtramp_frame_sniffer (const struct frame_unwind *self,
 			     struct frame_info *this_frame,
@@ -885,6 +929,8 @@ s390_sigtramp_frame_sniffer (const struct frame_unwind *self,
   return 1;
 }
 
+/* S390 sigtramp frame unwinder.  */
+
 static const struct frame_unwind s390_sigtramp_frame_unwind = {
   SIGTRAMP_FRAME,
   default_frame_unwind_stop_reason,
@@ -992,6 +1038,9 @@ s390_all_but_pc_registers_record (struct regcache *regcache)
   return 0;
 }
 
+/* Canonicalize system call SYSCALL belonging to ABI.  Helper for
+   s390_linux_syscall_record.  */
+
 static enum gdb_syscall
 s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
 {
@@ -1160,6 +1209,9 @@ s390_canonicalize_syscall (int syscall, enum s390_abi_kind abi)
     }
 }
 
+/* Record a system call.  Returns 0 on success, -1 otherwise.
+   Helper function for s390_process_record.  */
+
 static int
 s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
 {
@@ -1208,6 +1260,8 @@ s390_linux_syscall_record (struct regcache *regcache, LONGEST syscall_native)
   return 0;
 }
 
+/* Implement process_record_signal gdbarch method.  */
+
 static int
 s390_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache,
                           enum gdb_signal signal)
@@ -1411,6 +1465,8 @@ s390_record_vr (struct gdbarch *gdbarch, struct regcache *regcache, int i)
   return 0;
 }
 
+/* Implement process_record gdbarch method.  */
+
 static int
 s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
                     CORE_ADDR addr)
-- 
2.13.5


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