From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116314 invoked by alias); 13 Mar 2019 16:22:03 -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 116303 invoked by uid 89); 13 Mar 2019 16:22:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.1 spammy=HX-detected-operating-system:Genre, HX-detected-operating-system:recognized, HX-detected-operating-system:details X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Mar 2019 16:22:01 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h46di-0003lJ-1q for gdb@sourceware.org; Wed, 13 Mar 2019 12:21:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37394) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h46dh-0000zR-QH for gdb@gnu.org; Wed, 13 Mar 2019 12:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h46dg-0003hH-0x for gdb@gnu.org; Wed, 13 Mar 2019 12:21:57 -0400 Received: from mx2.freebsd.org ([2001:1900:2254:206a::19:2]:45693) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h46df-0003fU-Mx for gdb@gnu.org; Wed, 13 Mar 2019 12:21:55 -0400 Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 10CF076E8D; Wed, 13 Mar 2019 16:21:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CB248802F; Wed, 13 Mar 2019 16:21:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C61CF9C61; Wed, 13 Mar 2019 16:21:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: question about why gdb needs executable's binary To: =?UTF-8?Q?Jirka_Koutn=c3=bd?= , Andreas Schwab Cc: gdb@gnu.org References: From: John Baldwin Openpgp: preference=signencrypt Message-ID: <0272e0ae-2269-bd36-f4b3-110eeaa2d2c3@FreeBSD.org> Date: Wed, 13 Mar 2019 16:22:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 3CB248802F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:1900:2254:206a::19:2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00026.txt.bz2 On 3/13/19 8:41 AM, Jirka Koutn=C3=BD wrote: > Thanks Andreas! Aha that's interesting.. hmm so, is there some read-only > segment, that would contain information necessary for the output of 'wher= e'? The .text section containing the instructions being executed is often needed for unwinding if there is no debug info. On some architectures with a fixed frame layout like 32-bit x86 you can get by without decoding instructions, = but on other architectures like 64-bit x86, an unwinder has to try to decode instructions to determine frame layouts in the absence of debug info.=20 > Den ons. 13. mar. 2019 kl. 14:34 skrev Andreas Schwab : >=20 >> On M=C3=A4r 13 2019, Jirka Koutn=C3=BD wrote: >> >>> If we assume debugging a core file generated by an excutable with >> stripped >>> symbols (that gdb is able to find and load correctly in my case), >>> I was wondering why does gdb still need the executable's binary as >>> well? >> >> A core file only contains data from modified mappings. Any data from >> read-only mappings needs to be read from the original files. >> >> Andreas. >> >> -- >> Andreas Schwab, SUSE Labs, schwab@suse.de >> GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9= D7 >> "And now for something completely different." >> --=20 John Baldwin