In bug 24074, the type information is not shown
correctly. This commit includes the following -
-> Changes for displaying correct type based on
current lexical scope for the command "image lookup -t"
-> The corresponding testcase.
Paths
| Differential D12404
Testcase and fix for bug 24074 ClosedPublic Authored by ravitheja on Aug 27 2015, 4:39 AM.
Details Summary In bug 24074, the type information is not shown current lexical scope for the command "image lookup -t" -> The corresponding testcase.
Diff Detail Event Timelineravitheja retitled this revision from to Testcase and fix for bug 24074
In bug 24074, the type information is not shown
correctly. This commit includes the following -
-> Changes for displaying correct type based on
current lexical scope for the command "image
lookup -t"
-> The.... ravitheja updated this object. ravitheja retitled this revision from Testcase and fix for bug 24074
In bug 24074, the type information is not shown
correctly. This commit includes the following -
-> Changes for displaying correct type based on
current lexical scope for the command "image
lookup -t"
-> The... to Testcase and fix for bug 24074.Aug 27 2015, 4:53 AM ravitheja updated this object. clayborg edited edge metadata. Comment ActionsSee inlined comments.
This revision now requires changes to proceed.Sep 8 2015, 9:44 AM Comment Actions The TypeList is a multimap that uses the USERID as the key, so the order in which the types would be stored is always fixed and sorting may not be useful. I can make modifications for Inlined functions ?. ravitheja edited edge metadata. Comment ActionsRenamed TypeList to TypeMap clayborg edited edge metadata. Comment ActionsVery close, we just need the FindTypes_Impl to be left as they were (but switch over to using TypeMap, and then have the Module::FindTypes() and ModuleList::FindTypes() do the actual sorting before the results are returned.
This revision now requires changes to proceed.Sep 21 2015, 11:35 AM ravitheja edited edge metadata. ravitheja marked 2 inline comments as done. Comment ActionsMoved SortType to FindTypes This revision is now accepted and ready to land.Sep 22 2015, 9:23 AM Comment Actions I reverted this in revision 248421 because it was causing breakages in the test suite. For future reference, please remember to run the test suite before committing changes.
Revision Contents
Diff 35347 include/lldb/Core/Module.h
include/lldb/Symbol/SymbolContext.h
include/lldb/Symbol/SymbolFile.h
include/lldb/Symbol/SymbolVendor.h
include/lldb/Symbol/TypeList.h
include/lldb/Symbol/TypeMap.h
include/lldb/lldb-forward.h
source/Commands/CommandObjectTarget.cpp
source/Core/Module.cpp
source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
source/Symbol/CMakeLists.txt
source/Symbol/SymbolContext.cpp
source/Symbol/SymbolFile.cpp
source/Symbol/SymbolVendor.cpp
source/Symbol/TypeList.cpp
source/Symbol/TypeMap.cpp
test/lang/c/typedef/Makefile
test/lang/c/typedef/Testtypedef.py
test/lang/c/typedef/main.c
|
I would rather see this promotion of the correct types happen inside Module::FindTypes() so that we don't need to do this everywhere.
Any types that are returned in the type list should be ordered such that the first item in the list of the most important and correct choice for the SymbolContext that was provided.
When checking the symbol context block, we also need to check the parent blocks and stop when we run into a block that has inlined function info. So the solution in Module::FindTypes() should probably pass the resulting unsorted TypeList with all types to a new SymbolContext function:
The block in the symbol context might be the deepest block in a function:
So we will need to check for the best block as a type could be defined just inside main, or inside the "if (argc)" block or inside the "if (argv[argc])" block.
There is a function on a block where you can check if a block contains another block as a child:
Because you might end up with code where a type is defined in a block in a function, but it isn't contained in any parent blocks of the current block...
So the type list ordering should be: