From: Jeff Mahoney <jeffm@suse.com>
To: Doug Evans <dje@google.com>
Cc: Ales Novak <alnovak@suse.cz>, gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/4] Add Jeff Mahoney's py-crash patches.
Date: Wed, 03 Feb 2016 19:29:00 -0000 [thread overview]
Message-ID: <56B25525.1000708@suse.com> (raw)
In-Reply-To: <CADPb22Q2G2_2LVGfkzLtj-445zR3TZKgLw-XsQPbdfoF2Z2bSg@mail.gmail.com>
-----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-----
next prev parent reply other threads:[~2016-02-03 19:29 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-31 21:45 Enable gdb to open Linux kernel dumps Ales Novak
2016-01-31 21:45 ` [PATCH 4/4] Minor cleanups Ales Novak
2016-01-31 21:45 ` [PATCH 1/4] Create new target "kdump" which uses libkdumpfile: https://github.com/ptesarik/libkdumpfile to access contents of compressed kernel dump Ales Novak
2016-02-04 12:40 ` Pedro Alves
2016-02-04 12:45 ` Ales Novak
2016-01-31 21:45 ` [PATCH 2/4] Add Jeff Mahoney's py-crash patches Ales Novak
2016-02-01 12:35 ` Kieran Bingham
2016-02-01 22:23 ` Doug Evans
2016-02-02 2:56 ` Jeff Mahoney
2016-02-02 8:25 ` Kieran Bingham
2016-02-03 17:55 ` Jeff Mahoney
2016-02-03 18:31 ` Doug Evans
2016-02-03 19:29 ` Jeff Mahoney [this message]
2016-02-04 17:25 ` Petr Tesarik
2016-02-04 18:32 ` Matt Rice
2016-02-04 22:27 ` Doug Evans
2016-01-31 21:45 ` [PATCH 3/4] Add SLAB allocator understanding Ales Novak
2016-02-01 13:21 ` Kieran Bingham
2016-02-01 22:30 ` Doug Evans
2016-02-02 2:05 ` Ales Novak
2016-02-02 7:22 ` Jan Kiszka
2016-02-02 13:22 ` Petr Tesarik
2016-02-02 14:42 ` Jeff Mahoney
2016-02-02 8:11 ` Kieran Bingham
2016-02-02 10:04 ` Vlastimil Babka
2016-02-01 11:27 ` Enable gdb to open Linux kernel dumps Kieran Bingham
2016-02-01 11:51 ` Kieran Bingham
2016-02-01 14:32 ` Ales Novak
2016-02-01 15:01 ` Jeff Mahoney
2016-02-02 9:12 ` Kieran Bingham
2016-02-10 3:24 ` Jeff Mahoney
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=56B25525.1000708@suse.com \
--to=jeffm@suse.com \
--cc=alnovak@suse.cz \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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).