From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49920 invoked by alias); 1 Oct 2015 09:25:41 -0000 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 Received: (qmail 49904 invoked by uid 89); 1 Oct 2015 09:25:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f53.google.com Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 01 Oct 2015 09:25:39 +0000 Received: by pacex6 with SMTP id ex6so69556682pac.0 for ; Thu, 01 Oct 2015 02:25:37 -0700 (PDT) X-Received: by 10.66.146.4 with SMTP id sy4mr10889415pab.79.1443691537678; Thu, 01 Oct 2015 02:25:37 -0700 (PDT) Received: from E107787-LIN (power-aix.osuosl.org. [140.211.15.154]) by smtp.gmail.com with ESMTPSA id vv9sm5367114pbc.95.2015.10.01.02.25.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Oct 2015 02:25:37 -0700 (PDT) From: Yao Qi To: Peter Griffin Cc: Andreas Arnez , gdb@sourceware.org, lee.jones@linaro.org Subject: Re: RFC GDB Linux Awareness analysis References: <20150603142858.GA19370@griffinp-ThinkPad-X1-Carbon-2nd> <20150930132729.GB26183@griffinp-ThinkPad-X1-Carbon-2nd> Date: Thu, 01 Oct 2015 09:25:00 -0000 In-Reply-To: <20150930132729.GB26183@griffinp-ThinkPad-X1-Carbon-2nd> (Peter Griffin's message of "Wed, 30 Sep 2015 14:27:29 +0100") Message-ID: <868u7n6iuq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00000.txt.bz2 Peter Griffin writes: > Does anyone have experience / thoughts on how often the existing threading > implementations that are already inside GDB break? Presumably these are a= lso > tightly coupled to parsing out of tree data structures (or the libraries = which > GDB relies on to do this). It shouldn't break in any case. There are some conventions in these thread libraries to make it debuggable. In glibc NPTL, __nptl_create_event should be called after a thread is created. GDB relies on this, and set a breakpoint on it to monitor the thread creation. In AIX thread lib, GDB replies on the symbol name returned by pthdb_session_pthreaded, and set a breakpoint on it similarly. We need linux kernel to have such convention with GDB, that is, a function is called after a thread is created, and the function name shouldn't be changed across different version of kernels. --=20 Yao (=E9=BD=90=E5=B0=A7)