summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
...
* PostfixExpression: Use signed integers in IntegerNodePavel Labath2019-05-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is necessary to support parsing expressions like ".cfa -16 + ^", as that format is used in breakpad STACK CFI expressions. Since the PDB expressions use the same parser, this change will affect them too, but I don't believe that should be a problem in practice. If PDBs do contain the negative values, it's very likely that they are intended to be parsed the same way, and if they don't, then it doesn't matter. In case that we do ever need to handle this differently, we can always make the parser behavior customizable, or just use a different parser. To make sure that the integer size is big enough for everyone, I switch from using a (unsigned) 32-bit integer to a 64-bit (signed) one. Reviewers: amccarth, clayborg, aleksandr.urakov Subscribers: markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D61311 llvm-svn: 360166
* RegisterContextLLDB: Push CFA value on DWARF stack when evaluating register ↵Pavel Labath2019-05-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | expressions Summary: This behavior is specified in the Section 6.4.2.3 (Register Rule instructions) of the DWARF4 spec. We were not doing that, which meant that any register rule which was relying on the cfa value being there was not evaluated correctly (it was aborted due to "out of bounds" access). I'm not sure how come this wasn't noticed before, but I guess this has something to do with the fact that dwarf unwind expressions are not used very often, and when they are, the situation is so complicated that the CFA is of no use. I noticed this when I started emitting dwarf expressions for the unwind information present in breakpad symbol files. Reviewers: jasonmolenda, clayborg Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D61018 llvm-svn: 360158
* [lldb] Add MacroQualified switch cases for r360109Krasimir Georgiev2019-05-071-0/+6
| | | | | | | | | | | | | | | | | | Summary: r360109 added a new enum case, causing lldb build to fail with several errors like: lldb/source/Symbol/ClangASTContext.cpp:4342:11: error: enumeration value 'MacroQualified' not handled in switch [-Werror,-Wswitch] switch (qual_type->getTypeClass()) { ^ This adds the missing switch cases. I'm not an lldb maintainer and just used my best judgement that it's probably expected that we break in these cases. Feel free to ping / revert / fix this change if this behavior is not appropriate. Reviewers: gribozavr Reviewed By: gribozavr Differential Revision: https://reviews.llvm.org/D61640 llvm-svn: 360146
* [Breakpoint] Remove unused dependencyAlex Langford2019-05-072-2/+0
| | | | | | | | | | The CPlusPlus Language plugin is unused in lldbBreakpoint. We should just remove it. A great follow up to this change would be to remove the dependency on the ObjC language plugin, but that is actually used and requires some refactoring. llvm-svn: 360105
* [Driver] Change the way we deal with local lldbinit files.Jonas Devlieghere2019-05-061-5/+3
| | | | | | | | | | | | | | | | Currently we have special handling for local lldbinit files in the driver. At the same time, we have an SB API named `SourceInitFileInCurrentWorkingDirectory` that does the same thing. This patch removes the special handling from the driver and uses the API instead. In addition to the obvious advantages of having one canonical way of doing things and removing code duplication, this change also means that the code path is the same for global and local lldb init files. Differential revision: https://reviews.llvm.org/D61577 llvm-svn: 360077
* Include inlined functions when figuring out a contiguous address rangeGreg Clayton2019-05-067-32/+101
| | | | | | | | | | | | | | | | | | | | | | | Checking this in for Antonio Afonso: This diff changes the function LineEntry::GetSameLineContiguousAddressRange so that it also includes function calls that were inlined at the same line of code. My motivation is to decrease the step over time of lines that heavly rely on inlined functions. I have multiple examples in the code base I work that makes a step over stop 20 or mote times internally. This can easly had up to step overs that take >500ms which I was able to lower to 25ms with this new strategy. The reason the current code is not extending the address range beyond an inlined function is because when we resolve the symbol at the next address of the line entry we will get the entry line corresponding to where the original code for the inline function lives, making us barely extend the range. This then will end up on a step over having to stop multiple times everytime there's an inlined function. To check if the range is an inlined function at that line I also get the block associated with the next address and check if there is a parent block with a call site at the line we're trying to extend. To check this I created a new function in Block called GetContainingInlinedBlockWithCallSite that does exactly that. I also added a new function to Declaration for convinence of checking file/line named CompareFileAndLine. To avoid potential issues when extending an address range I added an Extend function that extends the range by the AddressRange given as an argument. This function returns true to indicate sucess when the rage was agumented, false otherwise (e.g.: the ranges are not connected). The reason I do is to make sure that we're not just blindly extending complete_line_range by whatever GetByteSize() we got. If for some reason the ranges are not connected or overlap, or even 0, this could be an issue. I also added a unit tests for this change and include the instructions on the test itself on how to generate the yaml file I use for testing. Differential Revision: https://reviews.llvm.org/D61292 llvm-svn: 360071
* Initialization: move InstructionEmulation to full initializationSaleem Abdulrasool2019-05-063-14/+13
| | | | | | | | The debug server does not need to use the instruction emulation. This helps reduce the size of the final lldb-server binary by another ~100K (~1% savings). llvm-svn: 360067
* Merge GetCompileUnitAtOffset + GetCompileUnitContainingDIEOffsetJan Kratochvil2019-05-062-49/+27
| | | | | | | | | | | | | | | | These two methods are very similar and various refactorizations need to modify both similar ways. One could also just remove GetCompileUnitAtOffset and make GetCompileUnitContainingDIEOffset to also accept offset of the CU itself (currently it accepts only DIE offsets after the CU header). But that would be less safe regarding some internal sanity checking. Further code refactorization has been suggested by Pavel Labath. Differential Revision: https://reviews.llvm.org/D61498 llvm-svn: 360038
* Revert r359949 "[clang] adding explicit(bool) from c++2a"Hans Wennborg2019-05-061-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused Clang to start erroring on the following: struct S {   template <typename = int> explicit S(); }; struct T : S {}; struct U : T {   U(); }; U::U() {} $ clang -c /tmp/x.cc /tmp/x.cc:10:4: error: call to implicitly-deleted default constructor of 'T' U::U() {}    ^ /tmp/x.cc:5:12: note: default constructor of 'T' is implicitly deleted because base class 'S' has no default constructor struct T : S {};            ^ 1 error generated. See discussion on the cfe-commits email thread. This also reverts the follow-ups r359966 and r359968. > this patch adds support for the explicit bool specifier. > > Changes: > - The parsing for the explicit(bool) specifier was added in ParseDecl.cpp. > - The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class. > - Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted. > - Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration. > - The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected. > - Test for Semantic and Serialization were added. > > This patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback. > Perhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky. > > Patch by Tyker > > Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360024
* [DWARF] Reimplement/simplify DWARFUnit::GetIDPavel Labath2019-05-068-41/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The implementation of GetID used a relatively complicated algorithm, which returned some kind of an offset of the unit in some file (depending on the debug info flavour). The only thing this ID was used for was to enable subseqent retrieval of the unit from the SymbolFile. This can be made simpler if we just make the "ID" of the unit an index into the list of the units belonging to the symbol file. We already support indexed access to the units, so each unit already has a well "index" -- this just makes it accessible from within the unit. To make the distincion between "id" and "offset" clearer (and help catch any misuses), I also rename DWARFDebugInfo::GetCompileUnit (which accesses by offset) into DWARFDebugInfo::GetCompileUnitAtOffset. On its own, this only brings a minor simplification, but it enables further simplifications in the DIERef class (coming in a follow-up patch). Reviewers: JDevlieghere, clayborg, aprantl Subscribers: arphaman, jdoerfert, lldb-commits, tberghammer, jankratochvil Differential Revision: https://reviews.llvm.org/D61481 llvm-svn: 360014
* [lldb] Fix buildbot failure due to clang AST change.Nicolas Lesser2019-05-041-2/+6
| | | | | | | In r359949 several AST node constructors were modified without the corresponding change in lldb, which caused build failures. llvm-svn: 359966
* ExpressionParser: only force link MCJIT when neededSaleem Abdulrasool2019-05-032-5/+5
| | | | | | | | | | | This was added to support FreeBSD. The inclusion of this header increases the size of `lldb-server` due to MCJIT being forcefully preserved. Conditionalise the inclusion to shared builds of LLVM which will allow for MCJIT to be stripped if unnecessary when performing static linking of tools. This shaves off ~28% of the binary size for lldb-server when linked with gold using `-ffunction-sections` and `-fdata-sections`. llvm-svn: 359944
* Fixed some minor style issues in rLLDB359921 [NFC]Raphael Isemann2019-05-031-4/+4
| | | | | | | | Ran clang-format on the added test file and use the new StringRef comparison over the temporary ConstStrings. Also aligned the end of one of the code string literals. llvm-svn: 359931
* [Alias] Add 're' alias for registerJonas Devlieghere2019-05-031-0/+5
| | | | | | | | | | This patch makes `re` an alias for `register`. Currently `re<TAB>` gives you the choice between `register` and `reproducer`. Given that you use `register` a lot more often, it should win for the common substring. Differential revision: https://reviews.llvm.org/D61469 llvm-svn: 359927
* Supply a default implementation of IsRuntimeSupportValue.Adrian Prantl2019-05-031-0/+4
| | | | | | Thanks to Pavel for pointing this out. llvm-svn: 359925
* Fix for ambiguous lookup in expressions between local variable and namespaceShafik Yaghmour2019-05-031-13/+27
| | | | | | | | | Summary: In an Objective-C context a local variable and namespace can cause an ambiguous name lookup when used in an expression. The solution involves mimicking the existing C++ solution which is to add local using declarations for local variables. This causes a different type of lookup to be used which eliminates the namespace during acceptable results filtering. Differential Revision: https://reviews.llvm.org/D59960 llvm-svn: 359921
* C.128 override, virtual keyword handlingRaphael Isemann2019-05-0321-38/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: According to [C128] "Virtual functions should specify exactly one of `virtual`, `override`, or `final`", I've added override where a virtual function is overriden but the explicit `override` keyword was missing. Whenever both `virtual` and `override` were specified, I removed `virtual`. As C.128 puts it: > [...] writing more than one of these three is both redundant and > a potential source of errors. I anticipate a discussion about whether or not to add `override` to destructors but I went for it because of an example in [ISOCPP1000]. Let me repeat the comment for you here: Consider this code: ``` struct Base { virtual ~Base(){} }; struct SubClass : Base { ~SubClass() { std::cout << "It works!\n"; } }; int main() { std::unique_ptr<Base> ptr = std::make_unique<SubClass>(); } ``` If for some odd reason somebody removes the `virtual` keyword from the `Base` struct, the code will no longer print `It works!`. So adding `override` to destructors actively protects us from accidentally breaking our code at runtime. [C128]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c128-virtual-functions-should-specify-exactly-one-of-virtual-override-or-final [ISOCPP1000]: https://github.com/isocpp/CppCoreGuidelines/issues/1000#issuecomment-476951555 Reviewers: teemperor, JDevlieghere, davide, shafik Reviewed By: teemperor Subscribers: kwk, arphaman, kadircet, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61440 llvm-svn: 359868
* Revert "Initialization: move InstructionEmulation to full initialization"Pavel Labath2019-05-033-13/+14
| | | | | | | This change is bogus. lldb-server definitely uses instruction emulation on some architectures. llvm-svn: 359862
* [Reproducers] Improve reproducer helpJonas Devlieghere2019-05-031-7/+18
| | | | | | Extend the documentation for the reproducer command. llvm-svn: 359848
* RegisterContextLLDB::GetFullUnwindPlanForFrame has four verboseJason Molenda2019-05-021-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | logging messages that are written the same, making it difficult to know for certain which code path was taken based on a logfile. Add some words to make each unique. Right now the ordering for finding a FullUnwindPlan (ignoring fallback unwind plan logic) is 1. If this is a _sigtramp like function, try eh_frame which is hand written on darwin systems to account for finding the saved register context correctly. 2. Ask the DynamicLoader if eh_frame should be preferred for this frame. Some binaries on the system may have hand-written eh_frame and the DynamicLoader is the source for this. (primarily this is for hand-written assembly in the objc runtime, and we tell lldb to trust that for functions in libobjc.dylib.) 3. if 0th frame, use GetUnwindPlanAtNonCallSite plan. 4. GetUnwindPlanAtCallSite {for 0th or any other} 5. GetUnwindPlanAtNonCallSite {now for non-0th frames, only if not from a compiler? hm.} 6. GetUnwindPlanArchitectureDefaultAtFunctionEntry if we're on the first instruction 7. Architectural default unwind plan ABI::CreateDefaultUnwindPlan I'm moving #6 -- DefaultAtFunctionEntry -- up to between #3 and #4, where we're already doing things specific to the zeroth frame. If we're on the zeroth frame and the GetUnwindPlanAtNonCallSite plan has failed for some reason, and we're on the first instruction, we should definitely use DefaultAtFunctionEntry instead of any other unwind plan. If we're trying to step out of some rando function on the system that we couldn't assembly instruction inspect, this is sufficient for us to step out of it. llvm-svn: 359847
* Upstreaming an apple local patch by Frederic Riss.Jason Molenda2019-05-021-1/+32
| | | | | | | | | | | | | | | | | | | lldb has an expression that runs in the inferior process to collect the isa values and hash of the class names for classes in the system's shared cache. In recent OSes, swift classes are in this table and the function the jitted expression calls returns demangled names. We need to compute the hashes based on the mangled names. So for these names, return a hash value of 0 which indicates that lldb should read the class name directly out of the runtime tables and compute the hash itself. When this patch is absent, the lldb+swift testsuite has many failures on a recent macOS system; there isn't a direct non-swift way to test for this being correct. <rdar://problem/47935062> llvm-svn: 359843
* Hide runtime support values such as clang's __vla_expr from frame variableAdrian Prantl2019-05-023-2/+44
| | | | | | | | | | | | by respecting the "artificial" attribute on variables. Function arguments that are artificial and useful to end-users are being whitelisted by the language runtime. <rdar://problem/45322477> Differential Revision: https://reviews.llvm.org/D61451 llvm-svn: 359841
* Initialization: move InstructionEmulation to full initializationSaleem Abdulrasool2019-05-023-14/+13
| | | | | | | The debug server does not need to use the instruction emulation. This helps reduce the size of the final lldb-server binary by another ~100K (~1% savings). llvm-svn: 359832
* Initialization: correct macro usageSaleem Abdulrasool2019-05-021-4/+4
| | | | | | | `_MSC_VER` indiciates that you are building with MSVC, not that you are building for Windows. Use `_WIN32` (which identifies Win32 and Win64). llvm-svn: 359817
* gdb-remote: fix the build on WindowsSaleem Abdulrasool2019-05-021-0/+3
| | | | | | | Windows does not have a definition for `mode_t`. Include the appropriate header. llvm-svn: 359816
* Remove unnecessary check in SymbolFileDWARF::ParseImportedModulesRaphael Isemann2019-05-021-3/+0
| | | | | | | | | | | | | | | | | | Summary: This check seems unnecessary as we already assert the same condition above and also access `sc.comp_unit` before this check. Reviewers: aprantl Reviewed By: aprantl Subscribers: jdoerfert, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61394 llvm-svn: 359813
* gdb-remote: reduce some inclusion of Target/Process.hSaleem Abdulrasool2019-05-027-7/+7
| | | | | | | Reduce the inclusion of Target/Process.h to help isolate why Process is being preserved during the build of `lldb-server`. llvm-svn: 359811
* Initialization: remove ObjectContainer from CommonSaleem Abdulrasool2019-05-023-13/+8
| | | | | | | | | This restructures the initialization path to move the ObjectContainer initialization into the *full* initialization path. This is not needed for the lldb-server initialization path. This helps strip off ~1MiB from the binary. llvm-svn: 359810
* Add std::stack and std::queue support to CxxModuleHandlerRaphael Isemann2019-05-021-0/+2
| | | | | | | | | | | | | | Reviewers: aprantl, shafik Reviewed By: aprantl, shafik Subscribers: lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D61305 llvm-svn: 359779
* Rename Minion to ASTImporterDelegateRaphael Isemann2019-05-021-45/+52
| | | | | | | | | | | | | | | | | | Summary: I think there universal agreement that Minion isn't the best name for this class. This patch renames the class to ASTImporterDelegate to better reflect it's goal of monitoring and extending the ASTImporter. Reviewers: aprantl, shafik, martong, a.sidorin, davide Reviewed By: aprantl, shafik, davide Subscribers: rnkovacs, davide, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61299 llvm-svn: 359777
* Inject only relevant local variables in the expression evaluation contextRaphael Isemann2019-05-024-18/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In r259902, LLDB started injecting all the locals in every expression evaluation. This fixed a bunch of issues, but also caused others, mostly performance regressions on some codebases. The regressions were bad enough that we added a setting in r274783 to control the behavior and we have been shipping with the setting off to avoid the perf regressions. This patch changes the logic injecting the local variables to only inject the ones present in the expression typed by the user. The approach is fairly simple and just scans the typed expression for every local name. Hopefully this gives us the best of both world as it just realizes the types of the variables really used by the expression. Landing this requires the 2 other issues I pointed out today to be addressed but I wanted to gather comments right away. Original patch by Frédéric Riss! Reviewers: jingham, clayborg, friss, shafik Reviewed By: jingham, clayborg Subscribers: teemperor, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D46551 llvm-svn: 359773
* Fix MSVC buildPavel Labath2019-05-022-2/+2
| | | | | | | | Address an ambiguity between lldb_private::Thread and llvm::minidump::Thread. Follow-up to llvm r359762 (which introduced the second type). llvm-svn: 359765
* Mention the thread-format & frame-format settings in help.Jim Ingham2019-05-022-3/+10
| | | | | | | | | You can only find out about this useful customization by browsing the settings list output or the llvm.org web pages. Mention it in the help for thread list, thread backtrace & _regex_bt commands to make it more discoverable. llvm-svn: 359752
* [CommandObjectCommands] Honor stop-command-source-on-errorJonas Devlieghere2019-05-021-2/+7
| | | | | | | | | | | | This patch ensures that we honor the stop-command-source-on-error setting from `command source`. The problem is that we didn't differentiate between the boolean value being true or false, or not being set. For the latter scenario, we should calculate the value in the command interpreter based on the global options. Differential revision: https://reviews.llvm.org/D61406 llvm-svn: 359750
* [CMake] Remove EmulateInstructionMIPS dependency on InterpreterAlex Langford2019-05-022-2/+4
| | | | llvm-svn: 359748
* Set a CXXRecordDecl to not be passed in registers if DW_CC_pass_by_reference ↵Shafik Yaghmour2019-05-011-0/+8
| | | | | | | | | | | | | when loading from DWARF Summary: This will fix a bug where during expression parsing we are not setting a CXXRecordDecl to not be passed in registers and the resulting code generation is wrong. The DWARF attribute DW_CC_pass_by_reference tells us that we should not be passing in registers i.e. RAA_Indirect. This change depends this clang change which fixes the fact that the ASTImporter does not copy RecordDeclBits for CXXRecordDecl: https://reviews.llvm.org/D61140 Differential Revision: https://reviews.llvm.org/D61146 llvm-svn: 359732
* Removed unnecessary conversion to StringRefRaphael Isemann2019-05-011-3/+1
| | | | llvm-svn: 359664
* [CMake] Correct lldbPluginProcessPOSIX dependenciesAlex Langford2019-05-011-1/+1
| | | | | | | This plugin does not depend on lldbInterpreter. It only depends on lldbUtility. llvm-svn: 359645
* Sort Symbol/CMakeLists.txtJonas Devlieghere2019-04-301-5/+5
| | | | | | This makes resolving merge conflicts downstream a tad easier. llvm-svn: 359577
* [lldb] [Process/NetBSD] Fix handling piod_len from PT_IO callsMichal Gorny2019-04-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | Fix bugs in piod_len return value processing in ReadMemory() and WriteMemory() methods. In particular, add support for piod_len == 0 indicating EOF, and fix summing bytes_read/bytes_written when PT_IO does partial reads/writes. The EOF condition could happen if LLDB attempts to read past vm.maxaddress, e.g. as a result of RBP containing large (invalid) value. Previously, the 0 return caused the function to retry reading via PT_IO indefinitely, effectively deadlooping lldb-server. Partial reads probably did not occur in practice, yet they would cause ReadMemory() to return incorrect bytes_read and/or overwrite previously read data. WriteMemory() suffered from analoguous problems. Differential Revision: https://reviews.llvm.org/D61310 llvm-svn: 359572
* PostfixExpression: Introduce InitialValueNodePavel Labath2019-04-301-2/+27
| | | | | | | | | | | | | | | | | | | | | | | Summary: This node represents can be used to refer to the initial value, which is sometimes pushed onto the DWARF stack as the "input" to the DWARF expression. The typical use case (and the reason why I'm introducing it) is that the "Canonical Frame Address" is passed this way to the DWARF expressions computing the values of registers during frame unwind. The nodes are converted into dwarf by keeping track of DWARF stack depth an any given point, and then copying the initial value from the bottom of the stack via the DW_OP_pick opcode. This could be made more efficient for simple expressions, but here I chose to start with the most general implementation possible. Reviewers: amccarth, clayborg, aleksandr.urakov Subscribers: aprantl, jasonmolenda, lldb-commits, markmentovai Differential Revision: https://reviews.llvm.org/D61183 llvm-svn: 359560
* Sort containers alphabetically in CxxModuleHandler [NFC]Raphael Isemann2019-04-301-3/+3
| | | | llvm-svn: 359546
* Instantiate 'std' templates explicitly in the expression evaluatorRaphael Isemann2019-04-307-1/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a follow-up for D58125. It implements the manual instantiation and merging of 'std' templates like `std::vector` and `std::shared_ptr` with information from the debug info AST. This (finally) allows using these classes in the expression evaluator like every other class (i.e. things like `vec.size()` and shared_ptr debugging now works, yay!). The main logic is the `CxxModuleHandler` which intercept the ASTImporter import process and replaces any `std` decls by decls from the C++ module. The decls from the C++ module are "imported" by just deserializing them directly in the expression evaluation context. This is mostly because we don't want to rely on the ASTImporter to correctly import these declarations, but in the future we should also move to the ASTImporter for that. This patch doesn't contain the automatic desugaring for result variables. This means that if you call for example `size` of `std::vector` you maybe get some very verbose typedef'd type as the variable type, e.g. `std::vector<int, std::allocator<int>>::value_type`. This is not only unreadable, it also means that our ASTImporter has to import all these types and associated decls into the persisent variable context. This currently usually leads to some assertion getting triggered in Clang when the ASTImporter either makes a mistake during importing or our debug info AST is inconsitent. The current workaround I use in the tests is to just cast the result to it's actual type (e.g. `size_t` or `int`) to prevent the ASTImporter from having to handle all these complicated decls. The automatic desugaring will be a future patch because I'm not happy yet with the current code for that and because I anticipate that this will be a controversial patch. Reviewers: aprantl, shafik, jingham, martong, serge-sans-paille Reviewed By: martong Subscribers: balazske, rnkovacs, mgorny, mgrang, abidh, jdoerfert, lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D59537 llvm-svn: 359538
* [PECOFF] Implementation of ObjectFilePECOFF:: GetUUID()Aaron Smith2019-04-302-31/+99
| | | | | | | | | | | | | | | | | | | Summary: Provide an implementation of GetUUID() for remote debugging scenarios. Return a PDB's GUID (or PDB70's Signature) as the UUID. Reviewers: amccarth, labath Reviewed By: labath Subscribers: amccarth, clayborg, Hui, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56229 llvm-svn: 359528
* Fix a stack-smasher in PlatformMacOSX::GetSDKDirectory()Adrian Prantl2019-04-291-1/+1
| | | | | | | | | GetSDKVersion expects the number of version fields not their byte size and will happily overwrite later contents of the stack. Differential Revision: https://reviews.llvm.org/D61218 llvm-svn: 359471
* Editline: Fix an msan errorPavel Labath2019-04-291-3/+7
| | | | | | | | | | | | | | | | | | | | Summary: libedit implementation of el_get(EL_GETTC) had a bug, where it was consuming vararg arguments until reaching the first null pointer (and not just two, as documented). This was causing (at least) errors to be reported when running the tests under msan. The issue has since been fixed in libedit, but this adds patch adds a trivial workaround, so that we operate correctly with the libedit versions which are already out there. Reviewers: christos, krytarowski, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D61191 llvm-svn: 359449
* DWARFExpression: Fix implementation of DW_OP_pickPavel Labath2019-04-292-1/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: The DWARF spec states that the DWARF stack arguments are numbered from the top. Our implementation of DW_OP_pick was counting them from the bottom. This bug probably wasn't noticed because nobody (except my upcoming postfix-to-DWARF converter) uses DW_OP_pick, but I've cross-checked with gdb to confirm that counting from the top is the expected behavior. This patch fixes the implementation to match the spec and gdb behavior and adds a test. Reviewers: jasonmolenda, clayborg Subscribers: mgorny, aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D61182 llvm-svn: 359436
* [Windows] Dump more information about access violation exceptionAleksandr Urakov2019-04-292-0/+72
| | | | | | | | | | | | | | | | | | | | Summary: Dump more information about "access violation" and "in page error" exceptions to description. Description now contains data about read/write violation type and actual address as described at https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_exception_record Reviewers: asmith, stella.stamenova Reviewed By: stella.stamenova Subscribers: teemperor, amccarth, abidh, lldb-commits, aleksandr.urakov Tags: #lldb Differential Revision: https://reviews.llvm.org/D60519 llvm-svn: 359420
* Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShiftRaphael Isemann2019-04-271-1/+1
| | | | | | | | | | | | | | | | | | | Summary: As reported in LLVM bug 41487, the check in this function is wrong and should be the same as the described check in the comment (which is correctly copied from the ARM ISA reference). Reviewers: #lldb, davide, JDevlieghere Reviewed By: #lldb, davide, JDevlieghere Subscribers: davide, javed.absar, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60654 llvm-svn: 359387
* [CommandObject] Use GetDebugger() helper method (NFC)Jonas Devlieghere2019-04-2718-131/+116
| | | | | | | | | | In r359354 a GetDebugger() method was added to the CommandObject class, so that we didn't have to go through the command interpreter to obtain the script interpreter. This patch simplifies other call sites where m_interpreter.GetDebugger() was used, and replaces them with a shorter call to the new method. llvm-svn: 359373
OpenPOWER on IntegriCloud