From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 3C70C3847824 for ; Fri, 3 Sep 2021 20:59:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3C70C3847824 Received: by mail-lj1-x233.google.com with SMTP id d16so748233ljq.4 for ; Fri, 03 Sep 2021 13:59:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GYYIBv1SrqjPNvm2MpbT2LvzVa41QU3d6DR8rHx+yWY=; b=BGOus4ntDFXYvfqxyYXpse1P7YI9/4ECFcHWaZAcHjtiySwm2BPys3vpPcD1EGGMEJ DMm7vcfWkVctUwKR+SAk769CR9x8+ic9nnokVlTOpxiv7IcE8f26SM92x5VRx+c6fakC 3FCYmtidndynieJ+Z9klU+6yi6u3DK6+IRZLQneSCCLBjxVPapVGPLhH6EyBIGQ/tf3/ kU0kjnDQgPeuxT1TtvIBPFHra5kZmzGbxuW4sStxOwMw+dcSStz6JfQiyksX30RHcypo MbTVu2F3/wX6W8FkdWpamv2kIBS7aOCvRu0gggOkxcFpugGWnA+n+ukPQhhN0DWwncZX BLRA== X-Gm-Message-State: AOAM531eSSUG+EVyXzjxIo7wg0v1DKecDX/pZmmUyN2fK75xjfcXHJYl xViVyWw96YEjDo9A9ZYfUVDvuc31+Yc= X-Google-Smtp-Source: ABdhPJx/z+nYfta0fYbTCFA8ZF3DBsPT30nXEAzfm5m8OF+Gps6IvVu0TE4lyXUrszCMmb+fseBang== X-Received: by 2002:a2e:b8c7:: with SMTP id s7mr671224ljp.105.1630702740772; Fri, 03 Sep 2021 13:59:00 -0700 (PDT) Received: from [192.168.2.206] ([94.228.207.246]) by smtp.gmail.com with ESMTPSA id j10sm34533lfk.224.2021.09.03.13.59.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Sep 2021 13:59:00 -0700 (PDT) Subject: Re: Disambiguating symbols by module To: Christian Biesinger Cc: Reuben Thomas via Gdb References: From: Alexander Miloslavskiy Message-ID: <240ffeee-871c-92ff-dff1-6fcfc04ef159@gmail.com> Date: Fri, 3 Sep 2021 23:58:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3027.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_ABUSEAT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: Fri, 03 Sep 2021 20:59:03 -0000 On 03.09.2021 19:25, Christian Biesinger wrote: > The python API lets you do this: > gdb.lookup_objfile("libfoo").lookup_global_symbol("ps") Thanks! Unfortunately it seems that gdb does not return non-debugging symbols this way. I can get the offending symbol with this approach, but not the desired one. Anyways, while trying that, I figured that the offending symbol comes from a dbgsym package that I never meant to install. It somehow slipped through to my machine two years ago, too late to figure how it happened. After uninstalling it, there is no longer the other symbol to confuse gdb, so I can now simply (gdb) call (void)ps() This means that my problem is now solved.