Re: [lldb-dev] [RFC] OS awareness in LLDB

2019-07-13 Thread Alexander Polyakov via lldb-dev
ul 13, 2019 at 1:01 AM Greg Clayton wrote: > > > On Apr 3, 2019, at 10:05 AM, Alexander Polyakov via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > > Hi lldb-dev, > > Currently I'm working on an OS plug-in for multiple operating systems and > architect

Re: [lldb-dev] [RFC] Having common Python OS Plug-in

2019-04-17 Thread Alexander Polyakov via lldb-dev
the > Python code for the OS plugin. If you're going to make some common > utilities you might have a look at what that one does if you haven't > already. > > Jim > > > > On Apr 17, 2019, at 11:37 AM, Alexander Polyakov via lldb-dev < > lldb-dev@lists.llvm.org

[lldb-dev] [RFC] Having common Python OS Plug-in

2019-04-17 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, The last few months, I was implementing a LLDB OS Python plug-in. It seems that there are functionality that is duplicated across many OS plug-ins. I think we can change that by, for example, upstreaming to LLDB an OS python plug-in which can be used by all clients and may contain a l

Re: [lldb-dev] [RFC] OS awareness in LLDB

2019-04-09 Thread Alexander Polyakov via lldb-dev
Gentle ping. On Wed, Apr 3, 2019 at 8:05 PM Alexander Polyakov wrote: > Hi lldb-dev, > > Currently I'm working on an OS plug-in for multiple operating systems and > architectures, during my work, I noted a few moments I want to discuss with > the community. > > 1) Adding RegisterContext to SB AP

[lldb-dev] [RFC] OS awareness in LLDB

2019-04-03 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, Currently I'm working on an OS plug-in for multiple operating systems and architectures, during my work, I noted a few moments I want to discuss with the community. 1) Adding RegisterContext to SB API: if you want your OS plug-in to support multiple architectures you need to impl

Re: [lldb-dev] SBValue::GetName returns wrong result?

2019-04-01 Thread Alexander Polyakov via lldb-dev
from a pointer > via SBTarget::CreateValueFromExpression. > > > > > > > > > > > > On Mon, Apr 1, 2019 at 9:35 PM Jim Ingham wrote: > > > Dereference returns another SBValue distinct from the initial one, so > it needs to make up a name for it. I th

Re: [lldb-dev] SBValue::GetName returns wrong result?

2019-04-01 Thread Alexander Polyakov via lldb-dev
eFromExpression. > > > > > > > > On Mon, Apr 1, 2019 at 9:35 PM Jim Ingham wrote: > > Dereference returns another SBValue distinct from the initial one, so it > needs to make up a name for it. I think it would be confusing for it to > return the same name, and pu

Re: [lldb-dev] SBValue::GetName returns wrong result?

2019-04-01 Thread Alexander Polyakov via lldb-dev
rete problem? > > Jim > > > > On Mar 30, 2019, at 11:18 AM, Alexander Polyakov via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > > > > Hi lldb-dev, > > > > I have a SBValue created via > SBTarget.CreateValueFromExpression('some_name', e

[lldb-dev] SBValue::GetName returns wrong result?

2019-03-30 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, I have a SBValue created via SBTarget.CreateValueFromExpression('some_name', expr). If the expression looks like '(some_type *) addr', then GetName returns 'some_name' as expected, but when I do Dereference this value, GetName returns '*some_name'. So, is it a conventional behavior o

Re: [lldb-dev] SB API is not working properly with OSPython plugin

2019-02-21 Thread Alexander Polyakov via lldb-dev
simple example showing the failure and I’ll have a >>> look? >>> >>> Jim >>> >>> >>> On Feb 14, 2019, at 11:10 AM, Alexander Polyakov >>> wrote: >>> >>> It is, the error is: *error: error: process must be stopped.* &g

Re: [lldb-dev] SB API is not working properly with OSPython plugin

2019-02-14 Thread Alexander Polyakov via lldb-dev
akov >> wrote: >> >> It is, the error is: *error: error: process must be stopped.* >> >> I thought that the plugin (get_thread_info in my case) is invoked when >> the process is already stopped, but it's not. Is it ok? >> >> On Thu, Feb 14, 2

Re: [lldb-dev] SB API is not working properly with OSPython plugin

2019-02-14 Thread Alexander Polyakov via lldb-dev
eb 14, 2019 at 9:53 PM Jim Ingham wrote: > >> All SBValues have an error in them (SBValue.GetError). Does that say >> anything interesting? >> >> Jim >> >> >> >> >> On Feb 14, 2019, at 10:08 AM, Alexander Polyakov via lldb-dev < &g

Re: [lldb-dev] SB API is not working properly with OSPython plugin

2019-02-14 Thread Alexander Polyakov via lldb-dev
GetError). Does that say > anything interesting? > > Jim > > > > > On Feb 14, 2019, at 10:08 AM, Alexander Polyakov via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > > Hi lldb-dev, > > I work on a custom implementation of OperatingSystem plugin using

