Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Philipp Rudo <prudo@linux.vnet.ibm.com>,
	       Omair Javaid <omair.javaid@linaro.org>,
	       "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
	       Yao Qi <yao.qi@linaro.org>,
	Peter Griffin <peter.griffin@linaro.org>
Subject: Re: [RFC v3 3/8] Add basic Linux kernel support
Date: Fri, 19 May 2017 15:24:00 -0000	[thread overview]
Message-ID: <m3r2zkeup2.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <86d1b5z142.fsf@gmail.com> (Yao Qi's message of "Fri, 19 May 2017	09:45:17 +0100")

On Fri, May 19 2017, Yao Qi wrote:

> Philipp Rudo <prudo@linux.vnet.ibm.com> writes:
>
>> * Implement separate thread_lists.
>>   Allow every target to manage its own thread_list.  Heavy impact for you and a
>>   lot work for me...
>
> Hi Philipp,
> before you spend a lot of time implementing this, it is better to start
> an RFC discussion on an appropriate time, so that people can well
> understand why do we need this change.

FYI, I have just started investigating this a bit.

The reason for multiple thread lists has been covered in some of the
discussions already, but let me give my few cents.

In the kernel live debug scenario we conceptually have two different
thread models layered on top of each other:

* LK target: Thread == Linux kernel thread
* Remote target: Thread == CPU

If we represent CPUs and Linux threads in a single thread list, then it
becomes difficult to maintain consistency between the LK target and the
remote target: Who owns which parts of the thread_info?  How to
guarantee unique ptids across the board, etc.?  Not to speak of the
confusing "info threads" output if CPUs and threads are munged
together.

Unfortunately many places in GDB assume that there is just one thread
list, one active target and one current inferior/thread.  In order to
maintain multiple thread lists cleanly, we probably have to lift these
restrictions and get rid of the global variables current_target,
thread_list, inferior_ptid, etc., or most of their uses.  That's my
preliminary conclusion, anyway.  Alternate suggestions are welcome.

--
Andreas


  reply	other threads:[~2017-05-19 15:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 16:57 [RFC v3 0/8] Support for Linux kernel debugging Philipp Rudo
2017-03-16 16:57 ` [RFC v3 1/8] Convert substitute_path_component to C++ Philipp Rudo
2017-04-20 20:02   ` Sergio Durigan Junior
2017-05-03 16:20     ` Philipp Rudo
2017-03-16 16:58 ` [RFC v3 5/8] Add commands for linux-kernel target Philipp Rudo
2017-03-16 16:58 ` [RFC v3 3/8] Add basic Linux kernel support Philipp Rudo
2017-04-16 22:59   ` Omair Javaid
2017-05-03 14:38     ` Philipp Rudo
2017-04-20 11:09   ` Omair Javaid
2017-04-24 15:24     ` Andreas Arnez
2017-05-03 14:13       ` Omair Javaid
2017-05-03 15:20         ` Philipp Rudo
2017-05-03 14:38     ` Philipp Rudo
2017-05-02 11:14   ` Yao Qi
2017-05-03 15:36     ` Philipp Rudo
2017-05-07 23:54       ` Omair Javaid
     [not found]         ` <20170508132204.7a733dc2@ThinkPad>
     [not found]           ` <CADrjBPqijRQFH4jthAedFzOzMLchpyvM53aXc9grOCjS2YUNCw@mail.gmail.com>
2017-05-10  9:03             ` Philipp Rudo
2017-05-10  9:36           ` Philipp Rudo
2017-05-19  8:45           ` Yao Qi
2017-05-19 15:24             ` Andreas Arnez [this message]
2017-05-19 16:28               ` John Baldwin
2017-05-19 17:05                 ` Andreas Arnez
2017-05-19 17:40                   ` John Baldwin
2017-05-22 10:18                     ` Andreas Arnez
2017-03-16 16:58 ` [RFC v3 6/8] Seperate common s390-tdep.* from s390-linux-tdep.* Philipp Rudo
2017-03-16 16:58 ` [RFC v3 7/8] Add privileged registers for s390x Philipp Rudo
2017-03-16 16:58 ` [RFC v3 4/8] Add kernel module support for linux-kernel target Philipp Rudo
2017-05-02 13:15   ` Yao Qi
2017-05-03 16:16     ` Philipp Rudo
2017-05-05 21:33       ` Yao Qi
2017-05-08  9:18         ` Philipp Rudo
2017-05-08 13:05           ` Yao Qi via gdb-patches
2017-03-16 16:58 ` [RFC v3 8/8] Add S390 " Philipp Rudo
2017-03-16 16:58 ` [RFC v3 2/8] Add libiberty/concat styled concat_path function Philipp Rudo

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=m3r2zkeup2.fsf@oc1027705133.ibm.com \
    --to=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=omair.javaid@linaro.org \
    --cc=peter.griffin@linaro.org \
    --cc=prudo@linux.vnet.ibm.com \
    --cc=qiyaoltc@gmail.com \
    --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