From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46971 invoked by alias); 27 Nov 2018 18:10:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 46951 invoked by uid 89); 27 Nov 2018 18:10:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=pause, HX-HELO:sk:mail-ed, Hx-spam-relays-external:209.85.208.68, H*RU:209.85.208.68 X-HELO: mail-ed1-f68.google.com Received: from mail-ed1-f68.google.com (HELO mail-ed1-f68.google.com) (209.85.208.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Nov 2018 18:10:19 +0000 Received: by mail-ed1-f68.google.com with SMTP id d39so19786664edb.12 for ; Tue, 27 Nov 2018 10:10:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6TxxfGjtxcVDzA2oiFQmTxQM3rpIK06hVEteKpEke00=; b=S8rDhhJdguHpSdxwtnU3u6b2WLmK4Ms0KrIs92LE5/qKoRxWURts+oAzN1TmpasYcC 2jQARsYuEoPg8BoBz4br0gOzHd0HuK2NtIXgxEBFpHEs2+yYJhHJtpMiDT3t2dzciCax BhbJ5I5SF/kz7UCjcONZq+QBMkIBqDpX6cftW159rvwzqZPEg/wR55ncgtgQfobRDhho YUhIJOGY0mDhY/Q0V437XQJEQnt2kE8ORqjRC9GTuBxLCwMjrVN74Eea5TSx94ZrPcuG CghrfLH12GdsvrfSjoeNXCGDhnJxV+mEIPg7G9bVfeSbrVZqa5BoW6uE4KRHTXCPvz8P UcFQ== MIME-Version: 1.0 References: <20181004211115.GA31056@delia> <39c4336d-c749-6f79-5a29-0b764fc4935e@ericsson.com> <211c4746-389a-93b7-faf9-c8f9b6245541@suse.de> <583cbe68c00a387d0664f918f078e9a8@polymtl.ca> In-Reply-To: <583cbe68c00a387d0664f918f078e9a8@polymtl.ca> From: Matt Rice Date: Tue, 27 Nov 2018 18:10:00 -0000 Message-ID: Subject: Re: [PATCH][gdb/python] Add interface to access minimal_symbols To: Simon Marchi Cc: tdevries@suse.de, Simon Marchi , "gdb-patches@sourceware.org" , Phil Muldoon , Tom Tromey Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00463.txt.bz2 On Mon, Nov 26, 2018 at 1:31 PM Simon Marchi wrote: > > On 2018-10-31 12:59, Tom de Vries wrote: > > AFAIU, the purpose of repr is to print a unique representation, and > > distinct symbols can have the same name, so I went for: > > ... > > > > ... > > for local symbols, dropping the filename=%s part for local symbols. > > Thanks, that make sense. > > The patch looks good to me, but since adding some new Python API is kind > of a big deal (we are stuck with it after), I'd really like if Phil > and/or Tom could give their opinions. Especially since I remember Phil > mentioning he had other plans for minimal symbols... has been a long time since i've looked at the edge cases of minsym filenames, and objfiles. but I seem to recall the filename component being basically useless, and the objfile is not necessarily correct, and lacking the ODR/one definition rule, the name/filename/objfile is not even necessarily unique. perhaps a better uniqueness would be the address of the symbol? i.e. even though the objfile may be wrong, the offset from the previous objfile should still be unique Anyhow if all of this is still the case, it gives me some pause that exposing python seems a bit scary. there were odd symbols in gdb associated with the wrong objfile coming from libdecnumber, of this sort last time saw it, or perhaps it was it the library linked after libdecnumber?