Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Kieran Bingham <kieran.bingham@linaro.org>
Cc: Yao Qi <yao.qi@linaro.org>,
	gdb@sourceware.org,
	       Peter Griffin <peter.griffin@linaro.org>,
	       Lee Jones <lee.jones@linaro.org>,
	       Russell Wayman <russell.wayman@linaro.org>,
	kernel@stlinux.com,        Jan Kiszka <jan.kiszka@siemens.com>,
	dje@google.com, alnovak@suse.cz
Subject: Re: GDB Linux Awareness revisited
Date: Fri, 29 Jan 2016 19:09:00 -0000	[thread overview]
Message-ID: <m34mdwdwye.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <569D3FCA.1060600@linaro.org> (Kieran Bingham's message of "Mon,	18 Jan 2016 19:40:58 +0000")

On Mon, Jan 18 2016, Kieran Bingham wrote:

> Hi Yao, et al,
>
> I am currently working through the GDB Linux Awareness project, started
> by Peter Griffin and originally discussed in the gdb{,-patches}
> mailinglist in June 2015
>  [https://sourceware.org/ml/gdb-patches/2015-06/msg00040.html]
>
> The main points that I took from that discussion were that it was a
> valuable contribution to make, and that the main focus should be on
> writing the support using the Python Extensions, so my hope is to try to
> extend the python interfaces where possible to maximise the kernel
> specific code living in the kernel.

I am sure everybody agrees that "Linux awareness" would be a valuable
contribution to GDB.  And I doubt that you will encounter much
opposition against adding kernel specific code to GDB, unless it is
actually kernel *version* specific.  IMO, then it depends on the
expected amount of change over time.

Just in case you haven't seen, I presented this slide deck at the last
GNU Tools Cauldron:

  https://gcc.gnu.org/wiki/cauldron2015?action=AttachFile&do=get&target=Andreas+Arnez_+Debugging+Linux+kernel+dumps+with+GDB.pdf

These slides were mainly intended to give food for thought and get the
discussion going.  There were some follow-ups on the GDB mailing list,
e.g.:

  * About the gdb-kdump project:
    https://sourceware.org/ml/gdb/2015-09/threads.html#00014

  * About Linux Awareness and LKD:
    https://sourceware.org/ml/gdb/2015-10/threads.html#00000

[...]

>  * Module Symbol loading and break pointing support
>    - Fairly well supported already by the existing linux.git/scripts/gdb
> work

This only works if the debug target uses *virtual* rather than physical
kernel addresses, right?  Is this typical for the scenarios you want to
support?

[...]

> Support for the frame-unwinders are already exposed via the Python
> API's, however access to the gdb thread_list is not yet available, and
> this is where I will be hacking next.
>
>
> Briefly chatting on IRC, Pedro mentioned that exposing this support
> could help for other runtimes such as Go subroutines, so my hope is that
> this work will be re-usable in other places too.

Right, such a Python interface may be usable for Goroutines.  Here's the
Golang community's current approach to this:

  https://golang.org/src/runtime/runtime-gdb.py

Due to the Python interface's limitations, that script defines a command
"info goroutines" instead of supporting "info threads".  It also offers
a command prefix "goroutine <id>", rather than allowing the user to
switch contexts with "thread <id>".

Also note that gccgo has a different runtime and is not supported by
the script above.

--
Andreas


  reply	other threads:[~2016-01-29 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 19:41 Kieran Bingham
2016-01-29 19:09 ` Andreas Arnez [this message]
2016-02-02  9:15   ` Kieran Bingham

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=m34mdwdwye.fsf@oc1027705133.ibm.com \
    --to=arnez@linux.vnet.ibm.com \
    --cc=alnovak@suse.cz \
    --cc=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kernel@stlinux.com \
    --cc=kieran.bingham@linaro.org \
    --cc=lee.jones@linaro.org \
    --cc=peter.griffin@linaro.org \
    --cc=russell.wayman@linaro.org \
    --cc=yao.qi@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