llvm-project/lldb
Aaron Smith ec40f818c6 [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it
Summary:
- Fix a null array access bug. This happens when creating the lldb type for a function that has no argument.
- Implement SymbolFilePDB::ParseTypes method. Using `lldb-test symbols` will show all supported types in the target.
- Create lldb types for variadic function, PDBSymbolTypePointer, PDBSymbolTypeBuiltin
- The underlying builtin type for PDBSymbolTypeEnum is always `Int`, correct it with the very first enumerator's encoding if any. This is more accurate when the underlying type is not signed or another integer type.
- Fix a bug when the compiler type is not created based on PDB_BuiltinType. For example, basic type `long` is of same width as `int` in a 32-bit target, and the compiler type of former one will be represented by the one generated for latter if using the default method. Introduce a static function GetBuiltinTypeForPDBEncodingAndBitSize to correct this issue.
- Basic type `long double` and `double` have the same bit size in MSVC and there is no information in a PDB to distinguish them. The compiler type of the former one is represented by the latter's.
- There is no line information about typedef, enum etc in a PDB and the source and line information for them are not shown.
- There is no information about scoped enumeration. The compiler type is represented as an unscoped one.

Reviewers: zturner, lldb-commits

Reviewed By: zturner

Subscribers: majnemer, llvm-commits

Differential Revision: https://reviews.llvm.org/D42434

llvm-svn: 323255
2018-01-23 20:35:19 +00:00
..
cmake [lldb] Set component when invoking add_llvm_install_targets 2017-12-13 01:14:27 +00:00
docs [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY='' 2018-01-18 01:16:30 +00:00
examples Fixed up to use a class for the commands, renamed the commands and added a way to just dump the compile unit full paths and optionally their support files with the new "dump-files"command. 2017-11-16 17:14:48 +00:00
include/lldb [modules] Fix missing includes/typo in LLDB's includes. [NFC] 2018-01-21 09:54:19 +00:00
lit [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it 2018-01-23 20:35:19 +00:00
lldb.xcodeproj Remove the hardcoded macos deployment targets altogether 2018-01-17 00:22:27 +00:00
lldb.xcworkspace Revert r275223, which committed the wrong thing. 2016-07-12 23:31:42 +00:00
packages/Python/lldbsuite Move getBuildArtifact() from TestBase to Base and derive MiTestCaseBase from it 2018-01-23 16:43:01 +00:00
resources Bump the lldb version # in the xcode project files from 2016-03-15 04:36:11 +00:00
scripts Change SBProcess::ReadCStringFromMemory() back to returning 2017-12-22 03:27:02 +00:00
source [SymbolFilePDB] Fix null array access when parsing the type of a function without any arguments, i.e. 'int main()' and add support to test it 2018-01-23 20:35:19 +00:00
test [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY='' 2018-01-18 01:16:30 +00:00
third_party/Python/module *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
tools Remove the hardcoded macos deployment targets altogether 2018-01-17 00:22:27 +00:00
unittests Fix memory leak in TestClangASTContext.TestRecordHasFields 2018-01-22 18:56:33 +00:00
utils *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
www Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format Updated .clang-format rules so bring LLDB in line with LLVM standards. 2016-09-06 17:19:00 +00:00
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt Default to using in-tree clang for building test executables 2017-10-27 02:24:04 +00:00
CODE_OWNERS.txt Remove Sean Callanan from the CODE_OWNERS, he won't have time 2017-11-01 01:38:42 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT
use_lldb_suite_root.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00