public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Peter Griffin <peter.griffin@linaro.org>
Cc: gdb-patches <gdb-patches@sourceware.org>, lee.jones@linaro.org
Subject: Re: RFC GDB Linux Awareness analysis
Date: Thu, 04 Jun 2015 16:32:00 -0000	[thread overview]
Message-ID: <CADPb22QsOz-ToWB+Fp8yoxy0Tecxdae+TbTOEjn0RCHNQjU6YQ@mail.gmail.com> (raw)
In-Reply-To: <20150603142858.GA19370@griffinp-ThinkPad-X1-Carbon-2nd>

On Wed, Jun 3, 2015 at 7:28 AM, Peter Griffin <peter.griffin@linaro.org> wrote:
> Hi GDB community,
>
> Overview
> ========
>
> The purpose of this email is to describe a useful feature which has been developed
> by STMicroelectronics inside of GDB for debugging Linux kernels. I will cover at
> a high level some of the implementation details and what I see as the advantages
> / disadvantages of the implementation. I will also cover some other alternative
> approaches that I'm aware of.
>
> The purpose is to facilitate discussion with the GDB experts on this
> mailing list as to what the "correct" way to implement this functionality would
> be.
>
> The end goal is to have an upstream implementation of this functionality.
>
> ...

Hi.

>
> Questions
>  - Do GDB community mind Linux specific custom commands being added to GDB code base?

In principal, no. But the devil is in the details of course.

gdb already has "info proc foo" to dump bits of /proc.
Plus obviously we encode various linux-specific bits
needed to debug userland apps.

> My current opinion is that helper commands which can be, should be migrated from C code
> into Python, and merged into the kernel source tree (and then retired from the LKD patchset).

I can't speak to what, if anything, "should" live in the kernel tree
(as opposed to somewhere else, but not necessarily in gdb).
Encoding application-specific knowledge in gdb is obviously not ideal,
but then again the kernel is not your average app.

> If you got here, thanks for reading this far! Like I said at the beginning, the purpose of
> this email is to stimulate some discussion on what you folks consider the 'correct' way to
> implement this OS awareness functionality is.

If we can put most/all this in python, awesome.
I wouldn't be opposed to extending gdb's python API to support this
(where appropriate).

Can we proceed by making "do it in python" the default choice,
and then address each issue as needed?

  reply	other threads:[~2015-06-04 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 14:29 Peter Griffin
2015-06-04 16:32 ` Doug Evans [this message]
2015-09-30  8:02   ` Peter Griffin
2015-10-05 18:37     ` Doug Evans

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=CADPb22QsOz-ToWB+Fp8yoxy0Tecxdae+TbTOEjn0RCHNQjU6YQ@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lee.jones@linaro.org \
    --cc=peter.griffin@linaro.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).