From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +D0QC+ExMmETDwAAWB0awg (envelope-from ) for ; Fri, 03 Sep 2021 10:32:01 -0400 Received: by simark.ca (Postfix, from userid 112) id 1737B1EE22; Fri, 3 Sep 2021 10:32:01 -0400 (EDT) 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 3A6BD1EDF5 for ; Fri, 3 Sep 2021 10:32:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA0C2384B014 for ; Fri, 3 Sep 2021 14:31:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA0C2384B014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1630679519; bh=iWCYnDaDUFnr3VQUowGHcnBQirnL2ggju+srFDa9ZhM=; 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=C/1lY4FyN59zhvNPN9k74ZR3mdwYv0RE/PoYpR54PTqBtt/bB3+RS+/ZJm8/YCECr 8urB0MRii2mUr4bsTj8LKn0+nomGQxe4WRnFSES7fGOddIQXg4wq+1LxtwHJOX5sw1 GMQZCHZECjOkZ7XLaDO7LXj3pdScb3FEJybw1Qx8= Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id F41AB385840F for ; Fri, 3 Sep 2021 14:31:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F41AB385840F Received: by mail-pj1-x1033.google.com with SMTP id w19-20020a17090aaf9300b00191e6d10a19so4019461pjq.1 for ; Fri, 03 Sep 2021 07:31:35 -0700 (PDT) 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=iWCYnDaDUFnr3VQUowGHcnBQirnL2ggju+srFDa9ZhM=; b=YdGgZylxcbE7eIFl76WKaU0fhXYLDYNb1dZN+Xopymlyin3CuTrLwbcPmKGYfOP5HK 2zSrjEMVNb4Gvp4BQ22gZVaNICF/ayZvmbgSIOcHNNqIqSCW5GURRymXiwgkqOtGmvrQ 9l3pQSFyvsgnULM1O+AuHAqpcwifUz5v5wAhydU4VHK7sSAocgVXMvcawPnqScvb0DjV z2zqe6L572BbLH07+JS9RLe2OUDcUpHHfW5Enjncl85rpnMsLmtkDCZAGK15u1g45tUi 1C4g/GRUDt9g3uULKP/Ee1rCg22V7pzSRviS2rsgPuqOr1AZEyF2XkOGavbaxgXaJJyD SSGQ== X-Gm-Message-State: AOAM533p5zWkDnq6Jf4uywx/RCAKSrnerWOyXDKj39Ox4pHgL3WKvPEn 37VCjEbjm/1C2lLy6SadHSVGv310GtexZB7F5yofPEgx9nKngg== X-Google-Smtp-Source: ABdhPJww5i79i12O5uztnbWRWbRNDAFw9lBU2NDuCe465D2D95+zEGNFZorI79FGWTQvq0Ia1k0RM68DETj9Da3RU/Y= X-Received: by 2002:a17:902:aa86:b029:116:3e3a:2051 with SMTP id d6-20020a170902aa86b02901163e3a2051mr3230595plr.38.1630679495185; Fri, 03 Sep 2021 07:31:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 3 Sep 2021 14:31:24 +0000 Message-ID: Subject: Re: Disambiguating symbols by module To: Alexander Miloslavskiy 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: Matt Rice via Gdb Reply-To: Matt Rice Cc: GDB Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Thu, Sep 2, 2021 at 8:48 PM Alexander Miloslavskiy via Gdb wrote:0x00007ffff6d7a3b0 > > Hello, >0x00007ffff6d7a3b0 > I spend much time debugging Java with GDB. > > In order to obtain current Java callstack, I do this: > (gdb) call (void)ps() > > The problem is, the function's name is too short and gdb confuses it > with a variable in a different library: > > (gdb) info var ^ps$ > File ../../cipher/blowfish.c: > 256: static const u32 ps[18]; > > (gdb) info function ^ps$ > Non-debugging symbols: > 0x00007ffff6d7a3b0 ps > > Here, the symbol I want is a non-debugging symbol. This also means that > I can't disambiguate it by the source file name. > > Is there a syntax to disambiguate the symbol? 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.