From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aJnANbTA91+FHAAAWB0awg (envelope-from ) for ; Thu, 07 Jan 2021 21:17:24 -0500 Received: by simark.ca (Postfix, from userid 112) id CCABD1E965; Thu, 7 Jan 2021 21:17:24 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [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 2C2321E940 for ; Thu, 7 Jan 2021 21:17:24 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9D9E3850401; Fri, 8 Jan 2021 02:17:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9D9E3850401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610072243; bh=zRrzyoJYG7EX+uJ2NzY0ydAzPVTstLHzUV+wwBn48Hg=; 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=ZHTr+d3yXD9ZIMzqa96fM91UGWWO9m21nLsS9tU2CZMBK/6aC2vdr7Bqjzn6Se7+a 4LX9JZPLJJGIHvBzSJ8bkAeQMFDsl9671rjYCRQrEIsEw/4ZWUeXgQsf5x9F9hfsIx tYUiSU7RXTH2GDE2iYLKeItZcHK0xELntNzsrj0s= Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by sourceware.org (Postfix) with ESMTPS id 8E8353850401 for ; Fri, 8 Jan 2021 02:17:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8E8353850401 Received: by mail-io1-xd2f.google.com with SMTP id 81so8240138ioc.13 for ; Thu, 07 Jan 2021 18:17:20 -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=zRrzyoJYG7EX+uJ2NzY0ydAzPVTstLHzUV+wwBn48Hg=; b=Dg59LNU24looMlfIEmoL/1P31xfWCrZYqb/kn02IQKL1LYySpj20Qtz6NcwlI7uGnB gokoduS1hMhXRMHhPJgcstgHiWJfGbsF1pAOOuB5EwWEvPu7AB8AKqli2Vd0wJipUQ3p aRMb0Tcwd4bBTbn37nkoWC3qredvhCYAB7aYQr27PTZO0Don89YY7HCfAPz2BqjTwBCV GxofkspxJN/+oawh7ZKQPX+5zTn05VCr/78dJnSFsCr5SeEbquL6oB9vMmIMxSEbtgrx 4w+V/SfBvuLYGqiKGA2F3uPpKHeRJhZ9hDVVoaGT8sawJYMIf77/osN8dkpCdZsXl6VT Zs6w== X-Gm-Message-State: AOAM532vEzvELTuGDStO61uO0NnOf+8g7o201nSeJdSW2WSKHLyuaEFE NGquTpGxITrCzgs3IONQrvGYx3ZdZcAP0gTh0ug= X-Google-Smtp-Source: ABdhPJxhKwTae7Bc9BFXk7HClJPNmQ/A0TOUTr6Z4iZfUb0CRPQX4/u+oNZaKFjIK67ctmRI0435XHBf5OqQtaVqq2A= X-Received: by 2002:a02:a60a:: with SMTP id c10mr1334259jam.123.1610072240026; Thu, 07 Jan 2021 18:17:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 7 Jan 2021 18:17:08 -0800 Message-ID: Subject: Re: GDB and debug fission To: Sterling Augustine 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: David Blaikie via Gdb Reply-To: David Blaikie Cc: "gdb@sourceware.org" , Alexander Yermolovich Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" On Thu, Jan 7, 2021 at 5:48 PM Sterling Augustine via Gdb wrote: > > 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. Hmm, do you know if that ^ works with split DWARF? I assumed it wouldn't (since I figured it was powered by the same logic that would be used by gdb in the absence of an index). If that does work - we could use that to reduce build overhead & just tell people "when you want to debug, run this script, then use the debugger" (or build it into the debugger, etc) > 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