From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29444 invoked by alias); 23 Mar 2011 22:21:59 -0000 Received: (qmail 29428 invoked by uid 22791); 23 Mar 2011 22:21:58 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from g6t0187.atlanta.hp.com (HELO g6t0187.atlanta.hp.com) (15.193.32.64) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Mar 2011 22:21:53 +0000 Received: from G3W0631.americas.hpqcorp.net (g3w0631.americas.hpqcorp.net [16.233.59.15]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by g6t0187.atlanta.hp.com (Postfix) with ESMTPS id F401D2807E; Wed, 23 Mar 2011 22:21:52 +0000 (UTC) Received: from G6W0644.americas.hpqcorp.net (16.230.34.80) by G3W0631.americas.hpqcorp.net (16.233.59.15) with Microsoft SMTP Server (TLS) id 8.2.176.0; Wed, 23 Mar 2011 22:20:58 +0000 Received: from GVW1121EXC.americas.hpqcorp.net ([16.228.24.178]) by G6W0644.americas.hpqcorp.net ([16.230.34.80]) with mapi; Wed, 23 Mar 2011 22:20:58 +0000 From: "Maucci, Cyrille" To: Tom Tromey CC: "gdb@sourceware.org" Date: Wed, 23 Mar 2011 22:21:00 -0000 Subject: RE: Backtrace extraction ONLY gdb Message-ID: <0E02F16954AF394BB163AEE50FDF548569009DAB5B@GVW1121EXC.americas.hpqcorp.net> References: <0E02F16954AF394BB163AEE50FDF5485690094DFED@GVW1121EXC.americas.hpqcorp.net> In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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/msg00138.txt.bz2 Hey Tom, Thanks for your reply. The suid trick may do it... Though isn't there some story about suid script= s not being allowed? >> You can make them on the production machine and then analyze them elsewh= ere. Well if analyze them elsewhere is 'looking at the backtrace', yes. If analyze them elsewhere is fully browsing the core file, it requires the = exact same exe/libs versions as on the production system. HP's gdb adds a great feature called packcore to ease the packing of everyt= hing needed for offline browsing with one command. ++Cyrille =20 -----Original Message----- From: Tom Tromey [mailto:tromey@redhat.com]=20 Sent: Tuesday, March 22, 2011 5:47 PM To: Maucci, Cyrille Cc: gdb@sourceware.org Subject: Re: Backtrace extraction ONLY gdb >>>>> "Cyrille" =3D=3D 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 app= ly 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