Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-25 Thread Ramana via lldb-dev
ail.com] >> Sent: Friday, September 22, 2017 6:24 AM >> To: Ted Woodward >> Cc: Greg Clayton ; lldb-dev@lists.llvm.org >> Subject: Re: [lldb-dev] lldb_private::RegisterContext vs >> lldb_private::RegisterInfoInterface >> >> If I may ask, among the options

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-22 Thread Ted Woodward via lldb-dev
ember of Code Aurora Forum, > > a Linux Foundation Collaborative Project > > > >> -Original Message- > >> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of > >> Greg Clayton via lldb-dev > >> Sent: Thursday, September 21,

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-22 Thread Ramana via lldb-dev
lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Greg >> Clayton via lldb-dev >> Sent: Thursday, September 21, 2017 10:10 AM >> To: Ramana >> Cc: lldb-dev@lists.llvm.org >> Subject: Re: [lldb-dev] lldb_private::RegisterContext vs >> lldb_private::Regis

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-22 Thread Ramana via lldb-dev
On Thu, Sep 21, 2017 at 8:40 PM, Greg Clayton wrote: > >> On Sep 21, 2017, at 5:15 AM, Ramana wrote: >> >> Sorry, I could not respond yesterday as I was of out of office. >> >>> Interesting. There are two ways to accomplish this: >>> 1 - Treat the CPU as one target and the GPU as another. >>> 2 -

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-21 Thread Ted Woodward via lldb-dev
t; Sent: Thursday, September 21, 2017 10:10 AM > To: Ramana > Cc: lldb-dev@lists.llvm.org > Subject: Re: [lldb-dev] lldb_private::RegisterContext vs > lldb_private::RegisterInfoInterface > > > > On Sep 21, 2017, at 5:15 AM, Ramana > wrote: > > > > Sorry,

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-21 Thread Greg Clayton via lldb-dev
> On Sep 21, 2017, at 5:15 AM, Ramana wrote: > > Sorry, I could not respond yesterday as I was of out of office. > >> Interesting. There are two ways to accomplish this: >> 1 - Treat the CPU as one target and the GPU as another. >> 2 - Treat the CPU and GPU as one target >> >> The tricky thing

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-21 Thread Ramana via lldb-dev
Sorry, I could not respond yesterday as I was of out of office. > Interesting. There are two ways to accomplish this: > 1 - Treat the CPU as one target and the GPU as another. > 2 - Treat the CPU and GPU as one target > > The tricky things with solution #1 is how to manage switching the targets >

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-19 Thread Greg Clayton via lldb-dev
> On Sep 19, 2017, at 3:32 AM, Ramana wrote: > > Thank you so much Greg for your comments. > >> What architecture and os are you looking to support? > > The OS is Linux and the primary use scenario is remote debugging. > Basically http://lists.llvm.org/pipermail/lldb-dev/2017-June/012445.html

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-19 Thread Ramana via lldb-dev
Thank you so much Greg for your comments. > What architecture and os are you looking to support? The OS is Linux and the primary use scenario is remote debugging. Basically http://lists.llvm.org/pipermail/lldb-dev/2017-June/012445.html is what I am trying to achieve and unfortunately that query d

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-19 Thread Ramana via lldb-dev
orum, a > Linux Foundation Collaborative Project > >> -Original Message- >> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Greg >> Clayton via lldb-dev >> Sent: Monday, September 18, 2017 10:16 AM >> To: Ramana >> Cc: lldb-dev@li

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-18 Thread Ted Woodward via lldb-dev
vm.org] On Behalf Of Greg > Clayton via lldb-dev > Sent: Monday, September 18, 2017 10:16 AM > To: Ramana > Cc: lldb-dev@lists.llvm.org > Subject: Re: [lldb-dev] lldb_private::RegisterContext vs > lldb_private::RegisterInfoInterface > > When supporting a new architecture, ou

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-18 Thread Greg Clayton via lldb-dev
When supporting a new architecture, our preferred route is to modify lldb-server (a GDB server binary that supports native debugging) to support your architecture. Why? Because this gets you remote debugging for free. If you go this route, then you will subclass a lldb_private::NativeRegisterCon

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-16 Thread Ramana via lldb-dev
Thank you Greg for the detailed response. Can you please also shed some light on the NativeRegisterContext. When do we need to subclass NativeRegisterContext and (how) are they related to RegisterContext_? It appears that not all architectures having RegisterContext_ have sub classed NativeRegiste

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-16 Thread Ramana via lldb-dev
na > > -Original Message- > From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Ramana > via lldb-dev > Sent: Wednesday, 13 September, 2017 9:00 AM > To: lldb-dev@lists.llvm.org > Subject: [lldb-dev] lldb_private::RegisterContext vs > lldb_private:

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-14 Thread Greg Clayton via lldb-dev
Seems like this class was added for testing. RegisterInfoInterface is a class that creates a common API for getting lldb_private::RegisterInfo structures. A RegisterContext_ class uses one of these to be able to create a buffer large enough to store all registers defined in the RegisterInfoInt

Re: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-13 Thread Tatyana Krasnukha via lldb-dev
Wednesday, 13 September, 2017 9:00 AM To: lldb-dev@lists.llvm.org Subject: [lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface Hi, When deriving RegisterContext_, why some platforms (Arch+OS) are deriving it from lldb_private::RegisterContext while others are der

[lldb-dev] lldb_private::RegisterContext vs lldb_private::RegisterInfoInterface

2017-09-12 Thread Ramana via lldb-dev
Hi, When deriving RegisterContext_, why some platforms (Arch+OS) are deriving it from lldb_private::RegisterContext while others are deriving from lldb_private::RegisterInfoInterface or in other words how to decide on the base class to derive from between those two and what are the implications?