From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id B095A3858D37 for ; Sun, 1 Nov 2020 15:44:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B095A3858D37 Received: by mail-il1-x12d.google.com with SMTP id v18so10832176ilg.1 for ; Sun, 01 Nov 2020 07:44:40 -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=C+MsCFaikKg48YQK0g4QWsjEfdelEjN4ERDosLENsos=; b=Rqu4KRb3nc8p5c2JduAcKe2NX5qY3nEHy98xvRM7Hmfw7FJParCK3CRSk5vNrD4aAu B5bjlMPLPQTL0MRqn4mlwUI00M7q3EAKDWv0av80823Llv9pCGePtaaBHsR7qf1WlR7b eNve2zXK2WU9PW1XIf78g5UYECzEar4hZ6doXNzMs7C4Lm7SFMaS1aV/4MejbTnllnAe mmpt/ftyjEEg/vCD10+m4rcTgO2mcwsWe3Yksts7ByNrhNkjFRyEmIF88h4+SaWX0GhF fZa37uFsRTy0rfv9aC/ifWx5fTmBfRLWc7qmJr/SJH1cQebSdtWAUDYai6aJHgFJt4Ee HzxA== X-Gm-Message-State: AOAM5335lly/C2igXOVqHvEqewu4ujS1dftp5vM9m+vUiIU1OMajVMyZ fG3uy9nnJ/Q4Nre42QuaV5ORPjU6b2xrMt8dLaU= X-Google-Smtp-Source: ABdhPJyvyP+NgGnF7dcFun1B8F9UQZVSH04cHj+ysDEefuOjqfwWTun2CgxsYDbe9X5KCMRTXaqTLvuvZfmOQL9WJW4= X-Received: by 2002:a92:cc83:: with SMTP id x3mr8159776ilo.232.1604245480090; Sun, 01 Nov 2020 07:44:40 -0800 (PST) MIME-Version: 1.0 References: <1513277520.1719132.1604242384163@mail.yahoo.com> In-Reply-To: <1513277520.1719132.1604242384163@mail.yahoo.com> From: William Adair Date: Sun, 1 Nov 2020 10:44:26 -0500 Message-ID: Subject: Re: GDB Incorrectly Reads & Resolves Shared Library Symbols [MinGW-w64] To: Hannes Domani Cc: "gdb@sourceware.org" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: , X-List-Received-Date: Sun, 01 Nov 2020 15:44:42 -0000 Hannes, Unfortunately, I do not. It appears I'm left with little choice but to debug GDB itself while it's debugging the executable that loads the shared library. I'll add that I am using a custom linker command file and that may be ruining some predefined expectation from GDB on what data should be in certain sections, but I haven't dug far enough into GDB source to figure out how it loads symbols from the binary image, yet. On Sun, Nov 1, 2020 at 9:53 AM Hannes Domani wrote: > Am Sonntag, 1. November 2020, 00:26:34 MEZ hat William Adair via Gdb < > gdb@sourceware.org> Folgendes geschrieben: > > > Can anyone recommend a way to start debugging GDB? I've found that when I > > compile a 32-bit shared library that GDB is unable to correctly resolve > the > > symbols in the image and set breakpoints. Even when I reach a segfault > and > > print the backtrace, the symbols are incorrect or flat out missing. I > > already verified that the image has .debug_* sections as would be > required > > for DWARF debugging, so I'm perplexed as to why GDB cannot correctly > > resolve it and am looking for guidance. > > > > Thank you. > > Do you have a (small) example where this problem can be reproduced? > > > Hannes >