[lldb-dev] SB API is not working properly with OSPython plugin

2019-02-14 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, I work on a custom implementation of OperatingSystem plugin using Python and SB API. I’m trying to fetch information about some variables from the target into the plugin, to do that I’m using the following Python code: ready_tasks = self._target.FindGlobalVariables(‘pxReadyTasksLists

Re: [lldb-dev] OperatingSystem plugin

2018-12-26 Thread Alexander Polyakov via lldb-dev
> As for why this is done with Python and not the C++ SB API's, there's >> nothing to stop it from also being in C++, you can actually write loadable >> C++ plugins with the SB API's for data formatters, for instance. But >> there's generally no significant pe

Re: [lldb-dev] OperatingSystem plugin

2018-12-20 Thread Alexander Polyakov via lldb-dev
> there's generally no significant performance advantage to doing that, and > its less convenient, so there just hasn't been much demand for it. > > Jim > > > > On Dec 19, 2018, at 12:44 PM, Alexander Polyakov via lldb-dev < > lldb-dev@lists.llvm.org> wrote:

[lldb-dev] OperatingSystem plugin

2018-12-19 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, Could someone explain me why do we use python (OperatingSystemPython) to describe OS objects like threads? What are the advantages of such an approach in comparison to C++ used in Platform plugin for example? IMO, the OperatingSystem plugin could be more like the Platform one, it coul

Re: [lldb-dev] [RFC] Adding FreeRTOS platform

2018-12-15 Thread Alexander Polyakov via lldb-dev
I found out that there will not be “out-of-the-box” threads/tasks support since the lldb doesn’t know anything about thread’s structure. It seems that to have it works I need to implement the OperatingSystem plugin for the specific OS. Is it right? If yes, is it enough? сб, 15 дек. 2018 г. в 16:45

[lldb-dev] [RFC] Adding FreeRTOS platform

2018-12-15 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, As part of my Bachelor's thesis, I'm going to add a new platform to LLDB (FreeRTOS in my case) to perform a kernel debugging. Is there a documentation about adding a new platform? As far as I know, my case is similar to PlatformDarwinKernel, so I need to do the similar things: 1) add

Re: [lldb-dev] [RFC] OS Awareness in LLDB

2018-11-11 Thread Alexander Polyakov via lldb-dev
l things like std::mutex, etc. >> >>> >> >>> On Wed, Oct 31, 2018 at 12:29 PM, Alexander Polyakov < >> polyakov@gmail.com> wrote: >> >>> Looks like I don't completely understand what is the difference >> between user-mode and kerne

Re: [lldb-dev] [RFC] OS Awareness in LLDB

2018-11-01 Thread Alexander Polyakov via lldb-dev
is? > >>> > >>> On Wed, Oct 31, 2018 at 10:22 PM Zachary Turner > wrote: > >>> I don’t totally agree with this. I think there are a lot of useful os > awareness tasks in user mode. For example, you’re debugging a deadlock and > want to understand the st

Re: [lldb-dev] [RFC] OS Awareness in LLDB

2018-10-31 Thread Alexander Polyakov via lldb-dev
do > is to describe OS' model (thread's or task's structure for example). I > think that is how it might be done in LLDB. > > > > On Wed, Oct 31, 2018 at 9:26 PM Leonard Mosescu > wrote: > > Hi Alexander, are you interested in user-mode, kernel-mode debug

Re: [lldb-dev] [RFC] OS Awareness in LLDB

2018-10-31 Thread Alexander Polyakov via lldb-dev
rence > On Wed, Oct 31, 2018 at 12:08 PM Alexander Polyakov via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > >> Hi Leonard, >> >> I think it will be kernel-mode debugging since debugging an application >> in user mode is not an OS awareness imo. Of course

Re: [lldb-dev] [RFC] OS Awareness in LLDB

2018-10-31 Thread Alexander Polyakov via lldb-dev
bugger/index> > (windbg > & co.). This is not surprising since the tools were developed alongside > Windows. Obviously they are specific to Windows, but it's good example of > how the OS-awareness might look like. > > > On Mon, Oct 29, 2018 at 11:37 AM, Alexander Polyak

[lldb-dev] [RFC] OS Awareness in LLDB

2018-10-29 Thread Alexander Polyakov via lldb-dev
Hi lldb-dev, I'm a senior student at Saint Petersburg State University. The one of my possible diploma themes is "OS Awareness in LLDB". Generally, the OS awareness extends a debugger to provide a representation of the OS threads - or tasks - and other relevant data structures, typically semaphore