From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42000 invoked by alias); 26 Aug 2019 16:34:58 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 41471 invoked by uid 89); 26 Aug 2019 16:34:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=frame.name, sk:gdbpar, UD:gdb.parse_and_eval, gdb-dashboard X-HELO: mail-oi1-f174.google.com Received: from mail-oi1-f174.google.com (HELO mail-oi1-f174.google.com) (209.85.167.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Aug 2019 16:34:57 +0000 Received: by mail-oi1-f174.google.com with SMTP id l2so12608683oil.0 for ; Mon, 26 Aug 2019 09:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S/gA/fkW9qt8Y0bHJM8qtFg3T0T2FnFVzcJTnGR2oBY=; b=L3ECHvsXR9pbtyaXoAy9c3tGI0l95Je/QY1pcPkiGt5U5MoxeK4bfE5N2PsAi0znip PO77L+FvFZFb1ORqm9WFyCU45eSGh0+pjrBo3Luiur6jARhzoQI5h3+sbIWDV+41dRiC MkVRQKnkGTjZ3plHUtnKfcejHhYgL2hikzgyN8FKgjLFha3M3IHG9d2Ixy58CdhK5FCu EDKO8L+RedGfFmjHS/QekSe2NGqZrPdE0X5vOsKBLeRXKzvZTDUnskAO7UL9RGmaAlCo eSROY5gFIPmJU+xsAcI2kO6TH6zvPkuX4zKt8x44JK+LXS4MYhhPlfcfxmUOW5eYxd0d rTiA== MIME-Version: 1.0 References: In-Reply-To: From: "Christian Biesinger via gdb" Reply-To: Christian Biesinger Date: Mon, 26 Aug 2019 16:34:00 -0000 Message-ID: Subject: Re: Function address incoherence To: Andrea Cardaci Cc: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00043.txt.bz2 On Sat, Aug 24, 2019 at 5:27 AM Andrea Cardaci wrote: > Back to the gdb-dashboard issue, I fetch the function address with > gdb.parse_and_eval(frame.name()).address and since frame.name() is > _start, the address that I obtain is 0x80482e0 instead of 0xb7fdba20 > thus I end up displaying wrong offsets. Why don't you use frame.function() and get the address from there? (and why parse_and_eval instead of lookup_symbol?) On GDB trunk, you can look up symbols per-objfile, which can help if multiple files have the same symbol. Christian