Re: [lldb-dev] PTYPE replacement in LLDB

2017-09-12 Thread Greg Clayton via lldb-dev

> On Sep 11, 2017, at 10:10 PM, vignesh balu via lldb-dev 
>  wrote:
> 
> Hi All,
> 
> I see in the command Mapping Documnet, we can use "image lookup -type" in 
> place of "ptype" from gdb. Currently, this can be used only for Type(link 
> int, char) , or gloal, static variable or function symbol.

Another option is:

(lldb) type lookup
> 
> This is not as efficient as GDB, where it  will whole structure if we point 
> to variable.
> Here we have to find the variable type first and then we have to do "image 
> lookup".
> 
> do we have a single command which will do that ?

Not at the moment. 

> If not, shall we implement one or integrating with one of existing command is 
> good ?

The question is where does it belong? We could add it in one of two places as 
far as I see:

(lldb) frame variable --type my_var [my_var2]

The "--type" option (no arguments for the option) would indicate we want to 
dump the types of any variable names listed as arguments to the command.

(lldb) type lookup --variable my_var --variable my_var2

where "--variable " means to look at the type of a variable.

I think both would be useful as they would be easy to add.

Please let me know if anyone has any other ideas.

BTW: it would be easy to add this as a python command for now until we get this 
into lldb. If you want to know more about the lldb commands, let me know.

Greg Clayton.
> 
> thanks,
> vigneshbalu
> 
> 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] PTYPE replacement in LLDB

2017-09-12 Thread Greg Clayton via lldb-dev

> On Sep 11, 2017, at 10:10 PM, vignesh balu via lldb-dev 
>  wrote:
> 
> Hi All,
> 
> I see in the command Mapping Documnet, we can use "image lookup -type" in 
> place of "ptype" from gdb. Currently, this can be used only for Type(link 
> int, char) , or gloal, static variable or function symbol.

Another option is:

(lldb) type lookup
> 
> This is not as efficient as GDB, where it  will whole structure if we point 
> to variable.
> Here we have to find the variable type first and then we have to do "image 
> lookup".
> 
> do we have a single command which will do that ?

Not at the moment. 

> If not, shall we implement one or integrating with one of existing command is 
> good ?

The question is where does it belong? We could add it in one of two places as 
far as I see:

(lldb) frame variable --type my_var [my_var2]

The "--type" option (no arguments for the option) would indicate we want to 
dump the types of any variable names listed as arguments to the command.

(lldb) type lookup --variable my_var --variable my_var2

where "--variable " means to look at the type of a variable.

I think both would be useful as they would be easy to add.

Please let me know if anyone has any other ideas.

BTW: it would be easy to add this as a python command for now until we get this 
into lldb.

> 
> thanks,
> vigneshbalu
> 
> 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] [Lldb-commits] PTYPE replacement in LLDB

2017-09-12 Thread Jim Ingham via lldb-dev
The original plan was to add a "type eval" to go alongside "type lookup".  
"type eval" would take an expression, evaluate it, and then print the resulting 
type.  gdb's type takes either a type name or an expression, but there's no way 
to disambiguate if you have a type that has the same name as a local variable, 
so I'm more inclined to make them separate commands or use options.

Note, gdb also has "whatis" which doesn't do any evaluation, just looks up the 
argument asa name.  That is pretty much the --variable option that Greg 
suggests.  That could be done either by having "type eval" first try local vars 
and then evaluate the expression or by having an explicit "--vars" flag.

Jim



> On Sep 12, 2017, at 11:21 AM, Greg Clayton via lldb-commits 
>  wrote:
> 
> 
>> On Sep 11, 2017, at 10:10 PM, vignesh balu via lldb-dev 
>>  wrote:
>> 
>> Hi All,
>> 
>> I see in the command Mapping Documnet, we can use "image lookup -type" in 
>> place of "ptype" from gdb. Currently, this can be used only for Type(link 
>> int, char) , or gloal, static variable or function symbol.
> 
> Another option is:
> 
> (lldb) type lookup
>> 
>> This is not as efficient as GDB, where it  will whole structure if we point 
>> to variable.
>> Here we have to find the variable type first and then we have to do "image 
>> lookup".
>> 
>> do we have a single command which will do that ?
> 
> Not at the moment. 
> 
>> If not, shall we implement one or integrating with one of existing command 
>> is good ?
> 
> The question is where does it belong? We could add it in one of two places as 
> far as I see:
> 
> (lldb) frame variable --type my_var [my_var2]
> 
> The "--type" option (no arguments for the option) would indicate we want to 
> dump the types of any variable names listed as arguments to the command.
> 
> (lldb) type lookup --variable my_var --variable my_var2
> 
> where "--variable " means to look at the type of a variable.
> 
> I think both would be useful as they would be easy to add.
> 
> Please let me know if anyone has any other ideas.
> 
> BTW: it would be easy to add this as a python command for now until we get 
> this into lldb.
> 
>> 
>> thanks,
>> vigneshbalu
>> 
>> 
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> 
> ___
> lldb-commits mailing list
> lldb-comm...@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] lldb-5.0 on linux not finding lldb-server-5.0.0

2017-09-12 Thread Jim Ingham via lldb-dev
Somebody on stack overflow is reporting:

https://stackoverflow.com/questions/46164427/lldb-is-not-starting-an-application

that they got the 5.0 tools on an Ubuntu system, and lldb is saying:

error: process launch failed: unable to locate lldb-server-5.0.0

when he tries to run a process.  The reporter says there's an lldb-server in 
the package he got, but not an lldb-server-5.0.0.

Did his install just go bad or is this something other folks are seeing?  I 
don't have an Ubuntu system handy to check this out.

Jim

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[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?

Thanks,
Ramana
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev