From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1945 invoked by alias); 11 Jun 2012 10:39:42 -0000 Received: (qmail 1934 invoked by uid 22791); 11 Jun 2012 10:39:41 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jun 2012 10:39:29 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Se21w-0003Yk-IM from Yao_Qi@mentor.com for gdb@sourceware.org; Mon, 11 Jun 2012 03:39:28 -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); Mon, 11 Jun 2012 03:38:54 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Mon, 11 Jun 2012 03:39:27 -0700 Message-ID: <4FD5CAD8.4000902@codesourcery.com> Date: Mon, 11 Jun 2012 10:39:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Subject: find_inferior (&all_lwps) -> iterate_over_lwps Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00050.txt.bz2 Hi, GDB needs "pause_all/unpause_all" in GDBserver to control threads correctly when talking with IPA. Some callbacks are available in GDBserver, and GDB can simply 'use' them. However, GDB and GDBserver has the different way to iterate over 'lwp_info' (iterate_over_lwps vs find_inferior), and prevent GDB using these callbacks in GDBserver. What I want to do is to 'replace find_inferior (&all_lwps) with iterate_over_lwps in GDBserver', which makes share more code on both sides easier. What do you think? -- Yao (齐尧)