From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zBTpKlD+nl/OdgAAWB0awg (envelope-from ) for ; Sun, 01 Nov 2020 13:28:32 -0500 Received: by simark.ca (Postfix, from userid 112) id A35441F08B; Sun, 1 Nov 2020 13:28:32 -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 E8EFD1E590 for ; Sun, 1 Nov 2020 13:28:31 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3455E3858D37; Sun, 1 Nov 2020 18:28:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3455E3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604255311; bh=f5Q0UdhF4kOyaHo+Sbw0mypeDBTSRdymRELqIzWZ1IM=; h=To:References:Subject:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=mE0Rsg6/HD5gjv3B5dgagpzgMriwXHfKc050dNF/Nw+puxbUZvNGYU94tnw0RJZxk YJDNoD87CKP3aQFwOfnBmfasKeDyGm0udYIv8YT5RQDEjft5g7UZGTE9dRBJV9LFjU 5g2ZZSpkxYm5YMs4iMYhX+1iLP3HAOlVxeYGkkDA= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 51F1C3858D37 for ; Sun, 1 Nov 2020 18:28:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 51F1C3858D37 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-467-PberS9ZxPmiEDEe4hrmEwA-1; Sun, 01 Nov 2020 13:28:25 -0500 X-MC-Unique: PberS9ZxPmiEDEe4hrmEwA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C7BA4185A0CE; Sun, 1 Nov 2020 18:28:24 +0000 (UTC) Received: from [10.36.115.38] (ovpn-115-38.ams2.redhat.com [10.36.115.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 387495D9D2; Sun, 1 Nov 2020 18:28:23 +0000 (UTC) To: William Adair , gdb@sourceware.org References: Subject: Re: GDB Incorrectly Reads & Resolves Shared Library Symbols [MinGW-w64] Message-ID: Date: Sun, 1 Nov 2020 18:28:22 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Andrew Dinn via Gdb Reply-To: Andrew Dinn Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" On 31/10/2020 23:26, William Adair via Gdb wrote: > 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. Well you can, of course, use your currently installed gdb to debug gdb. Build gdb from a downloaded src tree using make install PREFIX=/path/to/install/dir CFLAGS=-g CXXFLAGS=-g. Then run gdb --fullname /path/to/my/newly/built/gdb. When you type run you will enter a nested gdb that you can debug. Hint: before typing run type (gdb) set prompt (outer) That way you can distinguish prompts in the outer gdb from prompts in the inner gdb. n.b.b. make sure to type a space after (outer) or your typing will start right next to the closing bracket regards, After that all you need to do is familiarize wiht the gdb source! Andrew Dinn -----------