From: Omair Javaid <omair.javaid@linaro.org>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Philipp Rudo <prudo@linux.vnet.ibm.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Yao Qi <yao.qi@linaro.org>,
Peter Griffin <peter.griffin@linaro.org>,
Andreas Arnez <arnez@linux.vnet.ibm.com>
Subject: Re: [RFC v4 3/9] Add basic Linux kernel support
Date: Mon, 19 Jun 2017 13:35:00 -0000 [thread overview]
Message-ID: <CANW4E-0BPpSUbM51fS5_b3hiYtnG5M4OAM1OPmD3GMm3CxL3_g@mail.gmail.com> (raw)
In-Reply-To: <8637awpanu.fsf@gmail.com>
On 19 June 2017 at 14:52, Yao Qi <qiyaoltc@gmail.com> wrote:
> Philipp Rudo <prudo@linux.vnet.ibm.com> writes:
>
>>> Sorry, I don't understand this design. Can you elaborate?
>>
>> The target beneath reports us a "pid" it thinks is right. For example in a core
>> file the register sections are usually named
>>
>> .reg/XXX
>>
>> where XXX names the thread these registers belong to. In user space this is
>> typically the pid of the thread but for kernel dumps it usually is a cpu-id
>> (this needn't be the logical cpu-id used in the kernel). Because of that the
>> kernel ptid, we generate from task_struct, usually has a different lwp than the
>> same thread reported from the target beneath. Nevertheless we need the target
>> beneath to give us information for running tasks. That's why we need to
>> introduce a mapping between the ptid of the target beneath and the kernel ptid.
>>
>> In short, this represents two different thread views (hardware vs. software
>> threads).
>>
>> Did that answer your question? Or did you mean something different?
>>
>
> Can we use thread_info.priv to store these information rather than using
> ptid_t?
>
>>> > +
>>> > +/* Private data struct to map between our and the target beneath PTID. */
>>> > +
>>> > +struct lk_ptid_map
>>> > +{
>>> > + struct lk_ptid_map *next;
>>>
>>> Can you use C++ stl list instead?
>>
>> As I already wrote Omair, my ptid_map was only meant to "somehow work" but
>> never to be permanent. Managing the ptid map will be the main task for live
>> debugging. That's why I think it is best when Omair changes this bit to
>> whatever he needs.
Hi Phillip,
I have sent you my changes where I have also changed lk_ptid_map to a
c++ map data type.
Please have a look at those before making any further changes to your patches.
Thanks!
>
> The lk_ptid_map is a list, and this patch still iterates it. We need to
> use C++ stl list, rather than leave it to someone else who does the
> related work later.
>
> --
> Yao (齐尧)
next prev parent reply other threads:[~2017-06-19 13:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 17:08 [RFC v4 0/9] Support for Linux kernel debugging Philipp Rudo
2017-06-12 17:08 ` [RFC v4 4/9] Add kernel module support for linux-kernel target Philipp Rudo
2017-06-12 17:08 ` [RFC v4 7/9] Add privileged registers for s390x Philipp Rudo
2017-06-19 13:34 ` Yao Qi
2017-06-19 15:46 ` Philipp Rudo
2017-06-12 17:08 ` [RFC v4 1/9] Convert substitute_path_component to C++ Philipp Rudo
2017-06-12 17:08 ` [RFC v4 3/9] Add basic Linux kernel support Philipp Rudo
2017-06-15 15:23 ` Yao Qi
2017-06-16 10:10 ` Philipp Rudo
2017-06-16 11:43 ` Pedro Alves
2017-06-19 7:56 ` Philipp Rudo
2017-06-19 9:52 ` Yao Qi
2017-06-19 13:35 ` Omair Javaid [this message]
2017-06-19 15:44 ` Philipp Rudo
2017-06-12 17:08 ` [RFC v4 2/9] Add libiberty/concat styled concat_path function Philipp Rudo
2017-06-12 17:08 ` [RFC v4 5/9] Add commands for linux-kernel target Philipp Rudo
2017-06-12 17:08 ` [RFC v4 8/9] Link frame_info to thread_info Philipp Rudo
2017-06-19 13:07 ` Yao Qi
2017-06-19 15:46 ` Philipp Rudo
2017-06-12 17:09 ` [RFC v4 6/9] Separate common s390-tdep.* from s390-linux-tdep.* Philipp Rudo
2017-06-12 17:39 ` [RFC v4 9/9] Add S390 support for linux-kernel target Philipp Rudo
2017-06-19 13:20 ` Yao Qi
2017-06-19 15:45 ` Philipp Rudo
2017-06-12 21:17 ` 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=CANW4E-0BPpSUbM51fS5_b3hiYtnG5M4OAM1OPmD3GMm3CxL3_g@mail.gmail.com \
--to=omair.javaid@linaro.org \
--cc=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@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