From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96287 invoked by alias); 19 Mar 2019 15:47: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 96279 invoked by uid 89); 19 Mar 2019 15:47:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,SPF_SOFTFAIL autolearn=no version=3.3.1 spammy=U*jan.kratochvil, Kratochvil, jan.kratochvil@redhat.com, sk:jan.kra 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; Tue, 19 Mar 2019 15:47:51 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6Gxx-00068Y-KN for gdb@sourceware.org; Tue, 19 Mar 2019 11:47:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36278) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h6Gxw-0002zv-Tu for gdb@gnu.org; Tue, 19 Mar 2019 11:47:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Gxv-00064q-C6 for gdb@gnu.org; Tue, 19 Mar 2019 11:47:48 -0400 Received: from mail-it1-x12e.google.com ([2607:f8b0:4864:20::12e]:50736) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6Gxu-00063Q-VJ for gdb@gnu.org; Tue, 19 Mar 2019 11:47:47 -0400 Received: by mail-it1-x12e.google.com with SMTP id m137so11158367ita.0 for ; Tue, 19 Mar 2019 08:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v2tfCJP+f0QELi32vgQfRQKONk5RYvZsqcVWx0TmzdY=; b=TmuAZIwmsZfwRmQ3d/jlvnw1sh6wD4pck62Cs8i/9OOWCKOlp1f21BnNQuOq+Dr4rY pZqB/EI2hRyjxZXafEkhVGQUD8AeIFZGpv6bkGCnY7dzRTilb3WzabECiKTDygKuywCI NcX5nQaIXN9FnDcKh16l4BPepDgKTl+Do/g4WCkj/pT3kwrCTxAyBBEqd85Gad/vJWUl JBS9I1BWXMAqcfQ1riNRa94AV6zjJq/n2W/Y+aY3ARFjIxXEyGAeKAQ5bBbMzvYLEhiK ldYf4G5yCPFXpNvhkLdnXUJ3Ko8s5w13I/8nw4BwRniqSwZeO/xATvdqh1XK8dJVwAvU uU/Q== MIME-Version: 1.0 References: <20190314214555.GA2221061@host1.jankratochvil.net> <20190319143542.GA3498328@host1.jankratochvil.net> <20190319154144.GA3509809@host1.jankratochvil.net> In-Reply-To: <20190319154144.GA3509809@host1.jankratochvil.net> From: =?UTF-8?Q?Jirka_Koutn=C3=BD?= Date: Tue, 19 Mar 2019 15:47:00 -0000 Message-ID: Subject: Re: question about why gdb needs executable's binary To: Jan Kratochvil Cc: gdb@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::12e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-03/txt/msg00058.txt.bz2 Aha, perfect, now it makes sense, thank you very much for your patience :) Den tir. 19. mar. 2019 kl. 15:41 skrev Jan Kratochvil < jan.kratochvil@redhat.com>: > On Tue, 19 Mar 2019 16:25:30 +0100, Jirka Koutn=C3=BD wrote: > > I see, just to make sure - DT_DEBUG gets dumped into the corefile, is > that > > correct? > > The PT_DYNAMIC segment containing the DT_DEBUG pointer (pointing to > r_debug/_r_debug) normally gets dumped into the core file. The problem is > that > without having the main executable one cannot much find where is the > DT_DEBUG > pointer located in the core file. Core file has for example NT_AUXV where > is > AT_PHDR and from program headers one could find PT_DYNAMIC where is > DT_DEBUG. > But core file does not have to contain the program headers as those may be > in > a read-only page of the main executable. Nowadays with dumping of the fir= st > page of any ELF (even if it is read-only, for its NT_GNU_BUILD_ID) one can > probably find the program headers there. But then one can also just read > NT_FILE nowadays. > > > Jan >