From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20836 invoked by alias); 26 Aug 2019 07:55:36 -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 20806 invoked by uid 89); 26 Aug 2019 07:55:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=Key, 0xb7fdba20, U*schwab X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Aug 2019 07:55:33 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A2AC5ACC3; Mon, 26 Aug 2019 07:55:31 +0000 (UTC) From: Andreas Schwab To: Andrea Cardaci Cc: gdb@sourceware.org Subject: Re: Function address incoherence References: X-Yow: I'm protected by a ROLL-ON I rented from AVIS.. Date: Mon, 26 Aug 2019 07:55:00 -0000 In-Reply-To: (Andrea Cardaci's message of "Sat, 24 Aug 2019 12:27:09 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-08/txt/msg00038.txt.bz2 On Aug 24 2019, Andrea Cardaci wrote: > As you can see, $pc points to 0xb7fdba20 and the disassemble commands > reports that it is part of _start, yet if I print the address of > _start I obtain a different value (0x80482e0). (Using the disassemble > command is just an example, simply printing $pc shows 0xb7fdba20 > <_start>.) The disassembler can chose the nearest symbols, but the expression evaluator needs to resolve it to a single address, so it can only chose one of the them. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."