summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleaned up a little bit of redundant code in 'frame diagnose.`Sean Callanan2016-09-141-11/+19
| | | | llvm-svn: 281534
* Use 'enum class' instead of 'enum' in NativeRegisterContextLinux_x86_x64.Valentina Giusti2016-09-142-36/+36
| | | | | | | | | | Reviewers: labath, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24578 llvm-svn: 281528
* Add SB API's for writing breakpoints to & creating the from a file.Jim Ingham2016-09-1411-115/+407
| | | | | | | | | | | Moved the guts of the code from CommandObjectBreakpoint to Target (should have done it that way in the first place.) Added an SBBreakpointList class so there's a way to specify which breakpoints to serialize and to report the deserialized breakpoints. <rdar://problem/12611863> llvm-svn: 281520
* Fix some const-ness issues with BreakpointID & BreakpointIDList.Jim Ingham2016-09-143-10/+12
| | | | llvm-svn: 281519
* Use Intel CPU flags to determine target supported features.Valentina Giusti2016-09-143-117/+183
| | | | | | | | | | | | | Summary: This patch uses the instruction CPUID to verify that FXSAVE, XSAVE, AVX and MPX are supported by the target hardware. In case the HW supports XSAVE, and at least one of the extended register sets, it further checks if the target software has the kernel support for such features, by verifying that their XSAVE part is correctly managed. Differential Revision: https://reviews.llvm.org/D24559 llvm-svn: 281507
* Cleaned up the code that handles function return addresses in "frame diagnose."Sean Callanan2016-09-141-18/+33
| | | | llvm-svn: 281428
* Force c++14 when running tests on Windows.Zachary Turner2016-09-131-0/+1
| | | | | | | | | VS 2015 and higher begin making use of c++14 in their standard library headers. As such, -std=c++11 makes it so you can't compile trivial programs. Bump this to -std=c++14 when this situation is detected. llvm-svn: 281420
* TestQueues could error out because the one second sleep main.c wasJason Molenda2016-09-132-3/+6
| | | | | | | | using to enqueue all the jobs wasn't enough time on a slow/overloaded system. Instead use a global to indicate when all the work has been enqueued, let's see if this makes the CIs work more reliably. llvm-svn: 281418
* Cleaned up some of the "frame diagnose" code to use Operands as currency.Sean Callanan2016-09-135-80/+210
| | | | | | | Also added some utility functions around Operands to make code easier and more compact to write. llvm-svn: 281398
* Add some unit tests for ArchSpec.Zachary Turner2016-09-134-2/+108
| | | | | | | | | | | | I'm was trying to do some cleanup and code modernization and in doing so I needed to change ParseMachCPUDashSubtypeTriple to take a StringRef. To ensure I don't break anything, I'm adding some unit tests for this function. As a side benefit, this also expands test coverage of this function to all platforms, since in general this code would rarely be exercised on non Mac platforms, and never in the test suite. llvm-svn: 281387
* Some more pointer safety in Breakpoint.Zachary Turner2016-09-1313-108/+123
| | | | | | | | | | | Plumb unique_ptrs<> all the way through the baton interface. NFC, this is a minor improvement to remove the possibility of an accidental pointer ownership issue. Reviewed By: jingham Differential Revision: https://reviews.llvm.org/D24495 llvm-svn: 281360
* fixup Xcode build for removal of MIUtilParse.*Todd Fiala2016-09-131-6/+0
| | | | llvm-svn: 281352
* Fix a merge mishap in rL281348Dimitar Vlahovski2016-09-131-2/+0
| | | | llvm-svn: 281349
* MinidumpParsing: pid, modules, exceptions, stringsDimitar Vlahovski2016-09-137-69/+412
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Added parsing of the MiscInfo data stream. The main member of it that we care about is the process_id On Linux generated Minidump (from breakpad) we don't have the MiscInfo, we have the /proc/$pid/status from where we can get the pid. Also parsing the module list - the list of all of the loaded modules/shared libraries. Parsing the exception stream. Parsing MinidumpStrings. I have unit tests for all of that. Also added some tests using a Minidump generated from Windows tools (not from breakpad) Reviewers: labath, zturner Subscribers: beanz, lldb-commits Differential Revision: https://reviews.llvm.org/D24385 llvm-svn: 281348
* Remove MIUtilParse (no longer used)Pavel Labath2016-09-133-152/+0
| | | | | | | | | | | | | Summary: follow-up to https://reviews.llvm.org/D23882 Reviewers: dawn, krytarowski, labath, ki.stfu Subscribers: beanz, mgorny, labath, ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D23883 Author: Michał Górny <mgorny@gentoo.org> llvm-svn: 281317
* Fix linux build after rL281273Tamas Berghammer2016-09-131-1/+1
| | | | llvm-svn: 281309
* Reduce the number of simultaneous debug sessions to 10 and removeJason Molenda2016-09-132-2/+1
| | | | | | | | | | | | | the expectedFlakeyDarwin annotation. I've been running this test in isolation on my macOS Sierra system and haven't seen a failure in 20-30 runs. The number of simultaneous debug sessions that it spins up could be a problem when the testbots are running under load, so I'm reducing this from 20 simultaneous debug sessions to see if we can get enough stability to leave this enabled. llvm-svn: 281291
* Add a few const's (thanks Zachary) and return shared or unique pointersJim Ingham2016-09-1317-78/+98
| | | | | | in places where they help prevent leaks. llvm-svn: 281288
* Fix an issue where LLDB was not masking enough bits off of objc classes ↵Enrico Granata2016-09-131-1/+14
| | | | | | | | data() pointers, effectively rendering us unable to generate descriptors for some classes Fixes rdar://27758358 llvm-svn: 281282
* This is the main part of a change to add breakpoint save and restore to lldb.Jim Ingham2016-09-1223-255/+1859
| | | | | | | | | | | | | | | Still to come: 1) SB API's 2) Testcases 3) Loose ends: a) serialize Thread options b) serialize Exception resolvers 4) "break list --file" should list breakpoints contained in a file and "break read -f 1 3 5" should then read in only those breakpoints. <rdar://problem/12611863> llvm-svn: 281273
* xfail TestQueues.py and TestDarwinLogFilterMatchMessage.pyTodd Fiala2016-09-122-0/+9
| | | | | | | | | | | | | | It looks like the message-content-retrieval aspect of DarwinLog support is flaky, not just the regex match against it. Slightly less frequently than the regex matching, I am seeing the direct string-match variant of log-message-content matching also fail. Tracked by: llvm.org/pr30299 rdar://28237450 llvm-svn: 281251
* fix Xcode build after r281226Todd Fiala2016-09-121-1/+1
| | | | llvm-svn: 281243
* Move StdStringExtractor to tools/debugserverPavel Labath2016-09-126-7/+4
| | | | | | | | The class is only used in the debugserver. The rest of lldb has the StringExtractor class. Xcode project will need to be updated after this. llvm-svn: 281226
* Add MiSyntaxTestCase.test_lldbmi_output_grammar test (MI)Ilia K2016-09-122-3/+101
| | | | | | | | | | | | Summary: This patch adds a new test and fixes extra new-line before exit Reviewers: abidh Subscribers: ki.stfu, dawn, lldb-commits, abidh Differential Revision: https://reviews.llvm.org/D9740 llvm-svn: 281199
* Fix about a dozen compile warningsIlia K2016-09-128-23/+25
| | | | | | | | | | | | | | | | | | | | | | Summary: It fixes the following compile warnings: 1. '0' flag ignored with precision and ‘%d’ gnu_printf format 2. enumeral and non-enumeral type in conditional expression 3. format ‘%d’ expects argument of type ‘int’, but argument 4 has type ... 4. enumeration value ‘...’ not handled in switch 5. cast from type ‘const uint64_t* {aka ...}’ to type ‘int64_t* {aka ...}’ casts away qualifiers 6. extra ‘;’ 7. comparison between signed and unsigned integer expressions 8. variable ‘register_operand’ set but not used 9. control reaches end of non-void function Reviewers: jingham, emaste, zturner, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24331 llvm-svn: 281191
* async structured data packet handling improvementsTodd Fiala2016-09-105-46/+87
| | | | | | | | | | | | | | | | | | | | | | | This change does the following: * Changes the signature for the continuation delegate method that handles async structured data from accepting an already-parsed structured data element to taking just the packet contents. * Moves the conversion of the JSON-async: packet contents from GDBRemoteClientBase to the continuation delegate method. * Adds a new unit test for verifying that the $JSON-asyc: packets get decoded and that the decoded packets get forwarded on to the delegate for further processing. Thanks to Pavel for making that whole section of code easily unit testable! * Tightens up the packet verification on reception of a $JSON-async: packet contents. The code prior to this change is susceptible to a segfault if a packet is carefully crafted that starts with $J but has a total length shorter than the length of "$JSON-async:". Reviewers: labath, clayborg, zturner Differential Revision: https://reviews.llvm.org/D23884 llvm-svn: 281121
* xfail DarwinLog "filter message by regex" testsTodd Fiala2016-09-091-0/+10
| | | | | | | | | | These tests are not working reliably. I'm marking them xfail until I resolve the issue. Tracked by: llvm.org/pr30299 llvm-svn: 281058
* [LLDB][MIPS] Fix Emulation for JALR64 InstructionNitesh Jain2016-09-091-0/+1
| | | | | Subscribers: jaydeep, bhushan, slthakur, sdardis, lldb-commits llvm-svn: 281032
* [LLDB][MIPS] Fix TestEhFrameUnwind.py for MIPSNitesh Jain2016-09-091-3/+29
| | | | | | | | | | Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, slthakur, lldb-commits Differential Revision: https://reviews.llvm.org/D24122 llvm-svn: 281031
* Fixing a build breakage caused from a change in LLVM rL281019Dimitar Vlahovski2016-09-091-3/+1
| | | | | | | | | | | | | | Summary: LLVM guys did some clean-up of the Attribute getters/setters and because of that the build was failing. Reviewers: ldrumm Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24382 llvm-svn: 281030
* NFC: Reformat ABISysV_i386 register context into something readablePavel Labath2016-09-091-668/+60
| | | | | | add clang-format guards so it does not reformat it again. llvm-svn: 281029
* [LLDB][MIPS] Fix TestLldbGdbServer.py failureNitesh Jain2016-09-091-1/+3
| | | | | Subscribers: jaydeep, bhushan, slthakur, lldb-commits llvm-svn: 281026
* Fix new gdb-remote client unit test for windowsPavel Labath2016-09-091-3/+4
| | | | | | | The behaviour of FileSpec differed between host OS versions. Hardcode the path syntax to posix, as we don't care about that in this test. llvm-svn: 281025
* Fix MSVC error from r280919Pavel Labath2016-09-081-4/+4
| | | | | | MSVC did not understand my brace-initializer syntax. :/ llvm-svn: 280965
* Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.Valentina Giusti2016-09-0817-21/+639
| | | | | | | | | | | | Summary: Signed-off-by: Valentina Giusti <valentina.giusti@intel.com> Reviewers: dvlahovski, granata.enrico, clayborg, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24255 llvm-svn: 280942
* Fix -Wcovered-switch-default warning in AppleObjCRuntimeV2.cppEd Maste2016-09-081-2/+0
| | | | | | | | The switch coveres all possible values. If a new one is added in the future the compiler will start warning, providing a notification that the switch needs updating. llvm-svn: 280933
* Fix unused variable and integer sign warnings from r280906Ed Maste2016-09-081-3/+2
| | | | llvm-svn: 280931
* LLDB: API for iPermission of object file's sectionsAbhishek Aggarwal2016-09-083-0/+27
| | | | | | | | | | | | | | | | | | Summary: - Added an API to public interface that provides permissions (RWX) of individual sections of an object file - Earlier, there was no way to find out this information through SB APIs - A possible use case of this API is: when a user wants to know the sections that have executable machine instructions and want to write a tool on top of LLDB based on this information - Differential Revision: https://reviews.llvm.org/D24251 llvm-svn: 280924
* Fix test breakage in r280919Pavel Labath2016-09-081-1/+5
| | | | | | | | | | | It turns out that self.dbg.GetSelectedPlatform().GetTriple() is not a good way to get the triple of the process, as it returns the incorrect triple in case of a 32-bit process running on a 64-bit platform. Instead, go the long way round and ask the stub for the process triple. This fixes the test for i386. llvm-svn: 280922
* gdb-remote: Add jModulesInfo packetPavel Labath2016-09-0813-17/+390
| | | | | | | | | | | | | | | | | | | | | Summary: This adds the jModulesInfo packet, which is the equivalent of qModulesInfo, but it enables us to query multiple modules at once. This makes a significant speed improvement in case the application has many (over a hundred) modules, and the communication link has a non-negligible latency. This functionality is accessed by ProcessGdbRemote::PrefetchModuleSpecs(), which does the caching. GetModuleSpecs() is modified to first consult the cache before asking the remote stub. PrefetchModuleSpecs is currently only called from POSIX-DYLD dynamic loader plugin, after it reads the list of modules from the inferior memory, but other uses are possible. This decreases the attach time to an android application by about 40%. Reviewers: clayborg Subscribers: tberghammer, lldb-commits, danalbert Differential Revision: https://reviews.llvm.org/D24236 llvm-svn: 280919
* I'm experimenting with changing how the mixed source & assemblyJason Molenda2016-09-084-58/+367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode in lldb works. I've been discussing this with Jim Ingham, Greg Clayton, and Kate Stone for the past week or two. Previously lldb would print three source lines (centered on the line table entry line for the current line) followed by the assembly. It would print the context information (module`function + offset) before those three lines of source. Now lldb will print up to two lines before/after the line table entry. It prints two '*' characters for the line table line to make it clear what line is showing assembly. There is one line of whitespace before/after the source lines so the separation between source & assembly is clearer. I don't print the context line (module`function + offset). I stop printing context lines if it's a different line table entry, or if it's a source line I've already printed as context to another source line. If I have two line table entries one after another for the same source line (I get these often with clang - with different column information in them), I only print the source line once. I'm also using the target.process.thread.step-avoid-regexp setting (which keeps you from stepping into STL functions that have been inlined into your own code) and avoid printing any source lines from functions that match that regexp. When lldb disassembles into a new function, it will try to find the declaration line # for the function and print all of the source lines between the decl and the first line table entry (usually a { curly brace) so we have a good chance of including the arguments, at least with the debug info emitted by clang. Finally, the # of source lines of context to show has been separated from whether we're doing mixed source & assembly or not. Previously specifying 0 lines of context would turn off mixed source & assembly. I think there's room for improvement, and maybe some bugs I haven't found yet, but it's in good enough shape to upstream and iterate at this point. I'm not sure how best to indicate which source line is the actual line table # versus context lines. I'm using '**' right now. Both Kate and Greg had the initial idea to reuse '->' (normally used to indicate "currently executing source line") - I tried it but I wasn't thrilled, I'm too used to the established meaning of ->. Greg had the interesting idea of avoiding context source lines only in two line table entries in the same source file. So we'd print two lines before & after a source line, and then the next line table entry (if it was on the next source line after those two context lines) we'd display only the following two lines -- the previous two had just been printed. If an inline source line was printed between these two, though, we'd print the context lines for both of them. It's an interesting idea, and I want to see how it works with both -O0 and -O3 codegen where we have different amounts of inlining. <rdar://problem/27961419> llvm-svn: 280906
* I had a problem with one SDK where dispatch_release was actually aJason Molenda2016-09-081-1/+1
| | | | | | | | macro, so writing ::dispatch_release did not work as expected. Remove the global anon namespace :: designation; the header will get us the correct declaration. llvm-svn: 280903
* Force the initialization of the m_type ivar inJason Molenda2016-09-081-0/+3
| | | | | | | | Function::GetStartLineSourceInfo before we try to return the start line information about a function; this function requires it to have been initialized. llvm-svn: 280902
* Remove lldb coding conventions as they are no longer relevant.Jim Ingham2016-09-083-154/+0
| | | | llvm-svn: 280892
* Remove CxaDemangle.cpp / .h from xcode project file.Jason Molenda2016-09-071-6/+0
| | | | llvm-svn: 280879
* Use llvm's demangler.Rafael Espindola2016-09-075-4424/+4
| | | | | | | LLVM now has a copy of libcxxabi demangler, so lldb doesn't need to keep one too. llvm-svn: 280821
* Fix unittest compilation on windowsPavel Labath2016-09-074-4/+4
| | | | | | | | After the reformat, the unittests do not compile due to missing due to redefinition errors between PosixApi.h and ucrt/direct.h. This is a bit of a shot in the dark, as I have not tested it on windows, but I am restoring the original include order, so it should hopefully fix it. llvm-svn: 280793
* Revert "Fix tests on Windows."Zachary Turner2016-09-061-2/+2
| | | | | | | | This reverts commit 9b757b6e3946311802972409f38c6cefbea917b3. This seems to cause strange breakages about on Ubuntu. llvm-svn: 280763
* Fix tests on Windows.Zachary Turner2016-09-061-2/+2
| | | | | | | | | This wasn't actually a problem with the reformat, but rather a problem with Visual Studio 2015 Update 3, which uses some c++14 features in its standard libraries. So we had to change -std=c++11 to -std=c++14. llvm-svn: 280759
* Put the LLVM_ALIGNAS directive in the right place.Zachary Turner2016-09-061-2/+2
| | | | llvm-svn: 280758
OpenPOWER on IntegriCloud