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

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Thu Feb 14 10:53:14 PST 2019


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 <lldb-dev at lists.llvm.org> wrote:
> 
> 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’, 1).GetValueAtIndex(0)
>  
> When I do `print(ready_tasks)` I get:
> No value
>  
> At the same time, doing the same actions inside lldb embedded interpreter follows to:
> ` print(lldb.target.FindGlobalVariables('pxReadyTasksLists',1).GetValueAtIndex(0))`
>  
> (List_t [5]) pxReadyTasksLists = {
>   [0] = {
>     uxNumberOfItems = 0
>     pxIndex = 0x00000000
>     xListEnd = {
>       xItemValue = 0
>       pxNext = 0x00000000
>       pxPrevious = 0x00000000
>     }
>   }
>>  
> Does anybody know what may cause such a behavior?
> 
> -- 
> Alexander
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190214/47794480/attachment.html>


More information about the lldb-dev mailing list