From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Philipp Rudo <prudo@linux.vnet.ibm.com>,
Peter Griffin <peter.griffin@linaro.org>,
gdb-patches@sourceware.org, yao.qi@arm.com
Subject: Re: [RFC 0/7] Support for Linux kernel debugging
Date: Fri, 03 Feb 2017 19:46:00 -0000 [thread overview]
Message-ID: <m3inornjl4.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <20170203174521.GC11916@E107787-LIN> (Yao Qi's message of "Fri, 3 Feb 2017 17:45:21 +0000")
On Fri, Feb 03 2017, Yao Qi wrote:
> On 17-01-26 14:12:25, Philipp Rudo wrote:
[...]
>> Andreas and I see the ravenscar-approach as a workaround for
>> limitations in GDB. Thus while discussing it we thought about possible
>> scenarios for the future which would be impossible to implement using
>> this approach. The userspace-on-kernel was just meant to be an example.
>> Other examples would be a Go target where the libthreaddb
>> (POSIX-threads) and Go (goroutines) targets would compete on
>> thread stratum. Or (for switching targets) a program that runs
>> simultaneous on CPU and GPU and needs different targets for both code
>> parts.
>>
>
> IMO, https://sourceware.org/gdb/wiki/MultiTarget is the right way to
> solve such problem. We can have one JTAG remote target debugging kernel,
> and one GDBserver debugging user-space app on that machine.
Interesting thought; I haven't looked much into that yet. This would
only be applicable to live debugging, though, right?
Philipp's and my line of thought was more directed towards an extension
of the current target stack. We considered the possibility to have a
target stack like this:
- goroutine (Goroutine)
- multi-thread (multi-threaded child process.) <-- linux-thread-db
- lk-user (User-space task) <-- focuses on one user-space process
- lk-thread (Linux kernel threads) <-- uses the kernel's task list
- core (Local core dump file) <-- "threads" are actually CPUs
- exec (Local exec file)
- None (None)
I.e., having multiple thread layers stacked one atop another. In this
scenario the user should be able to specify which layer to focus on,
going up and down in the hierarchy. When at the lk-thread layer, "info
threads" would show kernel threads; when at the "goroutine" layer, it
would show the Goroutines of a certain user-space process in the given
system dump. Some of these layers would have their own notion of exec
file, solibs, symbols, etc.
The layers above "core" would generally apply to a running target as
well.
Of course, this is a long-range vision and not something I'd expect to
be implemented as part of the Linux kernel debugging support. For now
we'd just need the lk-thread layer, where mostly just the thread list
needs to be overridden. And such a "thread-only" layering
infrastructure would also be usable for a goroutine layer in a usual
user-space debugging scenario.
--
Andreas
prev parent reply other threads:[~2017-02-03 19:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 11:32 Philipp Rudo
2017-01-12 11:32 ` [RFC 1/7] Convert substitute_path_component to C++ Philipp Rudo
2017-01-12 11:32 ` [RFC 5/7] Add commands for linux-kernel target Philipp Rudo
2017-01-12 11:32 ` [RFC 3/7] Add basic Linux kernel support Philipp Rudo
2017-02-07 10:54 ` Yao Qi
2017-02-07 15:04 ` Philipp Rudo
2017-02-07 17:39 ` Yao Qi
2017-02-09 9:54 ` Philipp Rudo
2017-02-09 13:06 ` Yao Qi
2017-01-12 11:32 ` [RFC 7/7] Add S390 support for linux-kernel target Philipp Rudo
2017-01-12 17:09 ` Luis Machado
2017-01-13 11:46 ` Philipp Rudo
2017-02-06 15:52 ` Yao Qi
2017-02-06 18:48 ` Andreas Arnez
2017-01-12 11:32 ` [RFC 6/7] Add privileged registers for s390x Philipp Rudo
2017-01-12 11:32 ` [RFC 2/7] Add libiberty/concat styled concat_path function Philipp Rudo
2017-01-12 12:00 ` Pedro Alves
2017-01-12 13:33 ` Philipp Rudo
2017-01-12 13:48 ` Pedro Alves
2017-01-12 15:09 ` Philipp Rudo
2017-01-12 15:42 ` Pedro Alves
2017-01-12 12:56 ` [RFC 0/7] Support for Linux kernel debugging Philipp Rudo
2017-01-12 13:02 ` [RFC 4/7] Add kernel module support for linux-kernel target Philipp Rudo
2017-01-25 18:10 ` [RFC 0/7] Support for Linux kernel debugging Peter Griffin
2017-01-26 13:12 ` Philipp Rudo
2017-02-03 17:45 ` Yao Qi
2017-02-03 19:46 ` Andreas Arnez [this message]
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=m3inornjl4.fsf@oc1027705133.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=peter.griffin@linaro.org \
--cc=prudo@linux.vnet.ibm.com \
--cc=qiyaoltc@gmail.com \
--cc=yao.qi@arm.com \
/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