From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24008 invoked by alias); 19 Aug 2013 03:10:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23988 invoked by uid 89); 19 Aug 2013 03:10:34 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.2 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 19 Aug 2013 03:10:33 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VBFrT-0007To-57 from Yao_Qi@mentor.com ; Sun, 18 Aug 2013 20:10:31 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 18 Aug 2013 20:10:31 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Sun, 18 Aug 2013 20:10:30 -0700 Message-ID: <52118C73.1090604@codesourcery.com> Date: Mon, 19 Aug 2013 03:10:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Will Huang CC: , 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$@huang@aliyun-inc.com> <520D8D9A.3050003@codesourcery.com> <016701ce9a41$f39086d0$dab19470$@huang@aliyun-inc.com> <520DF2E2.3020407@codesourcery.com> <01a201ce9a6a$74436db0$5cca4910$@huang@aliyun-inc.com> <520E0CFB.9010203@codesourcery.com> <000301ce9c87$19927630$4cb76290$@huang@aliyun-inc.com> In-Reply-To: <000301ce9c87$19927630$4cb76290$@huang@aliyun-inc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-08/txt/msg00492.txt.bz2 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 (齐尧)