public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Matt Rice <ratmice@gmail.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: tdevries@suse.de, Simon Marchi <simon.marchi@ericsson.com>,
		"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Phil Muldoon <pmuldoon@redhat.com>, 	Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH][gdb/python] Add interface to access minimal_symbols
Date: Tue, 27 Nov 2018 18:10:00 -0000	[thread overview]
Message-ID: <CACTLOFqZL=Jbfs20rSqF+k8yiE0uqrmNJXYMsrWnRAzUER5iEw@mail.gmail.com> (raw)
In-Reply-To: <583cbe68c00a387d0664f918f078e9a8@polymtl.ca>

On Mon, Nov 26, 2018 at 1:31 PM Simon Marchi <simon.marchi@polymtl.ca> 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:
> > ...
> > <gdb.MinSymbol name=%s filename=%s objfile=%s>
> > ...
> > 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?

  reply	other threads:[~2018-11-27 18:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 21:11 Tom de Vries
2018-10-05  4:43 ` Simon Marchi
2018-10-31 16:59   ` Tom de Vries
2018-11-26 11:17     ` [PING][PATCH][gdb/python] " Tom de Vries
2018-11-26 21:31     ` [PATCH][gdb/python] " Simon Marchi
2018-11-27 18:10       ` Matt Rice [this message]
2018-11-29 22:32     ` Tom Tromey
2018-11-29 22:12   ` Tom Tromey
2018-10-05  6:46 ` Eli Zaretskii
2018-10-31 17:02   ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACTLOFqZL=Jbfs20rSqF+k8yiE0uqrmNJXYMsrWnRAzUER5iEw@mail.gmail.com' \
    --to=ratmice@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=simon.marchi@ericsson.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).