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]

Re: [PATCH][PR threads/15824] when get threads name failed from info threads with linux kernel version earlier than 2.6.33


On 08/19/2013 10:52 AM, Will Huang wrote:
+
+/* Return the string length of FILED /proc/LWPID/task/TID/status.
+   Return -1 if not found.  */
+
+static int
+linux_proc_get_string (pid_t lwpid, pid_t tid, char *target,
+                      size_t t_size, const char *field)


I suggest renaming this function to "linux_proc_parse_status" or something else, and adjust the comment.

/* Parse file /proc/LWPID/task/TID/status, save the value of FIELD
   in buffer TARGET, whose length is T_SIZE, and return the length
   of the value.  If TID is zero, parse /proc/LWPID/status instead.
   Return -1 if not found.  */

static int
linux_proc_parse_status (pid_t lwpid, pid_t tid, char *target,
                         size_t t_size, const char *field)
--
Yao (éå)


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