summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [lit] Detect unexpected passes in lldbtest.Jonas Devlieghere2018-12-171-0/+4
| | | | | | | This patch will have lit report unexpected passes when dotest reports at least one XPASS and no failures. llvm-svn: 349401
* Fix case of source file in CMakeLists.txtZachary Turner2018-12-171-1/+1
| | | | llvm-svn: 349399
* Reflow readmeAdrian Prantl2018-12-171-46/+55
| | | | llvm-svn: 349398
* Remove sleep() synchronisation from teststcase andAdrian Prantl2018-12-171-9/+3
| | | | | | | | | | make the executable name more unique. This test is failing sporadically on some bots. By removing the sleep synchronisation, I'm hoping to get it to fail more reproducibly so I can investigate what is going on. llvm-svn: 349397
* [NativePDB] Decouple AST reconstruction from lldb Symbol creation.Zachary Turner2018-12-1710-814/+1374
| | | | | | | | | | | | Previously the code that parsed debug info to create lldb's Symbol objects such as Variable, Type, Function, etc was tightly coupled to the AST reconstruction code. This made it difficult / impossible to implement functions such as ParseDeclsForContext() that were only supposed to be operating on clang AST's. By splitting these apart, the logic becomes much cleaner and we have a clear separation of responsibilities. llvm-svn: 349383
* Fix lldb's macosx/heap.py cstr command.Davide Italiano2018-12-173-1/+28
| | | | | | <rdar://problem/44432167> llvm-svn: 349372
* [Driver] Fix --repl argument.Jonas Devlieghere2018-12-172-8/+19
| | | | | | | | | | | | | | | | | The --repl option was incorrectly defined as "Separate" (option and value separated by a space). This resulted in the option not being picked up when no value was specified. This patch fixes the driver so that `--repl` is recognized again. I split the option into two: - A flag: `--repl` and `-r` which take no arguments. - A joined option: `--repl=<flags>` and `-r=<flags>` that forward its values to the repl. This should match the driver's old behavior. llvm-svn: 349371
* Make crashlog.py work or binaries with spaces in their namesAdrian Prantl2018-12-172-21/+109
| | | | | | | | | | | | This is a little dangerous since the crashlog files aren't 100% unambiguous, but the risk is mitigated by using a non-greedy +? pattern. rdar://problem/38478511 Differential Revision: https://reviews.llvm.org/D55608 llvm-svn: 349367
* Make crashlog.py work when a .dSYM is present, but a binary is missingAdrian Prantl2018-12-171-15/+37
| | | | | | | | | | Often users have a crash log an d a .dSYM bundle, but not the original application binary. It turns out that for crash symbolication, we can safely fall back to using the binary inside the .dSYM bundle. Differential Revision: https://reviews.llvm.org/D55607 llvm-svn: 349366
* [Clang AST Context] Add a few helper functions.Zachary Turner2018-12-174-14/+35
| | | | | | | | | The first one allows us to add an enumerator to an enum if we already have an APSInt, since ultimately the implementation just constructs one anyway. The second is just a general utility function to covert a CompilerType to a clang::TagDecl. llvm-svn: 349360
* Add a description of the similar packets defined in theJason Molenda2018-12-161-3/+18
| | | | | | | | | | | gdb-remote serial protocol documentation, call out the incompatability of lldb's vFile:open: packet as it stands today. Need to think about whether to change lldb's enum values (breaking any existing lldb-server's out there) or create a different packet and abandon vFile:open: at least for a while. llvm-svn: 349316
* Clarify a few minor details.Jason Molenda2018-12-161-7/+8
| | | | llvm-svn: 349313
* Update the vFile:open: description to note that the flagsJason Molenda2018-12-152-1/+5
| | | | | | | | | | in the packet are lldb enum values, not the open(2) oflags -- forgot about that wrinkle. Also added a comment to File.h noting that the existing values cannot be modified or we'll have a compatibilty break with any alternative platform implementations, or older versions of lldb-server. llvm-svn: 349282
* lldb-test: Improve newline handlingPavel Labath2018-12-153-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-test's LinePrinter would output the indentation spaces even on completely empty lines. This is not nice, as trailing spaces get flagged as errors in some tools/editors, and it prevents FileCheck's CHECK-EMPTY from working. Equally annoying was the fact that the LinePrinter did not terminate it's output with a newline (instead it would leave the unterminated hanging indent from the last NewLine() command), which meant that the shell prompt following the lldb-test command came out wrong. This fixes both issues by changing how newlines are handled. NewLine(), which was ending the previous line ('\n') *and* begging the next line by printing the indent, is now "demoted" to just printing literal "\n". Instead, lines are now delimited via a helper Line object, which makes sure the line is indented and terminated in an RAII fashion. The typical usage would be: Printer.line() << "This text will be indented and terminated"; If one needs to do more work than it will fit into a single statement, one can also assign the result of the line() function to a local variable. The line will then be terminated when that object goes out of scope. Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D55597 llvm-svn: 349269
* ELF: more section creation cleanupPavel Labath2018-12-159-73/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to move as much code as possible out of the CreateSections function to make room for future improvements there. Some of this may be slightly over-engineered (VMAddressProvider), but I wanted to keep the logic of this function very simple, because once I start taking segment headers into acount (as discussed in D55356), the function is going to grow significantly. While in there, I also added tests for various bits of functionality. This should be NFC, except that I changed the order of hac^H^Heuristicks for determining section type slightly. Previously, name-based deduction (.symtab -> symtab) would take precedence over type-based (SHT_SYMTAB -> symtab) one. In fact we would assert if we ran into a .text section with type SHT_SYMTAB. Though unlikely to matter in practice, this order seemed wrong to me, so I have inverted it. Reviewers: clayborg, krytarowski, espindola Subscribers: emaste, arichardson, lldb-commits Differential Revision: https://reviews.llvm.org/D55706 llvm-svn: 349268
* Remove /proc/pid/maps parsing code from NativeProcessLinuxPavel Labath2018-12-151-101/+18
| | | | | | A utility function doing this was added in r349182, so use that instead. llvm-svn: 349267
* Ah, forgot qModuleInfo. Need to look that one upJason Molenda2018-12-151-0/+11
| | | | | | and finish filling this in. llvm-svn: 349232
* A brief outline of the packets that need to be implementedJason Molenda2018-12-151-0/+375
| | | | | | | | | | to write an lldb platform server that doesn't link against LLDB.framework to be able to fully run the lldb testsuite on a remote system. The platform packets weren't covered in the existing lldb-gdb-remote.txt doc, so I wanted to jot them down in one place. llvm-svn: 349231
* Simplify Boolean expressionsJonas Devlieghere2018-12-15177-1018/+599
| | | | | | | | | | | This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
* Fix the unittests for the move of Listener & BroadcasterJim Ingham2018-12-141-2/+2
| | | | | | from Core to Utility. llvm-svn: 349211
* Update a comment according to r255360 "Remove -r and -R options from dotest.py"Tatyana Krasnukha2018-12-141-2/+1
| | | | llvm-svn: 349208
* Remove the Disassembly benchmarks.Adrian Prantl2018-12-143-355/+0
| | | | | | | | | | | | While I was out hunting for remaining pexpect-based tests, I came across these tests that can't possibly work an any modern system, as they rely on having gdb available in /Developer. This patch simply removes the test without replacement. Differential Revision: https://reviews.llvm.org/D55559 llvm-svn: 349194
* Add missing .dmp files to test inputs.Greg Clayton2018-12-141-0/+3
| | | | llvm-svn: 349183
* Cache memory regions in ProcessMinidump and use the linux maps as the source ↵Greg Clayton2018-12-1413-106/+456
| | | | | | | | | | | | | | | | | | | | | | | of the information if available Breakpad creates minidump files that sometimes have: - linux maps textual content - no MemoryInfoList Right now unless the file has a MemoryInfoList we get no region information. This patch: - reads and caches the memory region info one time and sorts it for easy subsequent access - get the region info from the best source in this order: - linux maps info (if available) - MemoryInfoList (if available) - MemoryList or Memory64List - returns memory region info for the gaps between regions (before the first and after the last) Differential Revision: https://reviews.llvm.org/D55522 llvm-svn: 349182
* Fix Xcode project for MIPS architecture plug-in and move of Event, Listener ↵Greg Clayton2018-12-141-18/+41
| | | | | | and Broadcaster to Utility. llvm-svn: 349180
* [NativePDB] Fix local-variables.cpp test.Zachary Turner2018-12-141-1/+1
| | | | | | | | Since we're actually running an executable on the host now, different versions of Windows could load different system libraries, so we need to regex out the number of loaded modules. llvm-svn: 349175
* Move Broadcaster+Listener+Event combo from Core into UtilityPavel Labath2018-12-1441-74/+74
| | | | | | | | | | | | | | | | | | Summary: These are general purpose "utility" classes, whose functionality is not debugger-specific in any way. As such, I believe they belong in the Utility module. This doesn't break any particular dependency (yet), but it reduces the number of Core dependencies across the board. Reviewers: zturner, jingham, teemperor, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D55361 llvm-svn: 349157
* Fix minidump unit test failures from r349062Pavel Labath2018-12-141-9/+12
| | | | | | | | | This commit added new test inputs, but it did not add them to the cmake files. This caused the test to fail at runtime. While in there, I also sorted the list of minidump test inputs. llvm-svn: 349154
* Fix build with older (<3.0) swigsPavel Labath2018-12-141-0/+6
| | | | | | | | | | | It turns out it wasn't the compilers, but swig who had issues with my previous patch -- older versions do not recognise the "constexpr" keyword. Fortunately, that can be fixed the same way we fix all other swig incompatibilities: #ifndef SWIG. llvm-svn: 349153
* Mark Permissions as a bitmask enumPavel Labath2018-12-141-3/+4
| | | | | | | | | | | | | | | | this allows one to use bitwise operators on the variables of this type without complicated casting. The gotcha here is that the combinations of these enums were being used in some constexpr contexts such as case labels (case ePermissionsWritable | ePermissionsExecutable:), which is not possible if the user-defined operator| is not constexpr. So, this commit also marks these operators as constexpr. I am committing this as a small standalone patch so it can be easily reverted if some compiler has an issue with this. llvm-svn: 349149
* Remove unused variable.Richard Trieu2018-12-141-1/+0
| | | | llvm-svn: 349128
* Fix test failures that depended on module orderGreg Clayton2018-12-142-24/+24
| | | | llvm-svn: 349122
* [NativePDB] Add support for local variables.Zachary Turner2018-12-138-71/+1104
| | | | | | | | | This patch adds support for parsing and evaluating local variables. using the native pdb plugin. Differential Revision: https://reviews.llvm.org/D55575 llvm-svn: 349067
* Fix MinidumpParser::GetFilteredModuleList() and test itGreg Clayton2018-12-134-19/+66
| | | | | | | | | | The MinidumpParser::GetFilteredModuleList() code was attempting to iterate through the entire module list and if it found more than one entry for a given module name, it wanted to pick the MinidumpModule with the lowest address. A bug existed where it wasn't doing that due to "exists" variable being inverted. "exists" was set to true if it was inserted, not if it existed. Furthermore, the order of the modules would be modified by sorting all modules from low address to high address (using MinidumpModule::base_of_image). This fix also maintains the original order which means your executable is at index 0 as intended instead of some random shared library. Tests were added to ensure this functionality doesn't regress. Differential Revision: https://reviews.llvm.org/D55614 llvm-svn: 349062
* Add missing Initialize/Terminate for Architecture pluginsTatyana Krasnukha2018-12-131-0/+6
| | | | llvm-svn: 349036
* Classify tests in lit/ModulesPavel Labath2018-12-139-0/+0
| | | | | | | | We've recently developed a convention where the tests are placed into subfolders according to the object file type. This applies that convention to existing tests too. llvm-svn: 349027
* Fix for clang interface updateMikael Nilsson2018-12-131-1/+1
| | | | | | | | | FunctionProtoType.TypeQuals is now a Qualifiers object instead of an integer. The related clang commit: r349019 llvm-svn: 349020
* [NFC] Small code cleanups in utility.Jonas Devlieghere2018-12-136-11/+9
| | | | | | Fix a few small annoyances in Utility I ran into. llvm-svn: 348996
* NFC: fix compiler warning about code never being executed when compiling on ↵Greg Clayton2018-12-121-3/+4
| | | | | | non windows platform. llvm-svn: 348951
* [ast] CreateParameterDeclaration should use an appropriate DeclContext.Zachary Turner2018-12-125-9/+12
| | | | | | | | | | | | | | | | | | Previously CreateParameterDeclaration was always using the translation unit DeclContext. We would later go and add parameters to the FunctionDecl, but internally clang makes a copy when you do this, and we'd end up with ParmVarDecl's at the global scope as well as in the function scope. This fixes the issue. It's hard to say whether this will introduce a behavioral change in name lookup, but I know there have been several hacks introduced in previous years to deal with collisions between various types of variables, so there's a chance that this patch could obviate one of those hacks. Differential Revision: https://reviews.llvm.org/D55571 llvm-svn: 348941
* ELF: Clean up section type computationPavel Labath2018-12-126-160/+82
| | | | | | | | | | | | | Move code into a separate function, and replace the if-else chain with llvm::StringSwitch. A slight behavioral change is that now I use the section flags (SHF_TLS) instead of the section name to set the thread-specific property. There is no explanation in the original commit introducing this (r153537) as to why that was done this way, but the new behavior should be more correct. llvm-svn: 348936
* ELF: Simplify program header iterationPavel Labath2018-12-124-98/+59
| | | | | | | | | | | | | Instead of GetProgramHeaderCount+GetProgramHeaderByIndex, expose an ArrayRef of all program headers, to enable range-based iteration. Instead of GetSegmentDataByIndex, expose GetSegmentData, taking a program header (reference). This makes the code simpler by enabling range-based loops and also allowed to remove some null checks, as it became locally obvious that some pointers can never be null. llvm-svn: 348928
* lldb-test: Add ability to dump subsectionsPavel Labath2018-12-122-20/+138
| | | | | | | | Previously, lldb-test would only print top-level sections. However, in lldb, sections can contain other sections. This teaches lldb-test to print nested sections too. llvm-svn: 348924
* build.py: Implement "gcc" builderPavel Labath2018-12-125-53/+114
| | | | | | | | | | | | | | | | Summary: This implements the gcc builder in build.py script to allow it to compile host executables when running on a non-windows host. Where it made sense, I tried to share code with the msvc builder by moving stuff to the base class. Reviewers: zturner Subscribers: mehdi_amini, dexonsmith, lldb-commits Differential Revision: https://reviews.llvm.org/D55430 llvm-svn: 348918
* Remove unused fileJonas Devlieghere2018-12-111-19/+0
| | | | | | | I removed the dotest-style reproducer test but forgot to delete the source file. Thanks Jim for the heads up! llvm-svn: 348901
* [Driver] Simplify OptionData. NFCJonas Devlieghere2018-12-112-68/+36
| | | | | | | | | | | | | Hopefully this makes the option data easier to understand and maintain. - Group the member variables. - Do the initialization in the header as it's less error prone. - Rename the Clean method. It was called only once and was re-initializing some but not all (?) members. The only useful thing it does is dealing with the local lldbinit file so keep that and make the name reflect that. llvm-svn: 348894
* Add ObjectFileBreakpad.{cpp,h} to the Xcode project.Jim Ingham2018-12-111-0/+14
| | | | llvm-svn: 348890
* Rename ObjectFile::GetHeaderAddress to GetBaseAddressPavel Labath2018-12-119-47/+45
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This function was named such because in the case of MachO files, the mach header is located at this address. However all (most?) usages of this function were not interested in that fact, but the fact that this address is used as the base address for expressing various relative addresses in the object file. For other object file formats, this name is not appropriate (and it's probably the reason why this function was not implemented in these classes). In the ELF case the ELF header will usually end up at this address, but this is a result of the linker optimizing the file layout and not a requirement of the spec. For COFF files, I believe the is no header located at this address either. Reviewers: clayborg, jasonmolenda, amccarth, lemo, stella.stamenova Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D55422 llvm-svn: 348849
* Fix undefined behavior in Variable.hZachary Turner2018-12-111-1/+2
| | | | | | | | | | | | m_loc_is_constant_data was uninitialized, so unless someone explicitly called SetLocIsConstantData(), this would be UB. I think every existing call-site would always call the proper function to initialize the value, so there were no existing bugs, but I encountered this when I tried to use it without calling this function and encountered this. llvm-svn: 348813
* [DataFormatters] Fixes to libc++ std::function formatter to deal with ABI ↵Shafik Yaghmour2018-12-101-0/+9
| | | | | | | | change see https://reviews.llvm.org/D55045 llvm-svn: 348810
OpenPOWER on IntegriCloud