This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][PR threads/15824] when get threads name failed from info threads with linux kernel version earlier than 2.6.33
- From: Yao Qi <yao at codesourcery dot com>
- To: Will Huang <will dot huang at aliyun-inc dot com>
- Cc: <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Mon, 19 Aug 2013 11:09:39 +0800
- Subject: Re: [PATCH][PR threads/15824] when get threads name failed from info threads with linux kernel version earlier than 2.6.33
- References: <00b201ce98a6$7cf69150$76e3b3f0$ at huang@aliyun-inc.com> <520D8D9A dot 3050003 at codesourcery dot com> <016701ce9a41$f39086d0$dab19470$ at huang@aliyun-inc.com> <520DF2E2 dot 3020407 at codesourcery dot com> <01a201ce9a6a$74436db0$5cca4910$ at huang@aliyun-inc.com> <520E0CFB dot 9010203 at codesourcery dot com> <000301ce9c87$19927630$4cb76290$ at huang@aliyun-inc.com>
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 (éå)