This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][gdb/python] Add interface to access minimal_symbols


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]