From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26969 invoked by alias); 5 Sep 2016 22:17: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 26960 invoked by uid 89); 5 Sep 2016 22:17:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Marquess, marquess, Hx-languages-length:817, sk:paul.ma X-HELO: mail-it0-f49.google.com Received: from mail-it0-f49.google.com (HELO mail-it0-f49.google.com) (209.85.214.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Sep 2016 22:17:31 +0000 Received: by mail-it0-f49.google.com with SMTP id i184so164905054itf.1 for ; Mon, 05 Sep 2016 15:17:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ugeT0FMrZAVNcSJUqI4po7nb5UW1OGFX5tJ5+EsC64Q=; b=cD1jb/R2eycM4axHvF9lMSauw4oDLeRHF7rYh/EHOpA5Xc0w0+1vQTu3GAVMqAyG7M 0ODTQl0ci+aOopBoJB1RaO1LYV3SGBNCsGRhFO4L/ExCO9AGvcVqZv2FeLXr0Z9HhGur //oq3uSIhZS5r9YmoKwNS+B5gZTYaUzysKxUZhHIJ1to2GnbsEjxiRFD6SeSI7PbP5xI NeqQX0QqYeh11+d1CqPZgEm1cKvK+xcQXUndh0AUqrR3+xqdEd95pt8o8JWk+r249IGO oDv8AHJqhKBEQIfBm6qClNeq05Jpseq61AGgIFijDiCbnGZcRBV469WMj+ww7JxjINIp Zy0A== X-Gm-Message-State: AE9vXwO/jhcpU0wP6gTbyi0yUl/3Qj8xyUfVgXm6Csw0H1biry6Iq050ykANh2A9c4z69DcWREY3bQS+bfXvhw== X-Received: by 10.107.189.134 with SMTP id n128mr1351291iof.193.1473113849567; Mon, 05 Sep 2016 15:17:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.34.141 with HTTP; Mon, 5 Sep 2016 15:17:28 -0700 (PDT) In-Reply-To: References: <87b59611-f5d1-628d-fd41-85ce6c6eb50b@samersoff.net> From: Samuel Bronson Date: Mon, 05 Sep 2016 22:17:00 -0000 Message-ID: Subject: Re: collecting data from a coring process To: Paul Marquess Cc: Dmitry Samersoff , vijay nag , "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00025.txt.bz2 On Mon, Sep 5, 2016 at 7:09 AM, Paul Marquess wrote: > From: Dmitry Samersoff [mailto:dms@samersoff.net] > >> Paul, >> >> >> 1) Why not dump the information that you are looking for into a file >> >> in the process signal handler ? >> > >> > Would love to, but I have no idea what state the process is in once >> > the SEGV has been triggered. [...] > I know we've had problems with signal handlers causing problems, thus my preference to find a way to have the signal handler code do as little as possible and get all the data collection handled at arm's length by gdb. You could just spawn (and wait for) your GDB-launching script from the signal handler; then, the process & stack will still be around for GDB. I think this is even legal!