From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12678 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: GDB to debug threaded application Date: Fri, 6 Apr 2018 13:22:10 -0400 Message-ID: <20180406172210.GA3094@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1523035221 21660 195.159.176.226 (6 Apr 2018 17:20:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Apr 2018 17:20:21 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12692-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 06 19:20:17 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1f4V28-0005Va-OI for gllmg-musl@m.gmane.org; Fri, 06 Apr 2018 19:20:16 +0200 Original-Received: (qmail 27997 invoked by uid 550); 6 Apr 2018 17:22:23 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 27976 invoked from network); 6 Apr 2018 17:22:23 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12678 Archived-At: On Fri, Apr 06, 2018 at 06:33:35PM +0200, Micha Nelissen wrote: > Hi all, > > I have built a cross-toolchain (x86-64 to arm, gcc 5.4.0) with musl > (1.1.16) using buildroot (2017.02). I let buildroot build a gdb for > the arm platform. It runs, but when I debug my application, gdb > hangs after a thread is started. Can't interrupt it, have to kill > -KILL my application from another ssh session. > > I noticed that there is a libthread_db.so in the glibc-based > toolchain. Do I need something similar for musl? That > libthread_db.so needs libc.so.6 (glibc) so I guess I can't use it > as-is? > > Thanks for any pointers! No, musl does not use libthread_db.so, but presence of a glibc version of this library could break things badly. Make sure it's not being built or present in any location gdb might search. Are you using a remote/cross gdb (with gdbserver on the target) or local gdb? Rich