From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1585 invoked by alias); 22 Mar 2011 16:46:57 -0000 Received: (qmail 1577 invoked by uid 22791); 22 Mar 2011 16:46:56 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 16:46:51 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2MGknnG014036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Mar 2011 12:46:49 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2MGkmcX012281; Tue, 22 Mar 2011 12:46:48 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p2MGkl66012924; Tue, 22 Mar 2011 12:46:48 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 3F9F4378491; Tue, 22 Mar 2011 10:46:47 -0600 (MDT) From: Tom Tromey To: "Maucci\, Cyrille" Cc: "gdb\@sourceware.org" Subject: Re: Backtrace extraction ONLY gdb References: <0E02F16954AF394BB163AEE50FDF5485690094DFED@GVW1121EXC.americas.hpqcorp.net> Date: Tue, 22 Mar 2011 16:46:00 -0000 In-Reply-To: <0E02F16954AF394BB163AEE50FDF5485690094DFED@GVW1121EXC.americas.hpqcorp.net> (Cyrille Maucci's message of "Mon, 21 Mar 2011 17:13:02 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-03/txt/msg00120.txt.bz2 >>>>> "Cyrille" == Maucci, Cyrille writes: Cyrille> Is there any possibility to 'recompile' gdb where only the 'bt' Cyrille> (or 'threads apply all bt') feature would be enabled? Maybe with a lot of hacking. If the process you need to attach to is always owned by a particular user, you can play games with suid to restrict gdb to doing backtraces. (Install gdb so that it is only executable by that user. Then, make a suid wrapper owned by that user that invokes `gdb -batch -p PID -ex "thread apply all bt full"'.) Alternatively, core files are good for this kind of use. You can make them on the production machine and then analyze them elsewhere. Tom