From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12862 invoked by alias); 9 Jun 2002 09:36:22 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12850 invoked from network); 9 Jun 2002 09:36:19 -0000 Received: from unknown (HELO bbnrel4.net.external.hp.com) (155.208.254.68) by sources.redhat.com with SMTP; 9 Jun 2002 09:36:19 -0000 Received: from iws1pb05.france.hp.com (unknown [15.124.72.14]) by bbnrel4.net.external.hp.com (Postfix) with ESMTP id B6F163F6; Sun, 9 Jun 2002 11:36:17 +0200 (METDST) Received: from hpfrcu81.france.hp.com (localhost [127.0.0.1]) by iws1pb05.france.hp.com with ESMTP (8.8.6 (PHNE_17190)/8.7.3 SMKit7.01) id LAA01102; Sun, 9 Jun 2002 11:36:37 +0200 (METDST) Message-ID: <3D0321A5.90FC7EDC@hpfrcu81.france.hp.com> Date: Sun, 09 Jun 2002 02:36:00 -0000 From: phi X-Accept-Language: en MIME-Version: 1.0 To: Robin Rowe Cc: gdb@sources.redhat.com Subject: Re: Just-in-time debugging on Linux References: <3D0312BB.7080701@il.ibm.com> <001a01c20f93$bd784460$0301a8c0@rowboat> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00072.txt.bz2 Robin Rowe wrote: > > Michael, > > > signal(SIGSEGV, crash_handler); /* This is the most common crash */ > > This is an interesting approach, but I want to trap unmodified programs. > Then wrap them up in a script rename prog xyz into xyz.ori this doesn't modify the prog? then implement the script xyz that does xyz:: #! your shell gdb xyz.ori $@ and have you gdbinit (or other ways) to catch the signal you want. At xyz invocation we start gdb wich start xyz.ori wich will catch the signal and let you see. ================== If you really don't want to rename xyz.ori then have the script xyz earlier in your PATH and make the script invoke the xyz from its original path Phi