llvm-project/lldb
Sean Callanan 1b3c43b6dd [Expression Parser] Inhibit global lookups for symbols in the IR dynamic checks
The IR dynamic checks are self-contained functions whose job is to

- verify that pointers referenced in an expression are valid at runtime; and
- verify that selectors sent to Objective-C objects by an expression are
  actually supported by that object.

These dynamic checks forward-declare all the functions they use and should not
require any external debug information. The way they ensure this is by marking
all the names they use with a dollar sign ($). The expression parser recognizes
such symbols and perform no lookups for them.

This patch fixes three issues surrounding the use of the dollar sign:

- to fix a MIPS issue, the name of the pointer checker was changed from
  starting with $ to starting with _$, but this was not properly ignored; and
- the Objective-C object checker used a temporary variable that did not start
  with $.
- the Objective-C object checker used an externally-defined struct (struct
  objc_selector) but didn't need to.

The patch also implements some cleanup in the area:

- it reformats the string containing the Objective-C object checker,
  which was mangled horribly when the code was transformed to a uniform width
  of 80 columns, and
- it factors out the logic for ignoring global $-symbols into common code
  shared between ClangASTSource and ClangExpressionDeclMap.

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

llvm-svn: 314225
2017-09-26 17:25:34 +00:00
..
cmake Check availability of accept4 in C++ instad of C code. 2017-09-16 02:58:49 +00:00
docs Adding Support for Error Strings in Remote Packets 2017-07-12 11:15:34 +00:00
examples Add an example command to toggle between disassembly-only and source mode. 2017-04-20 21:51:27 +00:00
include/lldb [LLDB] Implement interactive command interruption 2017-09-21 19:36:52 +00:00
lit Resubmit "[lit] Force site configs to run before source-tree configs" 2017-09-15 22:10:46 +00:00
lldb.xcodeproj Fix build of TaskPoolTest with xcodebuild 2017-09-19 17:13:39 +00:00
lldb.xcworkspace Revert r275223, which committed the wrong thing. 2016-07-12 23:31:42 +00:00
packages/Python/lldbsuite Remove the details of the libstdc++ implementation that were 2017-09-25 21:23:37 +00:00
resources Bump the lldb version # in the xcode project files from 2016-03-15 04:36:11 +00:00
scripts [LLDB] Implement interactive command interruption 2017-09-21 19:36:52 +00:00
source [Expression Parser] Inhibit global lookups for symbols in the IR dynamic checks 2017-09-26 17:25:34 +00:00
test cmake build needs to run tests AND collect results 2017-07-18 23:45:06 +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 Use socketpair on all Unix platforms 2017-09-25 17:41:16 +00:00
unittests Use ThreadLauncher to launch TaskPool threads 2017-09-19 15:38:30 +00:00
utils *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
www Mention breakpoint names in the tutorial. 2017-09-14 22:20:31 +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 test infra: clear file-charged issues on rerun of file 2016-10-01 00:17:08 +00:00
CMakeLists.txt [CMake] Enable OS_LOG support on Darwin 2017-07-28 15:39:50 +00:00
CODE_OWNERS.txt Greg Clayton is no longer working at Apple, he will continue to 2017-03-01 00:00:45 +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