[Lldb-commits] [lldb-dev] PTYPE replacement in LLDB
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 12 11:21:14 PDT 2017
> On Sep 11, 2017, at 10:10 PM, vignesh balu via lldb-dev <lldb-dev at lists.llvm.org> 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 <VARNAME>" 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.
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
More information about the lldb-commits