summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [TypeSystem] Reduce code duplication merging two almost identical functions.Davide Italiano2017-08-311-14/+9
| | | | llvm-svn: 312267
* Now a ppc64le binary is correctly detected:Eugene Zemtsov2017-08-302-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lldb) target create "tst" Current executable set to 'tst' (powerpc64le). (lldb) disassemble -n main tst`main: tst[0x7b0] <+0>: addis 2, 12, 2 tst[0x7b4] <+4>: addi 2, 2, 30544 tst[0x7b8] <+8>: mflr 0 Wihout the patch, the endianess was incorrect: (lldb) target create "tst" Current executable set to 'tst' (powerpc64). (lldb) disassemble -n main tst`main: tst[0x7b0] <+0>: .long 0x02004c3c ; unknown opcode tst[0x7b4] <+4>: rlwimi 23, 3, 8, 8, 28 tst[0x7b8] <+8>: lhzu 16, 2172(2) tst[0x7bc] <+12>: .long 0x100001f8 ; unknown opcode Simple binary used is identified as: $ file tst tst: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=17a8fa2b24ce2837ba6625fabb34e6b29c6c5db7, not stripped Patch by Gustavo Serra Scalet <gustavo.scalet@eldorado.org.br> Differential Revision: https://reviews.llvm.org/D36804 llvm-svn: 312151
* [IPv6] Fix a bug in the IPv6 listen behaviorChris Bieneman2017-08-292-3/+19
| | | | | | | | | | The socket bind address should either be localhost or anyaddress. This bug in the listen behavior was preventing lldb-server from opening sockets for non-localhost connections. The added test verifies that opening an anyaddress socket works and has a non-zero port assignment. This should resolve PR34183. llvm-svn: 312008
* update xpc service name.Jason Molenda2017-08-291-1/+1
| | | | llvm-svn: 311978
* Add the DWARF DWP files to the Xcode project.Jim Ingham2017-08-251-2/+14
| | | | llvm-svn: 311786
* Add support for the DWP debug info formatTamas Berghammer2017-08-2514-14/+318
| | | | | | | | | | | | | | | | | | | | Summary: The DWP (DWARF package) format is used to pack multiple dwo files generated by split-dwarf into a single ELF file to make distributing them easier. It is part of the DWARFv5 spec and can be generated by dwp or llvm-dwp from a set of dwo files. Caviats: * Only the new version of the dwp format is supported (v2 in GNU numbering schema and v5 in the DWARF spec). The old version (v1) is already deprecated but binutils 2.24 still generates that one. * Combining DWP files with module debugging is not yet supported. Subscribers: emaste, mgorny, aprantl Differential Revision: https://reviews.llvm.org/D36062 llvm-svn: 311775
* Fixed a typo in the example (getName -> GetName)Jim Ingham2017-08-241-4/+4
| | | | | | | but while I was at it I converted the example to use properties, since that's much nicer looking. llvm-svn: 311679
* Change the ftag x87 register from being 8-bits wide to 16-bits wideJason Molenda2017-08-242-8/+8
| | | | | | | | to match the changes Saleem Abdulrasool committed in r311579. Fixes a testsuite failure now that the testsuite expects a 16 bit return value for thsi reg. llvm-svn: 311627
* When parsing the DBGSourcePathRemapping plist entriesJason Molenda2017-08-242-1/+39
| | | | | | | | | | | | in a dSYM, and it's a version 2 DBGSourcePathRemapping, in addition to the build/source paths specified, add build/source paths with the last two filename components removed. This more generic remapping can sometimes help lldb to find the correct source file in complex projects. <rdar://problem/33973545> llvm-svn: 311622
* Log whether we found a step out plan or not.Jim Ingham2017-08-231-2/+6
| | | | llvm-svn: 311590
* test: fix missed testSaleem Abdulrasool2017-08-231-1/+1
| | | | | | | I had built without python bindings and did not find this in the grep output. Adjust the test output for the printing format update. llvm-svn: 311582
* Process: fix FXSAVE on x86Saleem Abdulrasool2017-08-233-5/+3
| | | | | | | | | The FXSAVE member `ftw` (FPU Tag Word) was given the wrong size (8-bit) instead of the correct width (16-bit) as per the x87 Programmer's Manual. Adjust this to ensure that we print out the complete value for the register. llvm-svn: 311579
* ObjC: fix some -Wpedantic warnings by removing ';'Saleem Abdulrasool2017-08-231-3/+3
| | | | | | Remove some stray ';' that were in the source code. NFC. llvm-svn: 311577
* Fixup for r311483: Use correct path to StreamString.hKuba Mracek2017-08-221-1/+1
| | | | llvm-svn: 311484
* [lldb] Correctly escape newlines and backslashes in the JSON serializerKuba Mracek2017-08-224-2/+34
| | | | | | | | JSON serializer fails to escape newlines and backslashes. Let's fix that. Differential Revision: https://reviews.llvm.org/D34322 llvm-svn: 311483
* lldb-argdumper doesn't need lldbCore.Bruce Mitchener2017-08-211-1/+0
| | | | | | | | | | | | Summary: lldb-argdumper only needs lldbUtility to successfully build and link. Reviewers: beanz, zturner, labath Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D36948 llvm-svn: 311399
* [unittests] Build LLVMTestingSupport for out-of-source buildsMichal Gorny2017-08-211-0/+6
| | | | | | | | | | | | | The Process/gdb-remote test now requires the LLVMTestingSupport library that is not installed by LLVM. As a result, when doing an out-of-source build it fails being unable to find the library. To solve that, build a local copy of the library when building LLDB with unittests and LLVM sources available. This is based on how we deal with bundled gtest sources. Differential Revision: https://reviews.llvm.org/D36886 llvm-svn: 311355
* [cmake] Explicitly link dependency libraries in the Host libraryMichal Gorny2017-08-211-1/+15
| | | | | | | | | | | | | | | | | | | | | | Add explicit linkage to the necessary system libraries in the Host library. Otherwise, the library fails to build with -Wl,--as-needed. The system libraries ended up being listed on the linker command-line before the static libraries needing them, resulting in --as-needed stripping them. Listing the dependent libraries explicitly is the canonical way of declaring libraries in CMake. It guarantees that the system library dependencies will be correctly propagated to reverse dependencies. The code used to link libraries reuses existing EXTRA_LIBS variable, copying code from other parts of LLDB. We might eventually remove the direct use of system libraries in the programs; however, I would prefer if we focused on fixing the build regressions in 5.0 branch first, and went further after the release. Differential Revision: https://reviews.llvm.org/D36885 llvm-svn: 311354
* [Plugins/ObjC] Remove more semicolons to placate -Wpedantic. NFCI.Davide Italiano2017-08-191-3/+3
| | | | llvm-svn: 311245
* [Plugins/ObjC] Remove unneded semicolon(s) to placate GCC -Wpedantic.Davide Italiano2017-08-191-4/+4
| | | | llvm-svn: 311244
* Commiting Christopher Brook's patch forJason Molenda2017-08-181-1/+2
| | | | | | | | "Prevent negative chars from being sign-extended into isprint and isspace which take and int and crash if the int is negative" https://reviews.llvm.org/D36620 llvm-svn: 311207
* [cmake] Add explicit linkage from Core to cursesMichal Gorny2017-08-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | The Core library calls functions provided by the curses library. Add an appropriate explicit LINK_LIBS to ${CURSES_LIBRARIES} to propagate the dependency correctly within the build system. It seems that so far the linkage was handled by some kind of implicit magic LLDB_SYSTEM_LIBS variable. However, it stopped working for unittests as the curses libraries are passed before the LLDBCore library, resulting in `-Wl,--as-needed` stripping the yet-unused library before it is required by LLDBCore, and effectively breaking the build. I think it's better to focus on listing all the dependencies explicitly and let CMake propagate them rather than trying to figure out why this hack stopped working. This is also more consistent with LLVM where the curses linkage in LLVMSupport is expressed directly in the library rather than deferred to the final programs. Differential Revision: https://reviews.llvm.org/D36358 llvm-svn: 311122
* convert hard tabs to spaces in PlatformOpenBSD.cppEd Maste2017-08-161-1/+1
| | | | | | | Another case of this was responsible for the whitespace conflict in D34776. llvm-svn: 311003
* Make i386-*-freebsd expression work on JIT pathEd Maste2017-08-1612-33/+65
| | | | | | | | | | | | | | | | * Enable i386 ABI creation for freebsd * Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap syscall * Unlike linux, the last argument of mmap is actually 64-bit(off_t). This requires us to push an additional word for the higher order bits. * Prior to this change, ktrace dump will show mmap failures due to invalid argument coming from the 6th mmap argument. Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D34776 llvm-svn: 311002
* Remove the DWARFExpression -> Clang ExpressionParser dependencyTamas Berghammer2017-08-1610-87/+46
| | | | | | | | It was completly unused and broke the part of the encapsulation that common code shouldn't depend on specific plugins or language specific features. llvm-svn: 311000
* Fix typo in variable name.Lang Hames2017-08-161-1/+1
| | | | llvm-svn: 310984
* Update NSArray/NSDictionary/NSSet formatters to handle newJason Molenda2017-08-153-467/+546
| | | | | | | | | macOS 10.13 - High Sierra - internal layouts. Patch by Sean Callanan. <rdar://problem/33282015> llvm-svn: 310959
* [CMake] Fixing an error in STREQUAL usage.Chris Bieneman2017-08-151-1/+1
| | | | llvm-svn: 310955
* [CMake] Disable code sign entitlements when using lldb_codesignChris Bieneman2017-08-151-2/+11
| | | | | | Turns out self-signed certificates and entitlements don't always play well together... llvm-svn: 310936
* [LLDB][MIPS] Fix process load/unload on android.Nitesh Jain2017-08-144-8/+25
| | | | | | | | | | | | To detect the correct function name based on the list of available symbols instead of the SDK version Reviewers: tberghammer, clayborg Subscribers: jaydeep, bhushan, lldb-commits Differential Revision: https://reviews.llvm.org/D36445 llvm-svn: 310856
* [LLDB][MIPS] Set the Section's file address forNitesh Jain2017-08-141-2/+4
| | | | | | | | | | | | ELF section to LLDB_INVALID_ADDRESS if SHF_ALLOC is not set. Reviewers: labath, clayborg Subscribers: jaydeep, bhushan, lldb-commits Differential Revision: https://reviews.llvm.org/D35784 llvm-svn: 310855
* remove FreeBSD xfail decorator from TestCppNsImportEd Maste2017-08-101-1/+0
| | | | | | | | | | The Linux xfail decorator was removed in r272326 with the claim that the test "runs reliably on the linux x86 buildbot." It also runs reliably on FreeBSD for me. llvm.org/pr25925 llvm-svn: 310644
* remove FreeBSD xfail decorator from TestCallStdStringFunctionEd Maste2017-08-101-3/+0
| | | | | | | | | | | This test is consistently reporting unexpected pass for me on FreeBSD 10 and 12. It was failing on the old FreeBSD buildbot which has now been retired for some time. Will investigate further if this fails once a new buildbot is configured and running tests. llvm.org/pr17807 llvm-svn: 310626
* remove FreeBSD xfail decorator from TestExitDuringBreakEd Maste2017-08-101-3/+0
| | | | | | | | This test passes for me on FreeBSD 10 and 12(-CURRENT). llvm.org/pr18190 llvm-svn: 310624
* Report inferior signals as signals, not exceptions, on FreeBSDEd Maste2017-08-107-63/+16
| | | | | | | | | | | | | | | | | | | | | This is the FreeBSD equivalent of r238549. This serves 2 purposes: * LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/ SIGFPE the way it is suppose to be handled. Prior to this fix these signals will neither create a coredump, nor exit from the debugger or work for signal handling scenario. * eInvalidCrashReason need not report "unknown crash reason" if we have a valid si_signo llvm.org/pr23699 Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D35223 llvm-svn: 310591
* Add remainder of unittests to Xcode projectTim Hammerquist2017-08-091-17/+133
| | | | | | | | Resolves a few build settings required to run DWARF tests as well. rdar://problem/33664378 llvm-svn: 310512
* Fix VASprintfTest.cpp for Darwin, add checksTim Hammerquist2017-08-092-2/+12
| | | | | | | | | | | | | | | | | | | | | | | Summary: The EncodingError test ensures that trying to encode a multibyte wchar with a given codepage fails. If setlocale() fails, the encoding is performed using the current locale, which may or may not fail. This patch asserts that both setlocale() operations are successful, as well as falling back to a widely available unibyte encoding for non-Windows systems. <rdar://problem/33782806> Reviewers: zturner, labath, lhames Reviewed By: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D36496 llvm-svn: 310499
* Fix PlatformPythonTestCase.test_platform_list for the build botsVadim Macagon2017-08-091-6/+12
| | | | llvm-svn: 310488
* Expose active and available platform lists via SBDebugger APIVadim Macagon2017-08-096-0/+186
| | | | | | | | | | | | Summary: The available platform list was previously only accessible via the `platform list` command, this patch makes it possible to access that list via the SBDebugger API. The active platform list has likewise been exposed via the SBDebugger API. Differential Revision: https://reviews.llvm.org/D35760 llvm-svn: 310452
* Add existing unit tests to Xcode projectTim Hammerquist2017-08-081-0/+52
| | | | | | | | | | | | | | | | | Summary: This adds gtest test files to the Xcode project which were previously only in the cmake config. This is the first of several planned merges. Reviewers: beanz, spyffe, jingham Reviewed By: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D36485 llvm-svn: 310417
* Checking in files accidentally missed in later diffs of revision r310261Abhishek Aggarwal2017-08-082-0/+596
| | | | | | | | | | -- 2 files were missing in this commit which should have been there. These files were submitted initially for review and were reviewed. However, while updating the revision with newer diffs, I accidentally forgot to include them in newer diffs. So commiting now. llvm-svn: 310341
* Fixed build failure for revision r310261Abhishek Aggarwal2017-08-071-0/+6
| | | | | | -- Was failing for Linux llvm-svn: 310270
* Fixed build failure for revision r310261Abhishek Aggarwal2017-08-071-0/+4
| | | | | | -- Build was failing for freebsd llvm-svn: 310266
* Tool for using Intel(R) Processor Trace hardware featureAbhishek Aggarwal2017-08-0723-35/+2492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: 1. Provide single library for all Intel specific hardware features instead of individual libraries for each feature 2. Added Intel(R) Processor Trace hardware feature in this single library. Details about the tool implementing this feature is as follows: Tool developed on top of LLDB to provide its users the execution trace of the debugged inferiors. Tool's API are exposed as C++ object oriented interface in a shared library. API are designed especially to be easily integrable with IDEs providing LLDB as an application debugger. Entire API is also available as Python functions through a script bridging interface allowing development of python modules. This patch also provides a CLI wrapper to use the Tool through LLDB's command line. Highlights of the Tool and the wrapper are given below: ****************************** Intel(R) Processor Trace Tool: ****************************** - Provides execution trace of the debugged application - Uses Intel(R) Processor Trace hardware feature (already implemented inside LLDB) for this purpose -- Collects trace packets generated by this feature from LLDB, decodes and post-processes them -- Constructs the execution trace of the application -- Presents execution trace as a list of assembly instructions - Provides 4 APIs (exposed as C++ object oriented interface) -- start trace with configuration options for a thread/process, -- stop trace for a thread/process, -- get the execution flow (assembly instructions) for a thread, -- get trace specific information for a thread - Easily integrable into IDEs providing LLDB as application debugger - Entire API available as Python functions through script bridging interface -- Allows developing python apps on top of Tool - README_TOOL.txt provides more details about the Tool, its dependencies, building steps and API usage - Tool ready to use through LLDB's command line -- CLI wrapper has been developed on top of the Tool for this purpose ********************************* CLI wrapper: cli-wrapper-pt.cpp ********************************* - Provides 4 commands (syntax similar to LLDB's CLI commands): -- processor-trace start -- processor-trace stop -- processor-trace show-trace-options -- processor-trace show-instr-log - README_CLI.txt provides more details about commands and their options Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: clayborg, jingham, lldb-commits, labath Reviewed By: clayborg Subscribers: ravitheja, emaste, krytarowski, mgorny Differential Revision: https://reviews.llvm.org/D33035 llvm-svn: 310261
* Cut and paste error from r23162.Jim Ingham2017-08-032-2/+2
| | | | llvm-svn: 309977
* Add an auto-continue flag to breakpoints & locations.Jim Ingham2017-08-0316-29/+273
| | | | | | | | | | | | | | You can get a breakpoint to auto-continue by adding "continue" as a command, but that has the disadvantage that if you hit two breakpoints simultaneously, the continue will force the process to continue, and maybe even forstalling the commands on the other. The auto-continue flag means the breakpoints can negotiate about whether to stop. Writing tests, I wanted to supply some commands when I made the breakpoints, so I also added that ability. llvm-svn: 309969
* Update for llvm api change.Rafael Espindola2017-08-031-5/+0
| | | | llvm-svn: 309916
* Fix ProcessAPITestCase.test_get_process_infoVadim Macagon2017-08-021-15/+27
| | | | llvm-svn: 309803
* Fix a mis-feature with propagation of breakpoint options -> location options.Jim Ingham2017-08-0213-128/+378
| | | | | | | | | | | | | | When an option was set at on a location, I was just copying the whole option set to the location, and letting it shadow the breakpoint options. That was wrong since it meant changes to unrelated options on the breakpoint would no longer take on this location. I added a mask of set options and use that for option propagation. I also added a "location" property to breakpoints, and added SBBreakpointLocation.{G,S}etCommandLineCommands since I wanted to use them to write some more test cases. <rdar://problem/24397798> llvm-svn: 309772
* xfail test_get_process_info pending bot fixesSean Callanan2017-08-011-0/+1
| | | | llvm-svn: 309714
OpenPOWER on IntegriCloud