summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Changing representation of .cv_def_range directives in Codeview ↵Nilanjana Basu2019-08-051-2/+2
| | | | | | | | debug info assembly format for better readability" This reverts commit a885afa9fa8cab3b34f1ddf3d21535f88b662881. llvm-svn: 367861
* [lldb][NFC] Fix documentation for ↵Raphael Isemann2019-08-052-4/+3
| | | | | | ClangPersistentVariables::m_next_persistent_variable_id llvm-svn: 367857
* Changing representation of .cv_def_range directives in Codeview debug info ↵Nilanjana Basu2019-08-051-2/+2
| | | | | | assembly format for better readability llvm-svn: 367850
* [lldb][NFC] Clang format GetNextPersistentVariableName signatureRaphael Isemann2019-08-051-1/+1
| | | | llvm-svn: 367843
* [lldb] Move redundant persistent variable counter to ClangPersistentVariablesRaphael Isemann2019-08-051-2/+12
| | | | | | | | | | | | | | | | | Currently Target::m_next_persistent_variable_index is counting up for our persistent variables ($0, $1, ...) but we also have a unused counter that is supposed to do this in ClangPersistentVariables but that stays always at 0 (because we currently increase the target counter when we should increase that unused counter). This patch removes the counter in Target and lets the documented counter in ClangPersistentVariables do the variable counting. Patch *should* be NFC, but it might unexpectedly bring LLDB to new code paths that could contain exciting new bugs to fix. llvm-svn: 367842
* [lldb][NFC] Remove unimplemented ClangExpressionSourceCode::GetNumBodyLinesRaphael Isemann2019-08-051-2/+0
| | | | llvm-svn: 367830
* ObjectFile[ELF]: Refactor gnu_debuglink interfacePavel Labath2019-08-054-81/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The contents of the gnu_debuglink section were passed through the GetDebugSymbolFilePaths interface, which was more generic than needed. As the only class implementing this function is ObjectFileELF, we can modify the function to return just a single FileSpec (instead of a list). Also, since the SymbolVendorELF already assumes ELF object files, we don't have to make this method available on the generic ObjectFile interface -- instead we can put it on ObjectFileELF directly. This change also makes is so that if the Module has an explicit symbol file spec set, we disregard the value the value of the debug link (instead of doing a secondary lookup using that). I think it makes sense to honor the users wishes if he had explicitly set the symbol file spec, and this seems to be consistent with what SymbolVendorMacOSX is doing (SymbolVendorMacOSX.cpp:125). The main reason for making these changes is to make the treatment of build-ids and debug links simpler in the follow-up patch. Reviewers: clayborg, jankratochvil, mgorny, espindola Subscribers: emaste, arichardson, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65560 llvm-svn: 367824
* Remove SymbolVendor::GetSymtabPavel Labath2019-08-051-15/+11
| | | | | | | | | | | | | | | | | | | | Summary: This patch removes the GetSymtab method from the SymbolVendor, which is a no-op as it's implementation just forwards to the relevant SymbolFile. Instead it creates a Module::GetSymtab, which calls the SymbolFile method directly. All callers have been updated to use the Module method directly instead of a two phase GetSymbolVendor->GetSymtab search, which leads to reduced intentation in a lot of deeply nested code. Reviewers: clayborg, JDevlieghere, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65569 llvm-svn: 367820
* Remove usage of usleep in generic codePavel Labath2019-08-052-6/+7
| | | | | | | | This function is not portable, and there are only a handful of usages of it anyway. Replacing it with std::this_thread::sleep_for enables us to get rid of the compatibility code in PosixApi.h. llvm-svn: 367814
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-052-4/+4
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* Fix ClangASTContext::CreateParameterDeclaration to not call addDeclShafik Yaghmour2019-08-022-2/+2
| | | | | | | | | Summary: The change https://reviews.llvm.org/D55575 modified ClangASTContext::CreateParameterDeclaration to call decl_ctx->addDecl(decl); this caused a regression since the existing code in DWARFASTParserClang::ParseChildParameters is called with the containing DeclContext. So when end up with cases where we are parsing a parameter for a member function and the parameter is added to the CXXRecordDecl as opposed to the CXXMethodDecl. This example is given in the regression test TestBreakpointInMemberFuncWNonPrimitiveParams.py which without this fix in a modules build leads to assert on setting a breakpoint in a member function with non primitive parameters. This scenario would be common when debugging LLDB or clang. Differential Revision: https://reviews.llvm.org/D65414 llvm-svn: 367726
* [Formatters] Temporarily disable libc++ std::function formatter due to ↵Shafik Yaghmour2019-08-021-6/+0
| | | | | | | | | | performance issue Summary: We have been seeing increased reports of performance issue around large project and formatting std::function variables especially in functions signatures in back traces. There are some possible fixes but exploring those fixes may take time and it is better to temporarily disable the formatter due to its impact and re-enable it once we have a fix. Differential Revision: https://reviews.llvm.org/D65666 llvm-svn: 367701
* Fix PC adjustment in StackFrame::GetSymbolContextJoseph Tremoulet2019-08-028-55/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Update StackFrame::GetSymbolContext to mirror the logic in RegisterContextLLDB::InitializeNonZerothFrame that knows not to do the pc decrement when the given frame is a signal trap handler frame or the parent of one, because the pc may not follow a call in these frames. Accomplish this by adding a behaves_like_zeroth_frame field to lldb_private::StackFrame, set to true for the zeroth frame, for signal handler frames, and for parents of signal handler frames. Also add logic to propagate the signal handler flag from UnwindPlan to the FrameType on the RegisterContextLLDB it generates, and factor out a helper to resolve symbol and address range for an Address now that we need to invoke it in four places. Reviewers: jasonmolenda, clayborg, jfb Reviewed By: jasonmolenda Subscribers: labath, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64993 llvm-svn: 367691
* SymbolVendor: Introduce Module::GetSymbolFilePavel Labath2019-08-022-105/+97
| | | | | | | | | | | | | | | | | | | | | Summary: This is the next step in avoiding funneling all SymbolFile calls through the SymbolVendor. Right now, it is just a convenience function, but it allows us to update all calls to SymbolVendor functions to access the SymbolFile directly. Once all call sites have been updated, we can remove the GetSymbolVendor member function. This patch just updates the calls to GetSymbolVendor, which were calling it just so they could fetch the underlying symbol file. Other calls will be done in follow-ups. Reviewers: JDevlieghere, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65435 llvm-svn: 367664
* Format OptionEnumValueElement (NFC)Jonas Devlieghere2019-08-022-17/+43
| | | | | | | | | | Reformat OptionEnumValueElement to make it easier to distinguish between its fields. This also removes the need to disable clang-format for these arrays. Differential revision: https://reviews.llvm.org/D65489 llvm-svn: 367638
* [clang] Change FileManager to use llvm::ErrorOr instead of null on failureHarlan Haskins2019-08-012-6/+9
| | | | | | | | | | | | | | | | | | Summary: Currently, clang's FileManager uses NULL as an indicator that a particular file did not exist, but would not propagate errors like permission issues. Instead, teach FileManager to use llvm::ErrorOr internally and return rich errors for failures. Reviewers: arphaman, bruno, martong, shafik Subscribers: nemanjai, kbarton, MaskRay, jkorous, dexonsmith, kadircet, jsji, cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D65534 llvm-svn: 367618
* [lldb][NFC] Make ClangDiagnostic::m_fixit_vec privateRaphael Isemann2019-08-011-0/+1
| | | | llvm-svn: 367542
* [GDBRemote] Reflow comments and improve docs.Jonas Devlieghere2019-07-311-31/+35
| | | | | | | | Improved the GDB client base documentation while I was reading through it. Looks like it got messed up during the automatic comment reflow a while ago. llvm-svn: 367481
* Don't crash when pass by value struct has no definition.Greg Clayton2019-07-311-1/+1
| | | | llvm-svn: 367441
* [ProcessWindows] Choose a register context file by preprocessorTatyana Krasnukha2019-07-315-10/+19
| | | | | | | | | | Replaced Cmake option based check with the preprocessor macro as CMAKE_SYSTEM_PROCESSOR doesn't work as expected on Windows. Fixes llvm.org/pr42724 Differential Revision: https://reviews.llvm.org/D65409 llvm-svn: 367414
* Add llvm-style RTTI to ObjectFile hierarchyPavel Labath2019-07-3118-35/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On the heels of D62934, this patch uses the same approach to introduce llvm RTTI support to the ObjectFile hierarchy. It also replaces the existing uses of GetPluginName doing run-time type checks with llvm::dyn_cast and friends. This formally introduces new dependencies from some other plugins to ObjectFile plugins. However, I believe this is fine because: - these dependencies were already kind of there, and the only reason we could get away with not modeling them explicitly was because the code was relying on magically knowing what will GetPluginName() return for a particular kind of object files. - the dependencies themselves are logical (it makes sense for SymbolVendorELF to depend on ObjectFileELF), or at least don't actively get in the way (the JitLoaderGDB->MachO thing). - they don't introduce any new dependency loops as ObjectFile plugins don't depend on any other plugins Reviewers: xiaobai, JDevlieghere, espindola Subscribers: emaste, mgorny, arichardson, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65450 llvm-svn: 367413
* SymbolVendor: Remove the object file member variablePavel Labath2019-07-3114-117/+123
| | | | | | | | | | | | | | | | | | Summary: The last responsibility of the SymbolVendor was to hold an owning reference to the object file (in case symbols are being read from a different file than the main module). As SymbolFile classes already hold a non-owning reference to the object file, we can easily remove this responsibility of the SymbolVendor by making the SymbolFile reference owning. Reviewers: JDevlieghere, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65401 llvm-svn: 367392
* Change '|' to '&' in conditional.Richard Trieu2019-07-311-1/+1
| | | | | | | | Bitwise-or with a non-zero constant will always evaluate to true. Switch to bitwise-and which will only evalute to true if the specified bit is set in the other operand. llvm-svn: 367386
* [Symbol] Use llvm::Expected when getting TypeSystemsAlex Langford2019-07-3019-125/+263
| | | | | | | | | | | | | | | | | | Summary: This commit achieves the following: - Functions used to return a `TypeSystem *` return an `llvm::Expected<TypeSystem *>` now. This means that the result of a call is always checked, forcing clients to move more carefully. - `TypeSystemMap::GetTypeSystemForLanguage` will either return an Error or a non-null pointer to a TypeSystem. Reviewers: JDevlieghere, davide, compnerd Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D65122 llvm-svn: 367360
* [SymbolFile] SymbolFileDWARF::ParseLineTable should lock its moduleAlex Langford2019-07-301-1/+1
| | | | | | | | | As of svn rL367298, SymbolFileDWARF locks the module in many cases where it needs to parse some aspect of the DWARF symbol file. SymbolFileDWARF::ParseLineTable needs to lock the module because SymbolVendor::ParseLineTable no longer locks it. llvm-svn: 367358
* PECOFF: Fix a "memset clearing an object of non-trivial type" warningPavel Labath2019-07-302-34/+32
| | | | | | | | | | | | This time, the warning pointed to an actual problem, because the coff_opt_header structure contained a std::vector. I guess this happened to work because the all-zero state was a valid representation of an empty vector, but its not a good idea to rely on that. I remove the memset, and have the structure clear its members in the constructor instead. llvm-svn: 367299
* SymbolVendor: Move locking into the Symbol FilesPavel Labath2019-07-306-16/+74
| | | | | | | | | | | | | | | | | | | | | | Summary: The last bit of functionality in SymbolVendor passthrough functions is the locking the module mutex. While it may be nice doing the locking in a central place, we weren't really succesful in doing that right now, because some SymbolFile function could still be called without going through the SymbolVendor. This meant in SymbolFileDWARF (the only battle-tested symbol file implementation) roughly a half of the functions was taking additional locks and another half was asserting that the lock is already held. By making the SymbolFile responsible for locking, we can at least make the situation in SymbolFileDWARF more consistent. Reviewers: clayborg, JDevlieghere, jingham, jdoerfert Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D65329 llvm-svn: 367298
* [NFC] avoid AlignedCharArray in lldbJF Bastien2019-07-292-3/+3
| | | | | | As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio. llvm-svn: 367275
* [Reproducers] Pass FileCollector around as a shared_ptr (NFC)Jonas Devlieghere2019-07-291-3/+5
| | | | | | | | | | | Instead of passing the FileCollector around as a reference or raw pointer, use a shared_ptr. This change's motivation is twofold. First it adds compatibility for the newly added `FileCollectorFileSystem`. Secondly, it addresses a lifetime issue we only see when LLDB is used from Xcode, where a reference to the FileCollector outlives the reproducer instance. llvm-svn: 367258
* [lldb] Qualify includes of Properties[Enum].inc files. NFCJordan Rupprecht2019-07-2921-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a bit more explicit, and makes it possible to build LLDB without varying the -I lines per-directory. (The latter is useful because many build systems only allow this to be configured per-library, and LLDB is insufficiently layered to be split into multiple libraries on stricter build systems). (My comment on D65185 has some more context) Reviewers: JDevlieghere, labath, chandlerc, jdoerfert Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65397 Patch by Sam McCall! llvm-svn: 367241
* [lldb] Also include the array definition in Properties.incJonas Devlieghere2019-07-297-39/+28
| | | | | | | | | | | | | | | | Right now our Properties.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the Properties.inc generate it alongside the initializers. Unfortunately we cannot do the same for enums, as there's this magic ePropertyExperimental, which needs to come at the end to be interpreted correctly. Hopefully we can get rid of this in the future and do the same for the property enums. Differential revision: https://reviews.llvm.org/D65353 llvm-svn: 367238
* DWARF: Improve type safety or range lists parsingPavel Labath2019-07-265-16/+10
| | | | | | | | | Delete the abstract GetOffset function, which is only defined for rnglists entries. Instead fix up entries which refer to the range list classes so that one can statically know that he is dealing with the rnglists section and call the function that way. llvm-svn: 367106
* Fix some "control reaches end of non-void function" warningsPavel Labath2019-07-261-0/+2
| | | | llvm-svn: 367095
* ObjectFileELF: Use llvm::JamCRC to refactor CRC32 computationFangrui Song2019-07-261-67/+9
| | | | | | | | Reviewed By: labath Differential Revision: https://reviews.llvm.org/D65318 llvm-svn: 367090
* Let tablegen generate property definitionsJonas Devlieghere2019-07-2521-91/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | Property definitions are currently defined in a PropertyDefinition array and have a corresponding enum to index in this array. Unfortunately this is quite error prone. Indeed, just today we found an incorrect merge where a discrepancy between the order of the enum values and their definition caused the test suite to fail spectacularly. Tablegen can streamline the process of generating the property definition table while at the same time guaranteeing that the enums stay in sync. That's exactly what this patch does. It adds a new tablegen file for the properties, building on top of the infrastructure that Raphael added recently for the command options. It also introduces two new tablegen backends: one for the property definitions and one for their corresponding enums. It might be worth mentioning that I generated most of the tablegen definitions from the existing property definitions, by adding a dump method to the struct. This seems both more efficient and less error prone that copying everything over by hand. Only Enum properties needed manual fixup for the EnumValues and DefaultEnumValue fields. Differential revision: https://reviews.llvm.org/D65185 llvm-svn: 367058
* [LLDB] Find debugserver in Command Line Tools as wellAntonio Afonso2019-07-251-50/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This might be an edge case in regular use but if you're shipping an lldb version with no debugserver lldb will try to use the System one. However, lldb only knows how to find the Xcode one and not the Command Line Tools one. This diff fixes that. We try to find debugserver with `PlatformDarwin::LocateExecutable("debugserver")`, we call `xcode-select -p` to get the path and then assume this path is of Xcode. The changes I did are: * Change `PlatformDarwin::LocateExecutable` to also add the Command Line Tools directory to the list of paths to search for debugserver. * Created a new function to find the Command Line Tools directory named `GetCommandLineToolsLibraryPath`. * Refactored the code that calls `xcode-select -p` into its own function `GetXcodeSelectPath()`. There were 2 identical pieces of code for this so I reduced it to one and used this function everywhere instead. * I also changed `PlatformDarwin::GetSDKDirectoryForModules` to use the `SDKs` directory that exists in the Command Line Tools installation. I'm not sure how to create tests for this. PlatformDarwinTest is really limited and I couldn't find how to mock Filesystem::Instance() so I could create a virtual file system. Reviewers: clayborg, JDevlieghere Reviewed By: clayborg, JDevlieghere Subscribers: jasonmolenda, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65171 llvm-svn: 367052
* [lldb] [Process/NetBSD] Report stopped process on SIGSTOPMichal Gorny2019-07-251-0/+1
| | | | | | | | | | | | | Mark the process as stopped when SIGSTOP arrives. This is necessary for lldb-server to generate correct response to 'process interrupt', and therefore to prevent the whole stack crashing when process is stopped. Thanks to Pavel Labath for the tip. Differential Revision: https://reviews.llvm.org/D65289 llvm-svn: 367047
* Correctly use GetLoadedModuleList to take advantage of libraries-svr4Antonio Afonso2019-07-256-86/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Here's a replacement for D62504. I thought I could use LoadModules to implement this but in reality I can't because there are at few issues with it: * The LoadModules assumes that the list returned by GetLoadedModuleList is comprehensive in the sense that reflects all the mapped segments, however, this is not true, for instance VDSO entry is not there since it's loaded manually by LoadVDSO using GetMemoryRegionInfo and it doesn't represent a specific shared object in disk. Because of this LoadModules will unload the VDSO module. * The loader (interpreter) module might have also been loaded using GetMemoryRegionInfo, this is true when we launch the process and the rendezvous structure is not yet available (done through LoadInterpreterModule()). The problem here is that this entry will point to the same file name as the one found in /proc/pid/maps, however, when we read the same module from the r_debug.link_map structure it might be under a different name. This is true at least on CentOS where the loader is a symlink. Because of this LoadModules will unload and load the module in a way where the rendezvous breakpoint is unresolved but not resolved again (because we add the new module first and remove the old one after). The symlink issue might be fixable by first unloading the old and loading the news (but sounds super brittle), however, I'm not sure how to fix the VDSO issue. Since I can't trust it I'm just going to use GetLoadedModuleList directly with the same logic that we use today for when we read the linked list in lldb. The only safe thing to do here is to only calculate differences between different snapshots of the svr4 packet itself. This will also cut the dependency this plugin has from LoadModules. I separated the 2 logics into 2 different functions (remote and not remote) because I don't like mixing 2 different logics in the same function with if/else's. Two different functions makes it easier to reason with I believe. However, I did abstract away the logic that decides if we should take a snapshot or add/remove modules so both functions could reuse it. The other difference between the two is that on the UpdateSOEntriesFromRemote I take the snapshot only once when state = Consistent because I didn't find a good reason to always update that, as we already got the list from state = Add | Remove. I probably should use the same logic on UpdateSOEntries though I don't see a reason not to since it's really using the same data, just read in different places. Any thoughts here? It might also be worthwhile to add a test to make sure we don't unload modules that were not actually "unloaded" like the vdso. I haven't done this yet though. This diff is also missing the option for svr4 like proposed in https://reviews.llvm.org/D62503#1564296, I'll start working on this but wanted to have this up first. Reviewers: labath, jankratochvil, clayborg, xiaobai Reviewed By: labath Subscribers: srhines, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64013 llvm-svn: 367020
* SymbolVendor: Remove the type list memberPavel Labath2019-07-256-25/+13
| | | | | | | | | | | | | | | | | | | | | Summary: Similarly to the compile unit lists, the list of types can also be managed by the symbol file itself. Since the only purpose of this list seems to be to maintain an owning reference to all the types a symbol file has created (items are only ever added to the list, never retrieved), I remove the passthrough functions in SymbolVendor and Module. I also tighten the interface of the function (return a reference instead of a pointer, make it protected instead of public). Reviewers: clayborg, JDevlieghere, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65135 llvm-svn: 366994
* LLGS: fix tracking execve on linuxPavel Labath2019-07-251-6/+3
| | | | | | | | | | | | | | | | | | | Summary: Due to a logic error, lldb-server ended up asserting/crashing every time the debugged process attempted an execve(). This fixes the error, and extends TestExec to work on other platforms too. The "extension" consists of avoiding non-standard posix_spawn extensions and using the classic execve() call, which should be available on any platform that actually supports re-execing. I change the test decorator from @skipUnlessDarwin to @skipIfWindows. Reviewers: clayborg, jasonmolenda Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65207 llvm-svn: 366985
* [FileCollector] Remove LLDB shim around llvm::FileCollector (NFC)Jonas Devlieghere2019-07-251-3/+3
| | | | | | | | The FileCollector got lifted into LLVM and a shim was introduced in LLDB to keep the old API that takes FileSpecs. This patch removes that shim and converts the arguments in place. llvm-svn: 366975
* [FileCollector] Change coding style from LLDB to LLVM (NFC)Jonas Devlieghere2019-07-251-1/+1
| | | | | | | | This patch changes the coding style of the FileCollector from the LLDB to the LLVM coding style. Alex recently lifted it into LLVM and I volunteered to do the conversion. llvm-svn: 366966
* [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere2019-07-24105-3810/+3431
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
* Revert "Revert "[lldb] [Process/NetBSD] Fix constructor after r363707""Michal Gorny2019-07-241-1/+1
| | | | | | The relevant changes have been reapplied, and broke build again. llvm-svn: 366889
* [ExpressionParser] Handle llvm::Expected resultJonas Devlieghere2019-07-231-2/+10
| | | | | | | | | | This fixes the unchecked-error assertion at runtime. Expected<T> must be checked before access or destruction. Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed). llvm-svn: 366853
* [ExpressionParser] Fix formatting and whitespace (NFC)Jonas Devlieghere2019-07-231-32/+32
| | | | | | Fix formatting and whitespace before making changes to this file. llvm-svn: 366852
* Revert "Revert "Add ReadCStringFromMemory for faster string reads""Antonio Afonso2019-07-232-7/+6
| | | | | | This reverts commit 9c10b620c0619611dfe062216459431955ac4801. llvm-svn: 366848
* Revert "Revert "Implement xfer:libraries-svr4:read packet""Antonio Afonso2019-07-237-4/+126
| | | | | | This reverts commit 08c38f77c5fb4d3735ec215032fed8ee6730b3db. llvm-svn: 366847
* ProcessMachCore: Fix a -Wmisleading-indentation warningPavel Labath2019-07-231-36/+35
| | | | llvm-svn: 366803
* SymbolVendor: Move compile unit handling into the SymbolFile classPavel Labath2019-07-2312-77/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SymbolFile classes are responsible for creating CompileUnit instances and they already need to have a notion of the id<->CompileUnit mapping (because of APIs like ParseCompileUnitAtIndex). However, the SymbolVendor has remained as the thing responsible for caching created units (which the SymbolFiles were calling via convoluted constructs like "m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(...)"). This patch moves the responsibility of caching the units into the SymbolFile class. It does this by moving the implementation of SymbolVendor::{GetNumCompileUnits,GetCompileUnitAtIndex} into the equivalent SymbolFile functions. The SymbolVendor functions become just a passthrough much like the rest of SymbolVendor. The original implementations of SymbolFile::GetNumCompileUnits is moved to "CalculateNumCompileUnits", and are made protected, as the "Get" function is the external api of the class. SymbolFile::ParseCompileUnitAtIndex is made protected for the same reason. This is the first step in removing the SymbolVendor indirection, as proposed in <http://lists.llvm.org/pipermail/lldb-dev/2019-June/015071.html>. After removing all interesting logic from the SymbolVendor class, I'll proceed with removing the indirection itself. Reviewers: clayborg, jingham, JDevlieghere Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D65089 llvm-svn: 366791
OpenPOWER on IntegriCloud