From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1mu/MuG591+eGwAAWB0awg (envelope-from ) for ; Thu, 07 Jan 2021 20:48:17 -0500 Received: by simark.ca (Postfix, from userid 112) id C39951E940; Thu, 7 Jan 2021 20:48:17 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 705051E940 for ; Thu, 7 Jan 2021 20:48:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AEFB8384243B; Fri, 8 Jan 2021 01:48:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEFB8384243B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610070496; bh=TAVhDuJHWvndHp0QirYqIWAyF52JrFladG6dEM1chxI=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=foL1TntXBuexSJGhe6/FIqrzhJkaPm7peUxhqh793eMojfTRjFXY8xDUOD7hOmloG SXJQtmU0GIuOrlqwHmGlzyRon0MhBpocoJPsoaXg73e/+rLY3Nbrpul2mWUu+Kf72R XE8A2U7SimLZKbbxEcg1EdyXa1AB5nvd2+og2guk= Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 0DE78384243B for ; Fri, 8 Jan 2021 01:48:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0DE78384243B Received: by mail-il1-x135.google.com with SMTP id 14so7495484ilq.2 for ; Thu, 07 Jan 2021 17:48:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TAVhDuJHWvndHp0QirYqIWAyF52JrFladG6dEM1chxI=; b=Q2eyyINtb96D3uI3Ul5949bmgahYzJLORgvPbYUlR1PQ5b1sSFSRmGBQZU77Y45pC5 XVc7cN0q8m8SC42lJFhnTa/qmwMs0SZB4cpn+XQVtktKtr0r6ZyufVXMEy29i6KQSmRm X7EkHZr0WyZo6YOuJnVEF3eF3V1HMm4JQ04BWoIcrJz2OJFfZbwnW+yQCwLPg4jZTcNM MqRL7eDipFguBb2gkA4LeP2W5XgrC15ajb8ePsOd6NzA/FLTwp60cW/u/MNwpkK5PgoZ gSP6vbTlkjRNBqGhMC+ejv7dUUSd+pH9PnJbTkWpLDq5audTq8QYB+z+JCzMKYYNTw+W gy+g== X-Gm-Message-State: AOAM533lfjOc41V8gpcj5jViKPceT7WpBXUf1nwyT57Io9CSdn1jd8pV Q0KDAr8FDsLBakh/k7+EoV99vTzg4qQ+BE2Y1Nw+Jg== X-Google-Smtp-Source: ABdhPJwluvqEHNfz22vQ9l8KiNWs/MbyFO1AyOM9K2nYoKdSpiep6swqi0PIo8itqZAqFa0Zvur5wm1UBF2eHKauL2A= X-Received: by 2002:a92:2e0f:: with SMTP id v15mr1691888ile.110.1610070494349; Thu, 07 Jan 2021 17:48:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 7 Jan 2021 17:48:03 -0800 Message-ID: Subject: Re: GDB and debug fission To: Alexander Yermolovich Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sterling Augustine via Gdb Reply-To: Sterling Augustine Cc: "gdb@sourceware.org" Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" On Thu, Jan 7, 2021 at 5:25 PM Alexander Yermolovich via Gdb wrote: > > Hello. > > For latest gdb to work with -gsplit-dwarf debug information generated by clang, either in split or single mode does it need gdb_index or pubnames? > In normal case where debug information is part of executable gdb_index is nice to speed up startup time, and I think I read pubnames is not used, but with debug fission are either gdb_index or pubnames necessary? For gdb to work with split-dwarf debug info, it needs a gdb_index. That can be generated in several ways. Gdb can build one itself--there is a script somewhere to add a gdb index. But it is somewhat easier to have the linker you use generate gdb_index for you (both gnu-ld and llvm's lld can do this). They do this by reading the .gnu_pubnames section, so in some way, you need both pubnames *and* an index. So you would ordinarily use the following commands: $(CC) $(normal_arguments) -ggnu-pubnames $(LD) $(normal_arguments) -Wl,--gdb-index