From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95102 invoked by alias); 13 Jul 2017 09:25:53 -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 94462 invoked by uid 89); 13 Jul 2017 09:24:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.0 required=5.0 tests=BAYES_20,KAM_LAZY_DOMAIN_SECURITY,LIKELY_SPAM_BODY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=twitter.com, twittercom, UD:facebook.com, messes X-HELO: mail.cendio.se Received: from hayek.cendio.se (HELO mail.cendio.se) (193.12.253.119) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 09:24:55 +0000 Received: from ossman.lkpg.cendio.se (unknown [IPv6:2a00:801:107:4700:92b1:1cff:fe97:f932]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.cendio.se (Postfix) with ESMTPSA id 8B6CAC01BFB5 for ; Thu, 13 Jul 2017 11:24:50 +0200 (CEST) From: Pierre Ossman Subject: Decoding stack in core file without correct libs? To: gdb@sourceware.org Message-ID: <197a6eed-6163-67ed-67b7-57c4298d851b@cendio.se> Date: Thu, 13 Jul 2017 09:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2017-07/txt/msg00024.txt.bz2 Hi, I'd like to see if there is a way to produce binaries so that gdb can walk the stack in a core dump even if the libraries gdb sees doesn't match the libraries when the core dump was generated. My scenario is simply that we might get crashes at customer sites. Rather than getting some kind of remote access up an running, it would be easier to have them send us a core dump from the crash. We then load the core file together with a binary with debug symbols on our end. Unfortunately gdb doesn't traverse the stack correctly if the crash is in a system library. We just get random addresses for each frame. It's okay that we cannot get the proper symbols or local variables for frames that are in system libraries, but is there some way to get access to the frames that are in our binary? Regards -- Pierre Ossman Software Development Cendio AB https://cendio.com Teknikringen 8 https://twitter.com/ThinLinc 583 30 Linköping https://facebook.com/ThinLinc Phone: +46-13-214600 https://plus.google.com/+CendioThinLinc A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?