aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SystemInitializerFull.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-04-08[LLDB][NFC] Remove Debugger dependency in SystemLifetimeManager (#134383)Dmitry Vasilyev1-0/+44
It reduces the memory usage in lldb-server.
2025-03-08[lldb] Remove progress report coalescing (#130329)Jonas Devlieghere1-6/+0
Remove support for coalescing progress reports in LLDB. This functionality was motivated by Xcode, which wanted to listen for less frequent, aggregated progress events at the cost of losing some detail. See the original RFC [1] for more details. Since then, they've reevaluated this trade-off and opted to listen for the regular, full fidelity progress events and do any post processing on their end. rdar://146425487
2024-10-22[lldb] Log errors to the system log if they would otherwise get dropped ↵Jonas Devlieghere1-0/+3
(#111911) Log errors to the (always-on) system log if they would otherwise get dropped by LLDB_LOG_ERROR.
2024-10-10[lldb] Introduce an always-on system log category/channel (#108495)Jonas Devlieghere1-0/+3
Add an "always on" log category and channel. Unlike other, existing log channels, it is not exposed to users. The channel is meant to be used sparsely and deliberately for logging high-value information to the system log. We have a similar concept in the downstream Swift fork and this has proven to be extremely valuable. This is especially true on macOS where system log messages are automatically captured as part of a sysdiagnose.
2024-03-26[lldb] Implement coalescing of disjoint progress events (#84854)Jonas Devlieghere1-3/+11
This implements coalescing of progress events using a timeout, as discussed in the RFC on Discourse [1]. This PR consists of two commits which, depending on the feedback, I may split up into two PRs. For now, I think it's easier to review this as a whole. 1. The first commit introduces a new generic `Alarm` class. The class lets you to schedule a function (callback) to be executed after a given timeout expires. You can cancel and reset a callback before its corresponding timeout expires. It achieves this with the help of a worker thread that sleeps until the next timeout expires. The only guarantee it provides is that your function is called no sooner than the requested timeout. Because the callback is called directly from the worker thread, a long running callback could potentially block the worker thread. I intentionally kept the implementation as simple as possible while addressing the needs for the `ProgressManager` use case. If we want to rely on this somewhere else, we can reassess whether we need to address those limitations. 2. The second commit uses the Alarm class to coalesce progress events. To recap the Discourse discussion, when multiple progress events with the same title execute in close succession, they get broadcast as one to `eBroadcastBitProgressCategory`. The `ProgressManager` keeps track of the in-flight progress events and when the refcount hits zero, the Alarm class is used to schedule broadcasting the event. If a new progress event comes in before the alarm fires, the alarm is reset (and the process repeats when the new progress event ends). If no new event comes in before the timeout expires, the progress event is broadcast. [1] https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717/
2023-11-06[LLDB] Don't forcefully initialize the process trace plugin (#71455)Walter Erquinigo1-3/+0
This was causing some process to wrongfully be handled by ProcessTrace. The only place this was being used is in the intel pt plugin, but it doesn't even build anymore, so I'm sure no one is using it.
2023-06-13[lldb] Print lldbassert to debugger diagnosticsJonas Devlieghere1-0/+3
When hitting an lldbassert in a non-assert build, we emit a blurb including the assertion, the triggering file and line and a pretty backtrace leading up to the issue. Currently, this is all printed to stderr. That's fine on the command line, but when used as library, for example from Xcode, this information doesn't make it to the user. This patch uses the diagnostic infrastructure to report LLDB asserts as diagnostic events. The patch is slightly more complicated than I would've liked because of layering. lldbassert is part of Utility while the debugger diagnostics are implemented in Core. Differential revision: https://reviews.llvm.org/D152866
2022-09-19[lldb] Remove LLDB reproducersJonas Devlieghere1-1/+0
This patch removes the remaining reproducer code. The SBReproducer class remains for ABI stability but is just an empty shell. This completes the removal process outlined on the mailing list [1]. [1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
2022-01-01[lldb] Use nullptr instead of 0 or NULL (NFC)Kazu Hirata1-1/+1
This is a re-submission of 24d240558811604354a8d6080405f6bad8d15b5c without the hunks in HostNativeThreadBase.{h,cpp}, which break builds on Windows. Identified with modernize-use-nullptr.
2022-01-01Revert "[lldb] Use nullptr instead of 0 or NULL (NFC)"Kazu Hirata1-1/+1
This reverts commit 913457acf07be7f22d71ac41ad1076517d7f45c6. It again broke builds on Windows: lldb/source/Host/common/HostNativeThreadBase.cpp(37,14): error: assigning to 'lldb::thread_result_t' (aka 'unsigned int') from incompatible type 'std::nullptr_t'
2022-01-01[lldb] Use nullptr instead of 0 or NULL (NFC)Kazu Hirata1-1/+1
This is a re-submission of 24d240558811604354a8d6080405f6bad8d15b5c without the hunk in HostNativeThreadBase.h, which breaks builds on Windows. Identified with modernize-use-nullptr.
2022-01-01Revert "[lldb] Use nullptr instead of 0 or NULL (NFC)"Nico Weber1-1/+1
This reverts commit 24d240558811604354a8d6080405f6bad8d15b5c. Breaks building on Windows: ../../lldb/include\lldb/Host/HostNativeThreadBase.h(49,36): error: cannot initialize a member subobject of type 'lldb::thread_result_t' (aka 'unsigned int') with an rvalue of type 'std::nullptr_t' lldb::thread_result_t m_result = nullptr; ^~~~~~~ 1 error generated.
2022-01-01[lldb] Use nullptr instead of 0 or NULL (NFC)Kazu Hirata1-1/+1
Identified with modernize-use-nullptr.
2021-12-17[lldb] Remove reproducer replay functionalityJonas Devlieghere1-8/+1
This is part of a bigger rework of the reproducer feature. See [1] for more details. [1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
2021-04-01[lldb] Prevent that LLDB randomly crashes in CommandLineParser::addOption by ↵Raphael Isemann1-0/+8
initializing LLVM's command line parser Since quite a while Apple's LLDB fork (that contains the Swift debugging support) is randomly crashing in `CommandLineParser::addOption` with an error such as `CommandLine Error: Option 'h' registered more than once!` The backtrace of the crashing thread is shown below. There are also usually many other threads also performing similar clang::FrontendActions which are all trying to generate (usually outdated) Clang modules which are used by Swift for various reasons. ``` [ 6] LLDB`CommandLineParser::addOption(llvm::cl::Option*, llvm::cl::SubCommand*) + 856 [ 7] LLDB`CommandLineParser::addOption(llvm::cl::Option*, llvm::cl::SubCommand*) + 733 [ 8] LLDB`CommandLineParser::addOption(llvm::cl::Option*, bool) + 184 [ 9] LLDB`llvm::cl::ParseCommandLineOptions(...) [inlined] ::CommandLineParser::ParseCommandLineOptions(... + 1279 [ 9] LLDB`llvm::cl::ParseCommandLineOptions(...) + 497 [ 10] LLDB`setCommandLineOpts(clang::CodeGenOptions const&) + 416 [ 11] LLDB`EmitAssemblyHelper::EmitAssemblyWithNewPassManager(...) + 98 [ 12] LLDB`clang::EmitBackendOutput(...) + 4580 [ 13] LLDB`PCHContainerGenerator::HandleTranslationUnit(clang::ASTContext&) + 871 [ 14] LLDB`clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 43 [ 15] LLDB`clang::ParseAST(clang::Sema&, bool, bool) + 579 [ 16] LLDB`clang::FrontendAction::Execute() + 74 [ 17] LLDB`clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1808 ``` The underlying reason for the crash is that the CommandLine code in LLVM isn't thread-safe and will never be thread-safe with its current architecture. The way LLVM's CommandLine logic works is that all parts of the LLVM can provide command line arguments by defining `cl::opt` global variables and their constructors (which are invoked during static initialisation) register the variable in LLVM's CommandLineParser (which is also just a global variable). At some later point after static initialization we actually try to parse command line arguments and we ask the CommandLineParser to parse our `argv`. The CommandLineParser then lazily constructs it's internal parsing state in a non-thread-safe way (this is where the crash happens), parses the provided command line and then goes back to the respective `cl::opt` global variables and sets their values according to the parse result. As all of this is based on global state, this whole mechanism isn't thread-safe so the only time to ever use it is when we know we only have one active thread dealing with LLVM logic. That's why nearly all callers of `llvm::cl::ParseCommandLineOptions` are at the top of the `main` function of the some LLVM-based tool. One of the few exceptions to this rule is in the `setCommandLineOpts` function in `BackendUtil.cpp` which is in our backtrace: ``` static void setCommandLineOpts(const CodeGenOptions &CodeGenOpts) { SmallVector<const char *, 16> BackendArgs; BackendArgs.push_back("clang"); // Fake program name. if (!CodeGenOpts.DebugPass.empty()) { BackendArgs.push_back("-debug-pass"); BackendArgs.push_back(CodeGenOpts.DebugPass.c_str()); } if (!CodeGenOpts.LimitFloatPrecision.empty()) { BackendArgs.push_back("-limit-float-precision"); BackendArgs.push_back(CodeGenOpts.LimitFloatPrecision.c_str()); } BackendArgs.push_back(nullptr); llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1, BackendArgs.data()); } ``` This is trying to set `cl::opt` variables in the LLVM backend to their right value as the passed via CodeGenOptions by invoking the CommandLine parser. As this is just in some generic Clang CodeGen code (where we allow having multiple threads) this is code is clearly wrong. If we're unlucky it either overwrites the value of the global variables or it causes the CommandLine parser to crash. So the next question is why is this only crashing in LLDB? The main reason seems to be that easiest way to crash this code is to concurrently enter the initial CommandLineParser construction where it tries to collect all the registered `cl::opt` options and checks for sanity: ``` // If it's a DefaultOption, check to make sure it isn't already there. if (O->isDefaultOption() && SC->OptionsMap.find(O->ArgStr) != SC->OptionsMap.end()) return; // Add argument to the argument map! if (!SC->OptionsMap.insert(std::make_pair(O->ArgStr, O)).second) { errs() << ProgramName << ": CommandLine Error: Option '" << O->ArgStr << "' registered more than once!\n"; HadErrors = true; } ``` The `OptionsMap` here is global variable and if we end up in this code with two threads at once then two threads at the same time can register an option (such as 'h') when they pass the first `if` and then we fail with the sanity check in the second `if`. After this sanity check and initial setup code the only remaining work is just parsing the provided CommandLine which isn't thread-safe but at least doesn't crash in all my attempts at breaking it (as it's usually just reading from the already generated parser state but not further modifying it). The exception to this is probably that once people actually specify the options in the code snippet above we might run into some new interesting ways to crash everything. To go back to why it's only affecting LLDB: Nearly all LLVM tools I could find (even if they are using threads) seem to call the CommandLine parser at the start so they all execute the initial parser setup at a point where there is only one thread. So once the code above is executed they are mostly safe from the sanity check crashes. We even have some shady code for the gtest `main` in `TestMain.cpp` which is why this also doesn't affect unit tests. The only exception to this rule is ... *drum roll* ... LLDB! it's not using that CommandLine library for parsing options so it also never ends up calling it in `main`. So when we end up in the `FrontendAction` code from the backtrace we are already very deep in some LLDB logic and usually already have several threads. In a situation where Swift decides to compile a large amount of Clang modules in parallel we then end up entering this code via several threads. If several threads reach this code at the same time we end up in the situation where the sanity-checking code of CommandLine crashes. I have a very reliable way of demonstrating the whole thing in D99650 (just run the unit test several times, it usually crashes after 3-4 attempts). We have several ways to fix this: 1. Make the whole CommandLine mechanism in LLVM thread-safe. 2. Get rid of `setCommandLineOpts` in `BackendUtil.cpp` and other callers of the command line parsing in generic Clang code. 3. Initialise the CommandLine library in a safe point in LLDB. Option 1 is just a lot of work and I'm not even sure where to start. The whole mechanism is based on global variables and global state and this seems like a humongous task. Option 2 is probably the best thing we can do in the near future. There are only two callers of the command line parser in generic Clang code. The one in `BackendUtils.cpp` looks like it can be replaced with some reasonable refactoring (as it only deals with two specific options). There is another one in `ExecuteCompilerInvocation` which deals with forwarding the generic `-mllvm` options to the backend which seems like it will just end up requiring us to do Option 1. Option 3 is what this patch is doing. We just parse some dummy command line invocation in a point of the LLDB execution where we only have one thread that is dealing with LLVM/Clang stuff. This way we are at least prevent the frequent crashes for users as parsing the dummy command line invocation will set up the initial parser state safely. Fixes rdar://70989856 Reviewed By: mib, JDevlieghere Differential Revision: https://reviews.llvm.org/D99652
2021-02-18[lldb] Fix shared library directory computation on windowsPavel Labath1-1/+14
Our code for locating the shared library directory works via dladdr (or the windows equivalent) to locate the path of an address known to reside in liblldb. This works great for C++ programs, but there's a catch. When (lib)lldb is used from python (like in our test suite), this dladdr call will return a path to the _lldb.so (or such) file in the python directory. To compensate for this, we have code which attempts to resolve this symlink, to ensure we get the canonical location. However, here's the second catch. On windows, this file is not a symlink (but a copy), so this logic fails. Since most of our other paths are derived from the liblldb location, all of these paths will be wrong, when running the test suite. One effect of this was the failure to find lldb-server in D96202. To fix this issue, I add some windows-specific code to locate the liblldb directory. Since it cannot rely on symlinks, it works by manually walking the directory tree -- essentially doing the opposite of what we do when computing the python directory. To avoid python leaking back into the host code, I implement this with the help of a callback which can be passed to HostInfo::Initialize in order to assist with the directory location. The callback lives inside the python plugin. I also strenghten the existing path test to ensure the returned path is the right one. Differential Revision: https://reviews.llvm.org/D96779
2020-12-22[lldb] Abstract scoped timer logic behind LLDB_SCOPED_TIMER (NFC)Jonas Devlieghere1-3/+0
This patch introduces a LLDB_SCOPED_TIMER macro to hide the needlessly repetitive creation of scoped timers in LLDB. It's similar to the LLDB_LOG(F) macro. Differential revision: https://reviews.llvm.org/D93663
2020-11-10[lldb] Propagate llvm::Error to report_fatal_errorJonas Devlieghere1-1/+1
Instead of having a custom error message, propagate the llvm::Error from SystemInitializerCommon. I didn't realize we had this overload until Pavel mentioned it in D90987 today.
2020-11-09[lldb] Avoid confusing reproducer crashes when initialization failedJonas Devlieghere1-2/+11
During active replay, the ::Initialize call is replayed like any other SB API call and the return value is ignored. Since we can't intercept this, we terminate here before the uninitialized debugger inevitably crashes. Differential revision: https://reviews.llvm.org/D90987
2020-10-19[trace] rename ThreadIntelPT into TraceTraceWalter Erquinigo1-0/+7
Renamed ThreadIntelPT to TreaceThread, making it a top-level class. I noticed that this class can and shuld work for any trace plugin and there's nothing intel-pt specific in it. With that TraceThread change, I was able to move most of the json file parsing logic to the base class TraceSessionFileParser, which makes adding new plug-ins easier. This originally was part of https://reviews.llvm.org/D89283 Differential Revision: https://reviews.llvm.org/D89408
2020-02-18Re-land "[lldb/CMake] Auto-generate the Initialize and Terminate calls for ↵Jonas Devlieghere1-225/+5
plugin" This patch changes the way we initialize and terminate the plugins in the system initializer. It uses an approach similar to LLVM's TARGETS_TO_BUILD with a def file that enumerates the plugins. Previous attempts to land this failed on the Windows bot because there's a dependency between the different process plugins. Apparently ProcessWindowsCommon needs to be initialized after all other process plugins but before ProcessGDBRemote. Differential revision: https://reviews.llvm.org/D73067
2020-02-18[lldb/Plugin] Reject WASM and Hexagon in DynamicLoaderStaticJonas Devlieghere1-3/+3
The WASM and Hexagon plugin check the ArchType rather than the OSType, so explicitly reject those in the DynamicLoaderStatic. Differential revision: https://reviews.llvm.org/D74780
2020-02-18[lldb/Plugin] Generate LLDB_PLUGIN_DECLARE with CMakeJonas Devlieghere1-85/+2
Generate the LLDB_PLUGIN_DECLARE macros with CMake and a def file. I'm landing D73067 in pieces so I can bisect what exactly is breaking the Windows bot.
2020-02-18[lldb/Plugin] Unconditionally initialize DynamicLoaderDarwinKernelJonas Devlieghere1-6/+6
Other plugins depend on DynamicLoaderDarwinKernel and which means we cannot conditionally enable/build this plugin based on the target platform. This means that it will be past of the list of plugins initialized once that's autogenerated.
2020-02-17[lldb] Replace empty ctor en dtor bodies with =default (NFC)Jonas Devlieghere1-2/+2
Use = default instead of empty constructor and destructor bodies in the API layer.
2020-02-17[lldb/Plugins] Add missing initialize/terminate callsJonas Devlieghere1-0/+6
Add missing initialize and terminate calls for DynamicLoaderHexagonDYLD and ObjectFileJIT.
2020-02-17[lldb/Plugins] Rename initializers to match their plugin name.Jonas Devlieghere1-35/+35
Use LLDB_PLUGIN_DEFINE_ADV to make the name of the generated initializer match the name of the plugin. This is a step towards generating the initializers with a def file. I'm landing this change in pieces so I can narrow down what exactly breaks the Windows bot.
2020-02-17[lldb/Plugins] Initialize all ABI plugins by their plugin nameJonas Devlieghere1-6/+6
2020-02-17Revert "[lldb/CMake] Auto-generate the Initialize and Terminate calls for ↵Jonas Devlieghere1-9/+305
plugin" This is still failing spectacularly on the Windows bot and I still have no clue what's going on.
2020-02-17Re-land "[lldb/CMake] Auto-generate the Initialize and Terminate calls for ↵Jonas Devlieghere1-305/+9
plugin" This patch changes the way we initialize and terminate the plugins in the system initializer. It uses an approach similar to LLVM's TARGETS_TO_BUILD with a def file that enumerates the plugins. The previously landed patch got reverted because it was lacking: (1) A plugin definition for the Objective-C language runtime, (2) The dependency between the Static and WASM dynamic loader, (3) Explicit initialization of ScriptInterpreterNone for lldb-test. All issues have been addressed in this patch. Differential revision: https://reviews.llvm.org/D73067
2020-02-17[lldb/Plugin] Update ProcessWindows plugin for revertJonas Devlieghere1-2/+2
2020-02-17Revert "[lldb/CMake] Auto-generate the Initialize and Terminate calls for ↵Jonas Devlieghere1-9/+305
plugin" This temporarily reverts commit 7d6da329dee1eda1761430d9097d1323f32c4c0c because it's causing test failures on the bots.
2020-02-17[lldb/CMake] Auto-generate the Initialize and Terminate calls for pluginJonas Devlieghere1-305/+9
This patch changes the way we initialize and terminate the plugins in the system initializer. It uses an approach similar to LLVM's TARGETS_TO_BUILD with a def file that enumerates the plugins. Differential revision: https://reviews.llvm.org/D73067
2020-02-17[LLDB] Fix GCC warnings about extra semicolons. NFC.Martin Storsjö1-16/+16
2020-02-17[LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debuggingPaolo Severini1-0/+3
Add a dynamic loader plug-in class for WebAssembly modules. Differential Revision: https://reviews.llvm.org/D72751
2020-02-13[lldb/Plugins] Have one initializer per ABI pluginJonas Devlieghere1-40/+21
After the recent change that grouped some of the ABI plugins together, those plugins ended up with multiple initializers per plugin. This is incompatible with my proposed approach of generating the initializers dynamically, which is why I've grouped them together in a new entry point. Differential revision: https://reviews.llvm.org/D74451
2020-02-12[lldb/Plugins] Move DynamicLoaderMacOS into DynamicLoaderMacOSXDYLD (NFCI)Jonas Devlieghere1-3/+0
Move the logic for initialization and termination for DynamicLoaderMacOS into DynamicLoaderMacOSXDYLD so that there's one initializer for the DynamicLoaderMacOSXDYLD plugin.
2020-02-12[lldb/Plugins] Move SymbolFileDWARFDebugMap into SymbolFileDWARF (NFCI)Jonas Devlieghere1-3/+0
Move the logic for initialization and termination for SymbolFileDWARFDebugMap into SymbolFileDWARF so that there's one initializer for the SymbolFileDWARF plugin.
2020-02-12[LLDB] Fix GCC warnings about extra semicolons. NFC.Martin Storsjö1-81/+81
2020-02-11[lldb/Plugins] Move PlatformRemoteiOS into PlatformMacOSX (NFCI)Jonas Devlieghere1-3/+0
Move the logic for initialization and termination for PlatformRemoteiOS into PlatformMacOSX, like we did for the other Darwin platforms in a731c6ba94d0464c6a122de1af70ab88ffb5c1a6.
2020-02-07[lldb/Plugin] Use LLDB_PLUGIN_DECLARE to forward declare plugin initializersJonas Devlieghere1-0/+93
Apparently Linux and Windows have the exact opposite behavior when it comes to inline declarations of external functions. On Linux they're considered to be part of the lldb_private namespace, while on Windows they're considered to be part of the top level namespace. Somehow on macOS, it doesn't really matter and both are fine... At this point I don't know what to do, so I'm just adding the LLDB_PLUGIN_DECLARE macros again as originally proposed in D74245.
2020-02-07[lldb/Plugins] Use external functions to (de)initialize pluginsJonas Devlieghere1-268/+169
This is a step towards making the initialize and terminate calls be generated by CMake, which in turn is towards making it possible to disable plugins at configuration time. Differential revision: https://reviews.llvm.org/D74245
2020-02-07[lldb] Group ABI pluginsPavel Labath1-15/+15
Summary: There's a fair amount of code duplication between the different ABI plugins for the same architecture (e.g. ABIMacOSX_arm & ABISysV_arm). Deduplicating this code is not very easy at the moment because there is no good place where to put the common code. Instead of creating more plugins, this patch reduces their number by grouping similar plugins into a single folder/plugin. This makes it easy to extract common code to a (e.g.) base class, which can then live in the same folder. The grouping is done based on the underlying llvm target for that architecture, because the plugins already require this for their operation. Reviewers: JDevlieghere, jasonmolenda, jfb Subscribers: sdardis, nemanjai, mgorny, kristof.beyls, fedor.sergeev, kbarton, jrtc27, atanasyan, jsji, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74138
2020-02-05Revert "[LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging"Pavel Labath1-3/+0
This patch has a couple of outstanding issues. The test is not python3 compatible, and it also seems to fail with python2 (at least under some circumstances) due to an overambitious assertion. This reverts the patch as well as subsequent fixup attempts: 014ea9337624fe20aca8892e73b6b3f741d8da9e, f5f70d1c8fbf12249b4b9598f10a10f12d4db029. 4697e701b8cb40429818609814c7422e49b2ee07. 5c15e8e682e365b3a7fcf35200df79f3fb93b924. 3ec28da6d6430a00b46780555a87acd43fcab790.
2020-02-05Add missing directory from 3ec28da6Derek Schuff1-0/+3
Also revert 4697e701b8, restoring the original patch from https://reviews.llvm.org/D72751
2020-02-05Partially revert "[LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly ↵Jonas Devlieghere1-3/+0
debugging" This temporarily and partially reverts 3ec28da6d643 because it's missing a directory.
2020-02-05[LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debuggingPaolo Severini1-0/+3
Add a dynamic loader plug-in class for WebAssembly modules. Differential Revision: https://reviews.llvm.org/D72751
2020-01-31[lldb] Move clang-based files out of SymbolAlex Langford1-1/+1
Summary: This change represents the move of ClangASTImporter, ClangASTMetadata, ClangExternalASTSourceCallbacks, ClangUtil, CxxModuleHandler, and TypeSystemClang from lldbSource to lldbPluginExpressionParserClang.h This explicitly removes knowledge of clang internals from lldbSymbol, moving towards a more generic core implementation of lldb. Reviewers: JDevlieghere, davide, aprantl, teemperor, clayborg, labath, jingham, shafik Subscribers: emaste, mgorny, arphaman, jfb, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73661
2020-01-24[lldb][NFC] Fix all formatting errors in .cpp file headersRaphael Isemann1-1/+1
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files). This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line). Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere Reviewed By: JDevlieghere Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73258
2020-01-23[lldb][NFC] Rename ClangASTContext to TypeSystemClangRaphael Isemann1-3/+3
Summary: This commit renames ClangASTContext to TypeSystemClang to better reflect what this class is actually supposed to do (implement the TypeSystem interface for Clang). It also gets rid of the very confusing situation that we have both a `clang::ASTContext` and a `ClangASTContext` in clang (which sometimes causes Clang people to think I'm fiddling with Clang's ASTContext when I'm actually just doing LLDB work). I also have plans to potentially have multiple clang::ASTContext instances associated with one ClangASTContext so the ASTContext naming will then become even more confusing to people. Reviewers: #lldb, aprantl, shafik, clayborg, labath, JDevlieghere, davide, espindola, jdoerfert, xiaobai Reviewed By: clayborg, labath, xiaobai Subscribers: wuzish, emaste, nemanjai, mgorny, kbarton, MaskRay, arphaman, jfb, usaxena95, jingham, xiaobai, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D72684