summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* PostfixExpression: move parser out of NativePDB internalsPavel Labath2019-04-241-96/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The postfix expressions in PDB and breakpad symbol files are similar enough that they can be parsed by the same parser. This patch generalizes the parser in the NativePDB plugin and moves it into the PostfixExpression file created in the previous commit (r358976). The generalization consists of treating any unrecognised token as a "symbol" node (previously these would only be created for tokens starting with "$", and other token would abort the parse). This is needed because breakpad symbols can also contain ".cfa" tokens, which refer to the frame's CFA. The cosmetic changes include: - using a factory function instead of a class for creating nodes (this is more generic as it allows the same BumpPtrAllocator to be used for other things too) - using dedicated function for parsing operator tokens instead of a DenseMap (more efficient as we don't need to create the DenseMap every time). Reviewers: amccarth, clayborg, JDevlieghere, aleksandr.urakov Subscribers: jasonmolenda, lldb-commits, markmentovai, mgorny Differential Revision: https://reviews.llvm.org/D61003 llvm-svn: 359073
* Lock accesses to OptionValueFileSpecList objectsFrederic Riss2019-04-235-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Before a Debugger gets a Target, target settings are routed to a global set of settings. Even without this, some part of the LLDB which exist independently of the Debugger object (the Module cache, the Symbol vendors, ...) access directly the global default store for those settings. Of course, if you modify one of those global settings while they are being read, bad things happen. We see this quite a bit with FileSpecList settings. In particular, we see many cases where one debug session changes target.exec-search-paths while another session starts up and it crashes when one of those accesses invalid FileSpecs. This patch addresses the specific FileSpecList issue by adding locking to OptionValueFileSpecList and never returning by reference. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60468 llvm-svn: 359028
* Move postfix expression code out of the NativePDB pluginPavel Labath2019-04-231-233/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The NativePDB plugin contains code to convert "programs" describing the layout of function frames into dwarf (for easier interaction with the rest of lldb). This functionality is useful for the Breakpad plugin too, as it contains the same kind of expressions (because breakpad info is generated from pdb files). In this patch, I move the core classes of this code into a common place, where it can be used from both files. Previously, these were the details of the implementation, but here I am exposing them (instead of just a single "string->string" conversion function), as breakpad will need to use these in a slightly different way. The reason for that is that breakpad files generated from dwarf expressions use a slightly different syntax, although most of the core code can be reused with a bit of thought. This is also the reason why I am not moving the parsing or dwarf generation bits, as they will need to be generalized a bit before they're usable for both scenarios. This patch should be NFC, modulo renaming the moved entities to more neutral names. The reason I am moving this to the "Symbol" library, is because both customers will be "Symbol"Files, and also the unwinding code lives in the Symbol library. From a purely dependency standpoint this code will probably be standalone, and so it could be moved all the way to Utility, but that seems too low for this kind of functionality. Reviewers: jasonmolenda, amccarth, clayborg, JDevlieghere, aleksandr.urakov Subscribers: aprantl, markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D60599 llvm-svn: 358976
* FuncUnwinders: remove "current_offset" from function argumentsPavel Labath2019-04-231-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This argument was added back in 2010 (r118882) to support the ability to unwind from functions whose eh_frame entry does not cover the entire range of the function. However, due to the caching happening in FuncUnwinders, this solution is very fragile. FuncUnwinders will cache the plan it got from eh_frame regardless of the value of the current_offset, so our ability to unwind from a given function depended what was the value of "current_offset" the first time that this function was called. Furthermore, since the "image show-unwind" command did not know what's the right offset to pass, this created an unfortunate situation where "image show-unwind" would show no valid plans for a function, even though they were available and being used. In this patch I implement the feature slightly differently. Instead of giving just a base address to the eh_frame unwinder, I give it the entire range we are interested in. Then, I change the unwinder to return the first plan that covers (even partially) that range. This way even a partial plan will be returned, regardless of the address in the function where we are stopped at. This solution is still not 100% correct, as it will not handle a function which is covered by two independent fde entries. However, I don't expect anybody will write this kind of functions, and this wasn't handled by the previous implementation either. If this is ever needed in the future. The eh_frame unwinder can be extended to return "composite" unwind plans created by merging sevelar fde entries. I also create a test which triggers this scenario. As doing this is virtually impossible without hand-written assembly, the test only works on x86 linux. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60829 llvm-svn: 358964
* One small tweak to LocateExecutableScriptingResources - IJason Molenda2019-04-231-2/+2
| | | | | | | | | was still stat'ing the possibly-dSYM FileSpec before I (more cheaply) checked the filepath for telltale dSYM components. <rdar://problem/50086007> llvm-svn: 358939
* Add a small check to PlatformDarwin::LoadScriptingResourceForModuleJason Molenda2019-04-231-3/+6
| | | | | | | | | | | | | | | | | which reads the python files in a dSYM bundle, to check that the SymbolFile is actually a dSYM bundle filepath; delay any fetching of the ScriptInterpreter until after we've done that check. When debugging a binary without a dSYM on darwin systems, the SymbolFile we fetch is actually the ObjectFile -- so we would do an unnecessary trip into Python land and stat around the filesystem looking for a python file to read in. There's no reason to do any of this unless the SymbolFile's file path includes the .dSYM bundle telltale path components. <rdar://problem/50065315> llvm-svn: 358938
* [NativePDB] Add anonymous namespaces supportAleksandr Urakov2019-04-222-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds anonymous namespaces support to the native PDB plugin. I had to reference from the main function variables of the types that are inside of the anonymous namespace to include them in debug info. Without the references they are not included. I think it's because they are static, then are visible only in the current translation unit, so they are not needed without any references to them. There is also the problem case with variables of types that are nested in template structs. For now I've left FIXME in the test because this case is not related to the change. Reviewers: zturner, asmith, labath, stella.stamenova, amccarth Reviewed By: amccarth Subscribers: zloyrobot, aprantl, teemperor, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D60817 llvm-svn: 358873
* [CodeComplete] Remove obsolete isOutputBinary().Sam McCall2019-04-181-1/+1
| | | | | | | | | | | | | | | | Summary: It's never set to true. Its only effect would be to set stdout to binary mode. Hopefully we have better ways of doing this by now :-) Reviewers: hokein Subscribers: jkorous, arphaman, kadircet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60871 llvm-svn: 358696
* [lldb] Don't filter variable list when doing a lookup by mangled name in ↵Kuba Mracek2019-04-181-1/+3
| | | | | | | | SymbolFileDWARF::FindGlobalVariables Differential Revision: https://reviews.llvm.org/D60737 llvm-svn: 358629
* [Process] Fix linux arm64 single step compilation failureAlex Langford2019-04-161-0/+1
| | | | | | | | This was updated in r356703 to use llvm::sys::RetryAfterSignal, which comes from llvm/Support/Errno.h. The header wasn't added, so it fails if you compile for arm64/aarch64. llvm-svn: 358530
* Breakpad: Match the new UUID algorithm in minidumpsPavel Labath2019-04-161-29/+12
| | | | | | | | | | | | | | | D59433 and D60501 changed the way UUIDs are computed from minidump files. This was done to synchronize the U(G)UID representation with the native tools of given platforms, but it created a mismatch between minidumps and breakpad files. This updates the breakpad algorithm to match the one found in minidumps, and also adds a couple of tests which should fail if these two ever get out of sync. Incidentally, this means that the module id in the breakpad files is almost identical to our notion of UUIDs, so the computation algorithm can be somewhat simplified. llvm-svn: 358500
* Fix compiler warning introduced by r358261Pavel Labath2019-04-121-0/+2
| | | | | | Add a virtual destructor to the class with virtual methods. llvm-svn: 358284
* PDBFPO: Improvements to the AST visitorPavel Labath2019-04-121-138/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to solve two issues made this code hard to follow for me. The first issue was that a lot of what these visitors do is mutate the AST. The visitor pattern is not particularly good for that because by the time you have performed the dynamic type dispatch, it's too late to go back to the parent node, and change its pointer. The previous code dealt with that relatively elegantly, but it still meant that one had to perform manual type checks, which is what the visitor pattern is supposed to avoid. The second issue was not being able to return values from the Visit functions, which meant that one had to store function results in member variables (a common problem with visitor patterns). Here, I solve both problems by making the visitor use a type switch instead of going through double dispatch on the visited object. This allows one to parameterize the visitor based on the return type and pass function results as function results. The mutation is fascilitated by having each Visit function take two arguments -- a reference to the object itself (with the correct dynamic type), and a reference to the parent's pointer to this object. Although this wasn't my explicit goal here, the fact that we're not using virtual dispatch anymore allows us to make the AST nodes trivially destructible, which is a good thing, since we were not destroying them anyway. Reviewers: aleksandr.urakov, amccarth Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60410 llvm-svn: 358261
* [lldb] [Process/NetBSD] Fix wrongly mapping mm* registersMichal Gorny2019-04-111-2/+2
| | | | | | | | | | | | | Fix mistake that mapped mm* registers into the space for xmm* registers, rather than the one shared with st* registers. In other words, 'register read mmN' now correctly shows the mmN register rather than part of xmmN. Includes a minimal lit regression test. Differential Revision: https://reviews.llvm.org/D60325 llvm-svn: 358178
* Minidump: extend UUID byte-swapping to windows platformPavel Labath2019-04-112-34/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D59433 added code to swap bytes UUIDs coming from minidump files, but only enabled it for apple platforms. Based on my research, I believe this is the correct thing to do for windows as well, as the natural way of printing U(G)UIDs on this platforms is to print the first three components as (4 or 2)-byte integers printed in natural (big-endian) order. This makes the UUID string coming out of lldb match the strings produced by other windows tools. The decision to byte-swap the age field is somewhat arbitrary, because the age field is usually printed separately from the file GUID (and often in decimal). However, for our purposes (telling whether two files are identical), including it in the UUID is correct, and printing it in big-endian makes it easier to recognize the age value. This also makes the UUIDs generated here (almost) match up with the UUIDs computed for breakpad symbol files (BreakpadRecords.cpp:parseModuleId), which already implemented the byte-swapping. The "almost" is here because ObjectFileBreakpad does not swap the age field, but I'll fix that in a follow-up. There is no UUID support in ObjectFileCOFF at the moment, but ideally the algorithms used here and in ObjectFileCOFF should be in sync so that object file matching works correctly. Reviewers: clayborg, amccarth, markmentovai, asmith Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60501 llvm-svn: 358169
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-10300-2185/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* Minidump: Use llvm parser for reading the ModuleList streamPavel Labath2019-04-105-109/+34
| | | | | | | | In this patch, I just remove the structure definitions for the ModuleList stream and the associated parsing code. The rest of the code is converted to work with the definitions in llvm. NFC. llvm-svn: 358070
* [lldb-server] Introduce Socket::Initialize and Terminate to simply WSASocket ↵Aaron Smith2019-04-101-6/+1
| | | | | | | | | | | | | | | | setup Reviewers: zturner, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60440 llvm-svn: 358044
* Minidump: use string parsing functionality from llvmPavel Labath2019-04-095-94/+30
| | | | llvm-svn: 357977
* Breakpad: Parse Stack CFI recordsPavel Labath2019-04-093-8/+67
| | | | | | | | | | | | | | | | | Summary: This patch adds support for parsing STACK CFI records from breakpad files. The expressions specifying the values of registers are not parsed.The idea is that these will be handed off to the postfix expression -> dwarf compiler, once it is extracted from the internals of the NativePDB plugin. Reviewers: clayborg, amccarth, markmentovai Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D60268 llvm-svn: 357975
* Rename Target::GetSharedModule to Target::GetOrCreateModule.Jason Molenda2019-04-088-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flag to control whether the ModulesDidLoad notification is called when a module is added. If the notifications are disabled, the caller must call ModulesDidLoad after adding all the new modules, but postponing this notification until they're all batched up can allow for better efficiency than notifying one-by-one. Change the name of the ModuleList notifier functions that a subclass can implement to start with 'Notify' to make it clear what they are. Add a NotifyModulesRemoved. Add header documentation for the changed/updated methods. Added defaulted-value 'notify' argument to ModuleList Append, AppendIfNeeded, and Remove because callers working with a local ModuleList don't have an obvious idea of what notify means in this context. When the ModuleList is a part of the Target class, the notify behavior matters. DynamicLoaderDarwin has been updated so that libraries being added/removed are correctly batched up before notifications are sent. Added the TestModuleLoadedNotifys.py test to run on Darwin to test this. <rdar://problem/48293064> Differential Revision: https://reviews.llvm.org/D60172 llvm-svn: 357955
* Experiment with a larger packet timeout.Adrian Prantl2019-04-081-2/+2
| | | | | | | | This is a follow-up to r357829 (https://reviews.llvm.org/D60340) to see whether increasing the packet timeout for non-asan builds could also positively affect the stability of non-asan bots. llvm-svn: 357954
* MinidumpParser: parse SystemInfo stream via llvmPavel Labath2019-04-082-18/+7
| | | | | | | I also update the tests for SystemInfo parsing to use the yaml2minidump capabilities in llvm instead of relying on checked-in binaries. llvm-svn: 357896
* PDBFPO: add dyn_cast supportPavel Labath2019-04-081-7/+25
| | | | | | | This adds the necessary glue so we can use llvm::dyn_cast, instead of doing a manual type-check followed by a cast. NFC. llvm-svn: 357895
* Unify random timeouts throughout LLDB and make them configurable.Adrian Prantl2019-04-0514-28/+24
| | | | | | | | | | | | | | | | | Since these timeouts guard against catastrophic error in debugserver, I also increased all of them to the maximum value among them. The motivation for this test was the observation that an asanified LLDB would often exhibit seemingly random test failures that could be traced back to debugserver packets getting out of sync. With this path applied I can no longer reproduce the one particular failure mode that I was investigating. rdar://problem/49441261 Differential Revision: https://reviews.llvm.org/D60340 llvm-svn: 357829
* MinidumpParser: use minidump parser in llvm/ObjectPavel Labath2019-04-054-118/+23
| | | | | | | | | | | | | | | | | | This patch removes the lower layers of the minidump parsing code from the MinidumpParser class, and replaces it with the minidump parser in llvm. Not all functionality is already avaiable in the llvm class, but it is enough for us to be able to stop enumerating streams manually, and rely on the minidump directory parsing code from the llvm class. This also removes some checked-in binaries which were used to test error handling in the parser, as the error handling is now done (and tested) in llvm. Instead I just add one test that ensures we correctly propagate the errors reported by the llvm parser. The input for this test can be written in yaml instead of a checked-in binary. llvm-svn: 357748
* PDBFPO: Use references instead of pointers, where possiblePavel Labath2019-04-051-65/+63
| | | | | | | | | | | | | | | | | | | Summary: The code was passing pointers around, expecting they would be not null. In c++ it is possible to convey this notion explicitly by using a reference instead. Not all uses of pointers could be converted to references (e.g. one can't store references in a container), but this will at least make it locally obvious that code is dealing with nonnull pointers. Reviewers: aleksandr.urakov, amccarth Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60271 llvm-svn: 357744
* Breakpad: Refine record classification codePavel Labath2019-04-043-34/+58
| | | | | | | | | | | | | | | | | Previously we would classify all STACK records into a single bucket. This is not really helpful, because there are three distinct types of records beginning with the token "STACK" (STACK CFI INIT, STACK CFI, STACK WIN). To be consistent with how we're treating other records, we should classify these as three different record types. It also implements the logic to put "STACK CFI INIT" and "STACK CFI" records into the same "section" of the breakpad file, as they are meant to be read together (similar to how FUNC and LINE records are treated). The code which performs actual parsing of these records will come in a separate patch. llvm-svn: 357691
* Add dropped ManualDWARFIndex assert()Jan Kratochvil2019-04-041-0/+3
| | | | | | | | D47253 dropped this assertion. Differential Revision: https://reviews.llvm.org/D60254 llvm-svn: 357678
* [codeview] Remove Type member from CVRecordReid Kleckner2019-04-041-1/+1
| | | | | | | | | | | | | | | | | Summary: Now CVType and CVSymbol are effectively type-safe wrappers around ArrayRef<uint8_t>. Make the kind() accessor load it from the RecordPrefix, which is the same for types and symbols. Reviewers: zturner, aganea Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60018 llvm-svn: 357658
* Attempt #2 to get this patch working. I will watch the build bots carefully ↵Greg Clayton2019-04-031-7/+35
| | | | | | | | | | | | | | | | today. Allow partial UUID matching in Minidump core file plug-in Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files. This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it. Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match. Differential Revision: https://reviews.llvm.org/D60001 llvm-svn: 357603
* Avoid macro redefinition error if HAVE_LIBCOMPRESSIONJason Molenda2019-04-031-0/+2
| | | | | | is already defined. llvm-svn: 357553
* Revert r357504, r357491, r357482 because of bot breakage.Adrian Prantl2019-04-021-35/+7
| | | | | | | | | | | | | See discussion in https://reviews.llvm.org/D60001. Revert Clean up windows build bot. This reverts r357504 (git commit 380c2420ecb0c3e809b04f385d37b89800df1ecf) Revert Fix buildbot where paths were not matching up. This reverts r357491 (git commit 5050586860140b55a0cc68c77dd1438f44a23ca5) Revert Allow partial UUID matching in Minidump core file plug-in This reverts r357482 (git commit 838bba9c34bf1e5500c2e100327bc764afc8d367) llvm-svn: 357534
* [NativePDB] Don't fail on import modules.Zachary Turner2019-04-021-2/+11
| | | | | | | | | | | A recent patch to LLD started emitting information about import modules. These are represented as compile units in the PDB, but with no additional debug info. This was confusing the native pdb reader, who expected that the debug info stream be present. This should fix failing tests on the Windows bots. llvm-svn: 357513
* Allow partial UUID matching in Minidump core file plug-inGreg Clayton2019-04-021-7/+35
| | | | | | | | | | | | Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files. This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it. Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match. Differential Revision: https://reviews.llvm.org/D60001 llvm-svn: 357482
* PDBFPO: Refactor register reference resolutionPavel Labath2019-04-021-60/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This refactors moves the register name->number resolution out of the FPOProgramNodeRegisterRef class. Instead I create a special FPOProgramNodeSymbol class, which holds unresolved symbols, and move the resolution into the ResolveRegisterRefs visitor. The background here is that I'd like to use this code for Breakpad unwind info, which uses similar syntax to describe unwind info. For example, a simple breakpad unwind program might look like: .cfa: $esp 8 + $ebp: .cfa 8 - ^ To be able to do this, I need to be able to customize register resolving, as that is presently hardcoded to use codeview register names, but breakpad supports a lot more architectures with different register names. Moving the resolution into a separate class will allow each user to use a different resolution logic. Reviewers: aleksandr.urakov, zturner, amccarth Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D60068 llvm-svn: 357455
* [lldb] [Process/elf-core] Support aarch64 NetBSD core dumpsMichal Gorny2019-04-013-0/+34
| | | | | | | | | | | Include support for NetBSD core dumps from evbarm/aarch64 system, and matching test cases for them. Based on earlier work by Kamil Rytarowski. Differential Revision: https://reviews.llvm.org/D60034 llvm-svn: 357399
* [Linux/x86] Fix writing of non-gpr registers on newer processorsPavel Labath2019-04-012-51/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We're using ptrace(PTRACE_SETREGSET, NT_X86_XSTATE) to write all non-gpt registers on x86 linux. Unfortunately, this method has a quirk, where the kernel rejects all attempts to write to this area if one supplies a buffer which is smaller than the area size (even though the kernel will happily accept partial reads from it). This means that if the CPU supports some new registers/extensions that we don't know about (in my case it was the PKRU extension), we will fail to write *any* non-gpr registers, even those that we know about. Since this is a situation that's likely to appear again and again, I add code to NativeRegisterContextLinux_x86_64 to detect the runtime size of the area, and allocate an appropriate buffer. This does not mean that we will start automatically supporting all new extensions, but it does mean that the new extensions will not prevent the old ones from working. This fixes tests attempting to write to non-gpr registers on new intel processors (cca Kaby Lake Refresh). Reviewers: jankratochvil, davezarzycki Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D59991 llvm-svn: 357376
* [Python] Remove Python include from ScriptInterpreterPython.hJonas Devlieghere2019-03-294-767/+773
| | | | | | | | | | | This patch limits the scope of the python header to the implementation of the python script interpreter plugin. ScriptInterpreterPython is now an abstract interface that doesn't expose any Python specific types, and is implemented by the ScriptInterpreterPythonImpl. Differential revision: https://reviews.llvm.org/D59976 llvm-svn: 357307
* [ScriptInterpreterPython] Remove unused field (NFC)Jonas Devlieghere2019-03-292-2/+1
| | | | | | The m_lldb_module was initialized but not used. llvm-svn: 357292
* [CMake] Move link dependencies where they are used.Jonas Devlieghere2019-03-291-0/+2
| | | | | | | | | The utility library shouldn't depend on curses, libedit or python. Move curses to core, libedit to host and python to the python plugin. Differential revision: https://reviews.llvm.org/D59970 llvm-svn: 357287
* [NFC] find_first_of/find_last_of -> find/rfind for single char.Jonas Devlieghere2019-03-281-2/+2
| | | | | | | | | For a single char argument, find_first_of is equal to find and find_last_of is equal to rfind. While playing around with the plugin stuff this caused an export failure because it always got inlined except once, which resulted in an undefined symbol. llvm-svn: 357198
* [ObjectFileMachO] Remove another debugging aid.Davide Italiano2019-03-281-7/+0
| | | | | | Pointed out by Jason. llvm-svn: 357135
* [ObjectFileMachO] Disable memory caching for savecore.Davide Italiano2019-03-281-13/+6
| | | | | | | | | | | | | | | | | Summary: It's not really useful, and largely increases the footprint. <rdar://problem/49293525> Reviewers: jasonmolenda Subscribers: llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59896 llvm-svn: 357134
* [Python] Remove unused includesJonas Devlieghere2019-03-273-15/+7
| | | | llvm-svn: 357126
* Kill unused variable m_tu_decl_up in SymbolFilePDBNathan Lanza2019-03-272-10/+1
| | | | | | | | | | | | | | | | | | Summary: An TranslationUnitDecl was being brought in from the clang::ASTContext which required clang specific code to exist in SymbolFilePDB. Since it was unused we can just get rid of it along with the clang specific code. Reviewers: rnk, zturner, compnerd Reviewed By: compnerd Subscribers: jdoerfert Differential Revision: https://reviews.llvm.org/D59804 llvm-svn: 357113
* [Platform] Remove Kalimba PlatformJonas Devlieghere2019-03-275-311/+2
| | | | | | | | | This patch removes the Kalimba platform. For more information please refer to the corresponding thread on the mailing list. http://lists.llvm.org/pipermail/lldb-dev/2019-March/014921.html llvm-svn: 357086
* minidump: Add ability to attach (breakpad) symbol files to placeholder modulesPavel Labath2019-03-271-43/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-commits r354263, which was because it uncovered with handling of modules with empty (zero) UUIDs. This would cause us to treat two modules as intentical even though they were not. This caused an assert in PlaceholderObjectFile::SetLoadAddress to fire, because we were trying to load the module twice even though it was designed to be only loaded at a specific address. (The same problem also existed with the previous implementation, but it had no asserts to warn us about this.) These issues have now been fixed in r356896. windows bot. The issue there was that ObjectFilePECOFF vended its base address through the incorrect interface. SymbolFilePDB depended on that, which lead to assertion failures when SymbolFilePDB was attempting to use the placeholder object files as a base. This has been fixed in r354258 The original commit message was: The reason this wasn't working was that ProcessMinidump was creating odd object-file-less modules, and SymbolFileBreakpad required the module to have an associated object file because it needed to get its base address. This fixes that by introducing a PlaceholderObjectFile to serve as a dummy object file. The general idea for this is taken from D55142, but I've reworked it a bit to avoid the need for the PlaceholderModule class. Now that we have an object file, our modules are sufficiently similar to regular modules that we can use the regular Module class almost out of the box -- the only thing I needed to tweak was the Module::CreateModuleFromObjectFile functon to set the module's FileSpec in addition to it's architecture. This wasn't needed for ObjectFileJIT (the other user of CreateModuleFromObjectFile), but it shouldn't hurt it either, and the change seems like a straightforward extension of this function. Reviewers: clayborg, lemo, amccarth Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D57751 llvm-svn: 357060
* Fix a "memset clearing an object of non-trivial type" warning in DWARFFormValuePavel Labath2019-03-271-1/+1
| | | | | | | | This is diagnosed by gcc-8. The ValueType struct already has a default constructor which performs zero-initialization, so we can just call that instead of using memset. llvm-svn: 357056
* Fix an out-of-bounds error in RegisterContextDarwin_arm64Pavel Labath2019-03-271-2/+3
| | | | | | | | | | | | | | | | | Summary: gcc diagnoses this as "array subscript 63 is above array bounds of 'RegisterContextDarwin_arm64::VReg [32]'". The correct fix seems to be subtracting the fpu register base index, but I have no way of verifying that this actually works. Reviewers: jasonmolenda Subscribers: javed.absar, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D59495 llvm-svn: 357055
OpenPOWER on IntegriCloud