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 2/4] Add Jeff Mahoney's py-crash patches.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/3/16 1:30 PM, Doug Evans wrote:
> On Wed, Feb 3, 2016 at 9:55 AM, Jeff Mahoney <jeffm@suse.com>
> wrote:
>> ...
>>>> Hi.
>>> 
>>> Hi Doug -
>>> 
>>>> Part of what this patch is doing is exporting bfd to python. 
>>>> E.g., all the SEC_* constants.
>>> 
>>>> As a rule we absolutely discourage people from using bfd
>>>> outside of the the binutils+gdb source tree. Either this rule
>>>> needs to change, or I don't think we can allow this patch.
>>>> I'd be interested to hear what others in the community
>>>> think.
>>> 
>>> That's unfortunate.  The Linux kernel uses ELF sections for a 
>>> number of purposes.  Most notably is the definition of per-cpu 
>>> variables. Without the ELF section, we can't resolve the
>>> addresses for the variables.  So, from our perspective, it's a
>>> requirement.
>>> 
>>>> For myself, I would much rather export ELF separately (e.g.,
>>>> a separate python API one can use independent of any
>>>> particular tool, including gdb), and then have gdb provide
>>>> the necessary glue to use this API. [I can imagine some
>>>> compromises being needed, at least for now; e.g., it'd be
>>>> cumbersome to read in all ELF symbols twice. But fixing that
>>>> is just an optimization.]
>>> 
>>> Ok, that's doable.  As it is, the section code mixes GDB and
>>> BFD pretty heavily.  It shouldn't be too difficult to separate
>>> the two out and push the section stuff into a new BFD python
>>> interface and associate the objfiles with it.
>> 
>> And here's what I've come up with.  Does this constitute enough
>> of a separation?  It /should/ cross over into the BFD code in the
>> same way that the GDB code does: As soon as we hit a bfd object
>> or a bfd_section object, we call into bfd's new python API to
>> generate the objects.
>> 
>> https://jeffm.io/git/cgit.cgi/gnu/binutils-gdb/log/?h=gdb/python-bfd
>>
>>
>> 
For the fully-integrated kdump work, use the python-bfd-kdump branch
>> (or SUSE folks, python-bfd-kdump-buildid will pick up the
>> separate debuginfos as we usually expect).
> 
> Separation isn't the issue, unfortunately. The issue is that we
> cannot export bfd to python, period.
> 
> I'm certainly open to others convincing me I'm wrong. But that is
> my understanding. What we can do is export ELF, and that is what
> I'd like to see.

Ok, so looking at this again, I don't need full section information.
I just need a name.   Would it be acceptable to just export the name
of the section via gdb.Symbol and my new gdb.MinSymbol instead?

- -Jeff

- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJWslUlAAoJEB57S2MheeWy2KYP/0t+pzbrp9blhgMF2JBKkqhD
ZM+RbVZFaQysJdINqeTZcF9lYkg7f0eJ0Xi6+3/6+zniTDAKtvxIHlgq15cO1itM
XrUAArhedT684Klm80BL8PUp10pamTyFO34p4EdKVeWajWXIt8UWxo+wQv9nvldA
J163npwniBYk7ZsoNz13RvtRLyL1BOQEhh/xoODAs8SJGm8MRpydLw4QNRN+KTb5
NkSCXuh0cORz0/KN6yugsR4SZ/JnBovm0iIQu47IiZbVG0SbQk5thtF002ejojL4
O5KOSQxW5wfcWNbBo79bw45+S+MPBpEZItPXaXeiFZBBL7agYEmCO50+iKv93xLw
0f1MPA6GuJjM3yLld+ONPFnrC3Mw/CVPBkuxUgVwQedzGUkRJ7zzGVvGbnSmzvyI
YIVXea4u4YG4Lk/d0+XTozfNfrm5kRfvtVckX3ThVMDyKIacJyVLGGKDHV5UvRlh
oUOPUeiwaOyPqY46gyNepuY7tebg10ykeso5TpMqrJVwUfL0Ri4jIKKVSYvvvG7U
9M748VB/an1idysIZ9z1D7gIbs11L+jeq44Hy2AJe0nfVdsJKXy6NjCKrW1vXlKA
X5gP85oPe89iACtRE3TlBbl916dsW67GHP6oUvCpKseliqsevRuUsC8/gukpFOpe
e6V1i8k5z+2doLxHv7by
=b8yC
-----END PGP SIGNATURE-----


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