From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32628 invoked by alias); 25 May 2012 13:53:39 -0000 Received: (qmail 32611 invoked by uid 22791); 25 May 2012 13:53:37 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 May 2012 13:53:25 +0000 Received: by obbwd18 with SMTP id wd18so1580210obb.0 for ; Fri, 25 May 2012 06:53:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.147.74 with SMTP id ti10mr3218822obb.35.1337954004775; Fri, 25 May 2012 06:53:24 -0700 (PDT) Received: by 10.182.148.10 with HTTP; Fri, 25 May 2012 06:53:24 -0700 (PDT) Date: Fri, 25 May 2012 13:53:00 -0000 Message-ID: Subject: siginfo and core files From: jmf list To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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: 2012-05/txt/msg00123.txt.bz2 Hello, Is it possible to access the si_addr and si_signo siginfo fields from a core dump in GDB? When debugging a live process I access these values via the $_siginfo convenience var. I am not sure if both of these values are normally stored in a core dump, or if they are accessible via GDB. I noticed that the signal number is printed to the console when I load a core file, so I started reading the GDB source around the string "Program terminated with signal" and found that the signal number is read from the core file via gdb/corelow.c::core_open and bfd/corefile.c::bfd_core_fail_failing_signal. It isn't apparent to me that any of the other siginfo is stored or read, however. I would like to access these values via the GDB Python API for both live processes and core files. As it stands, I could potentially parse 'info target' to determine the target type, and respectively use "$_siginfo" to get both si_signo and si_addr if my script is running on a live process, or use "target core " to get just the signal number (and let the tool degrade gracefully for lack of si_addr) if my script is running on a core file. That solution is a bit of a kludge though, and I would like to access si_addr in the core file if possible. I am running GDB 7.4 in FC16 on x86_64 for this analysis. Thanks. Any help would be appreciated, J