From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 33595385840F for ; Fri, 3 Sep 2021 14:35:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 33595385840F Received: by mail-lj1-x236.google.com with SMTP id s12so9973129ljg.0 for ; Fri, 03 Sep 2021 07:35:53 -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=PdXGqdG3T0IBvMOYRaOw+qfP1aD/n96b7l0cuBg7JEI=; b=l1NRsfjQKEGpA4aqmWFDqpyrZ0DG6/BAJJ6D7/HD7aNX7HTvjEcU3KCofMykIdi0WF gvytdEbr9QQb9wXM2wGo/NYpC13Gxjh+dbXQVH/tvMV5VyQXnrIUrFqUT8JS4s5YRbE1 gteCaKw+a96+6DuYMyS4EW7TjaCC3B0eXjQnYsINGq0iLfTFEUhbbM18ck4PaBYHNpe2 8JMQnXy9M5E+SsjIUYIcYiA9rhT15ZENVRCm53zdLtWtLepfw2mH5aulS674d27P2obi tzJUpd1+85yiDnhZ1z7+lddjKA8821RP0lk3uyiCtKAzAYerYZMoVqbv39DeDQHieYav TCnw== X-Gm-Message-State: AOAM533+7uXxK/GRv33IaAF7dfNPgEYNlfbJ598M0fkOSH4JScoWmWQO qqLyfInCBvCG0oS91RLMUObur9aWwkM= X-Google-Smtp-Source: ABdhPJzac6YuhuzBtqbRqytCbRoMr0Sh0R513/JxaYv38HXbQZq9dXk2VVPlPgl+UqBrmhuT8Xu4Jw== X-Received: by 2002:a2e:9849:: with SMTP id e9mr3114925ljj.315.1630679751878; Fri, 03 Sep 2021 07:35:51 -0700 (PDT) Received: from [192.168.2.206] ([94.228.207.246]) by smtp.gmail.com with ESMTPSA id b8sm528418lff.106.2021.09.03.07.35.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Sep 2021 07:35:51 -0700 (PDT) Subject: Re: Disambiguating symbols by module To: Matt Rice Cc: GDB References: From: Alexander Miloslavskiy Message-ID: Date: Fri, 3 Sep 2021 17:35:49 +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.5 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 14:35:54 -0000 On 03.09.2021 17:31, Matt Rice wrote: > Been a while since I've needed to do this, but IIRC you can just set a > breakpoint using the symbol address too, like: > > (gdb) break *0x00007ffff6d7a3b0 > > I don't know of or believe there is any nicer syntax like > object_file.o:symbol_name, which one could imagine might be possible. Thanks! Right, currently in order to call 'ps()' I have to manually do the following: (gdb) info function ^ps$ Non-debugging symbols: 0x00007ffff6d7a3b0 ps (gdb) call (void)0x00007ffff6d7a3b0() That is, I manually find the address, then use it to call the function. I'd like to avoid that extra first step somehow and have some address-independent command.