summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Conditionalized OsLogger.cpp on a modern SDK.Sean Callanan2017-01-251-1/+3
| | | | llvm-svn: 293020
* Jim unintentionally had the gdb-format specifiers falling throughJason Molenda2017-01-253-17/+40
| | | | | | | | | after r276132 so that 'x/4b' would print out a series of 4 8-byte quantities. Fix that, add a test case. <rdar://problem/29930833> llvm-svn: 293002
* Provide option to set pc of the file loaded in memory.Hafiz Abid Qadeer2017-01-245-8/+23
| | | | | | | | | | | | | | Summary: This commit adds an option to set PC to the entry point of the file loaded using "target module load" command. In D28804, Greg asked me to separate this part under a different option. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28944 llvm-svn: 292989
* Fix a bug where lldb does not respect the packet size.Hafiz Abid Qadeer2017-01-241-5/+25
| | | | | | | | | | | | | | Summary: LLDB was using packet size advertised by the target as the max memory size to write in one go. It is wrong because packets have other overhead apart from memory payload. Also memory transferred through 'm' and 'M' packets needs 2 bytes in packet to transfer 1 of memory. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28808 llvm-svn: 292987
* Fix android build for r292935 (personality.h)Pavel Labath2017-01-241-5/+10
| | | | | | | | | | | It turns out things are not as simple as I hoped. sys/personality.h exists on all androids but it does not define the required symbols on all platform levels. Add a compile check for platform level to compile against both new and old android headers. llvm-svn: 292939
* FreeBSD ARM support for software single stepEd Maste2017-01-244-7/+237
| | | | | | | | | | | Implementation of software single step for FreeBSD on ARM. The code is largely based on the Linux implementation of the same functionality. Patch by Dmitry Mikulin! Differential Revision: https://reviews.llvm.org/D25756 llvm-svn: 292937
* android-mips: define PTRACE_GETREGSET in headers don't do itPavel Labath2017-01-241-0/+3
| | | | | | | PTRACE_GETREGSET is only defined on mips only since api level 21. Define it ourselves, so we can compile with older platform headers. llvm-svn: 292936
* include linux/personality.h on androidPavel Labath2017-01-241-0/+4
| | | | | | | sys/personality.h is present only since android platform level 21. The linux/ version is present everywhere. llvm-svn: 292935
* Include termios.h for definition of struct winsizePavel Labath2017-01-241-0/+1
| | | | | | | | | | On android API level 9 the header does not get included transitively. Include it directly. As far as I can see, all non-windows platforms should have this header. If that turns out to be incorrect, we can add some ifdefs around that. llvm-svn: 292931
* Bug 30863 - Step doesn't stop with conditional breakpoint on the next lineBoris Ulasevich2017-01-249-24/+254
| | | | | | | | Differential Revisions: https://reviews.llvm.org/D26497 (committed r290168, temporary reverted r290197) https://reviews.llvm.org/D28945 (fix for Ubuntu tests fail) llvm-svn: 292930
* Add format_provider for lldb::StateTypePavel Labath2017-01-245-13/+38
| | | | | | | | | | Reviewers: clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D29036 llvm-svn: 292920
* Fix the last commit; compression was being enabled on mac nativeJason Molenda2017-01-241-1/+1
| | | | | | | | | | | | | | | | | | | which led to ERROR: test_auxv_chunked_reads_work_debugserver (tools/lldb-server/TestGdbRemoteAuxvSupport.py) ERROR: test_auxv_data_is_correct_size_debugserver (tools/lldb-server/TestGdbRemoteAuxvSupport.py) ERROR: test_auxv_keys_look_valid_debugserver (tools/lldb-server/TestGdbRemoteAuxvSupport.py) ERROR: test_qSupported_returns_known_stub_features_debugserver (tools/lldb-server/TestLldbGdbServer.py) failures because debugserver was advertising compression being available, e.g. send packet: $qSupported:xmlRegisters=i386,arm,mips#12 read packet: $qXfer:features:read+;PacketSize=20000;qEcho+;SupportedCompressions=zlib-deflate;DefaultCompressionMinSize=384#00 maybe these tests should be a little more accepting of additional features. but I didn't mean for this to be enabled on mac native. llvm-svn: 292890
* Prefer lzfse if it is an available compression method (this wasJason Molenda2017-01-241-3/+3
| | | | | | | defaulting to zlib previously). <rdar://problem/30159130> llvm-svn: 292884
* Enable compression capability in debugserver for all of ios/watchos/tvosJason Molenda2017-01-241-6/+1
| | | | | | | | environments. <rdar://problem/30159019> llvm-svn: 292882
* weak-link debugserver against the LoggingSupport framework;Jason Molenda2017-01-241-0/+49
| | | | | | | | systems without this framework will not get a link error. <rdar://problem/30158797> llvm-svn: 292880
* Replace getcwd with the llvm equivalentPavel Labath2017-01-236-49/+22
| | | | | | | | | | | | | | | | | | | | | Summary: getcwd() is not available (well.. um.. deprecated?) on windows, and the way PosixApi.h is providing it causes strange compile errors when it's included in the wrong order. The best way to avoid that is to just not use chdir. This replaces all uses of getcwd in generic code. There are still a couple of more uses, but these are in platform-specific code. chdir() is causing a similar problem, but for that there is no llvm equivalent for that (yet). Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28858 llvm-svn: 292795
* Add a catch-all line for detecting dyld in the inferior processJason Molenda2017-01-212-0/+5
| | | | | | | shlibs so we don't miss dyld. <rdar://problem/30128580> llvm-svn: 292696
* Prevent client from querying each thread's PC at each stop.Pavel Labath2017-01-204-36/+187
| | | | | | | | | | | | | | | | | | Summary: The server was no longer sending the thread PCs the way the client expected them. I changed the server to send them back as a threadstop info field, similar to the Apple version of the server. I also changed the client to look for them there, before querying the server. I added a test to ensure the server doesn't stop sending them. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D28880 Author: Jason Majors llvm-svn: 292611
* Fix more unused variable warnings when asserts are disabled.Hafiz Abid Qadeer2017-01-204-0/+5
| | | | llvm-svn: 292598
* Provide a substitute to load command of gdb.Hafiz Abid Qadeer2017-01-195-0/+91
| | | | | | | | | | | | | | | For bare-metal targets, lldb was missing a command like 'load' in gdb which can be used to create executable image on the target. This was discussed in http://lists.llvm.org/pipermail/lldb-dev/2016-December/011752.html This commits adds an option to "target module load" command to provide that functionality. It does not set the PC to entry address which will be done separately. Reviewed in https://reviews.llvm.org/D28804 llvm-svn: 292499
* Refactor logging in NativeProcessLinuxPavel Labath2017-01-191-637/+323
| | | | | | | | | | Use the LLDB_LOG macro instead of the more verbose if(log) ... syntax. I have also consolidated the log channels (everything now goes to the posix channel, instead of a mixture of posix and lldb), and cleaned up some of the more convoluted log statements. llvm-svn: 292489
* Avoid unused variable warning when assert is disabled.Hafiz Abid Qadeer2017-01-191-2/+2
| | | | llvm-svn: 292488
* Fix a problem with the new dyld interface code -- when a new processJason Molenda2017-01-191-0/+5
| | | | | | | | | | starts up, we need to clear the target's image list and only add the binaries into the target that are actually present in this process run. <rdar://problem/29857613> llvm-svn: 292454
* Fix new Log unit testPavel Labath2017-01-181-1/+1
| | | | | | | the test was flaky because I specified the format string for the process id incorrectly. This should fix it. llvm-svn: 292414
* Fix windows build for previous commitPavel Labath2017-01-181-1/+2
| | | | | | We get an error about a redefinition of getcwd(). This seems to fix it. llvm-svn: 292364
* Add a more succinct logging syntaxPavel Labath2017-01-187-65/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds the LLDB_LOG macro, which enables one to write more succinct log statements. if (log) log->Printf("log something: %d", var); becomes LLDB_LOG(log, "log something: {0}, var); The macro still internally does the "if(log)" dance, so the arguments are only evaluated if logging is enabled, meaning it has the same overhead as the previous syntax. Additionally, the log statements will be automatically prefixed with the file and function generating the log (if the corresponding new argument to the "log enable" command is enabled), so one does not need to manually specify this in the log statement. It also uses the new llvm formatv syntax, which means we don't have to worry about PRIx64 macros and similar, and we can log complex object (llvm::StringRef, lldb_private::Error, ...) more easily. Differential Revision: https://reviews.llvm.org/D27459 llvm-svn: 292360
* [cmake] Make lldb build with the android ndk toolchain filePavel Labath2017-01-177-26/+19
| | | | | | | | | | | | | | | | | Summary: The NDK cmake toolchain file defines CMAKE_SYSTEM_NAME=Android, so switch the build to use that. I have also updated the in-tree toolchain file to do that (instead of defining __ANDROID_NDK__), so it can still be used to build. After migrating the last bits of non-toolchainy bits out of the in-tree toolchain, I intend to delete it. Reviewers: tberghammer, danalbert Subscribers: srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D28775 llvm-svn: 292212
* Fix windows unit testsPavel Labath2017-01-161-1/+1
| | | | | | | | | The unit test I added in the previous commit discovered a bug in PrependPathComponent on windows -- it was calling SetFile with the host native path syntax, whereas it should be explicitly specifying the path syntax (as AppendPathComponent does). This fixes it. llvm-svn: 292106
* FileSpec: Fix PrependPathComponent("/")Pavel Labath2017-01-162-25/+45
| | | | | | | | | | | | | | | | Summary: PrependPathComponent was unconditionally inserting path separators between the path components. This is not correct if the prepended path is "/", which caused problems down the line. Fix the function to use the same algorithm as AppendPathComponent and add a test. This fixes one part of llvm.org/pr31611. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28677 llvm-svn: 292100
* Fix TestRegisterVariables for linux arm/arm64 gcc ver > 5Omair Javaid2017-01-131-1/+1
| | | | | | | | | We are going to turn off buffer overflow introduced by gcc by turning off FORTIFY_SOURCE. Differential revision: https://reviews.llvm.org/D28666 llvm-svn: 291949
* Remove a couple of Stream flagsPavel Labath2017-01-1310-191/+33
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I came across this while trying to understand what Log::Debug does. It turns out it does not do anything, as there is no instance of someone setting a debug flag on a stream. The same is true for the Verbose and AddPrefix flags. Removing these will enable some cleanups in the Logging class, and it brings us closer towards the long term goal of standardizing on llvm stream classes. I have removed these flags and all code the code which tested for their presence -- there wasn't much of it, mostly in SymbolFileDWARF, which is probably going away at some point anyway. The eBinary flag still has some users, so I am letting it life for the time being. Reviewers: clayborg, zturner Subscribers: aprantl, beanz, lldb-commits Differential Revision: https://reviews.llvm.org/D28616 llvm-svn: 291895
* Fix log typo in ABISysV_arm64.cppOmair Javaid2017-01-131-1/+1
| | | | | | | This commit fixes a typo in ABISysV_arm64.cpp. Log was reporting a call to ABISysV_x86_64::PrepareTrivialCall. llvm-svn: 291889
* [CMake] Fix finding LLDBWrapPython.cpp in Framework buildChris Bieneman2017-01-121-1/+1
| | | | | | The framework build was constructing the path to LLDBWrapPython incorrectly. It is apparently always in the scripts directory. llvm-svn: 291788
* Fix gcc build for r291756Pavel Labath2017-01-121-1/+1
| | | | | | I have accidentally added extra llvm:: namespace qualification. llvm-svn: 291763
* Add format_provider for the Error classPavel Labath2017-01-123-0/+31
| | | | | | | | | | | | | | | Summary: The formatter supports the same options as the string-like classes, i.e. the ability to truncate the displayed string. I don't anticipate it would be much used, but it seems consistent. Reviewers: zturner, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D28519 llvm-svn: 291759
* Fix build for clang r291753Pavel Labath2017-01-121-2/+1
| | | | llvm-svn: 291756
* Update to match clang r291737.Richard Smith2017-01-121-3/+2
| | | | llvm-svn: 291738
* XFAIL TestRegisterVariables on gcc-4.8-x86_64Pavel Labath2017-01-101-0/+2
| | | | | | | I have previously enabled this test for this configuration. However, it turns out it only passes for gcc-4.9. llvm-svn: 291563
* Improve Type::GetTypeScopeAndBasenameHelper and add unit testsTamas Berghammer2017-01-107-59/+117
| | | | | | | | | | Previously it failed to handle nested types inside templated classes making it impossible to look up these types using the fully qualified name. Differential revision: https://reviews.llvm.org/D28466 llvm-svn: 291559
* [cmake] Fix LLVM_LINK_LLVM_DYLIB build, againPavel Labath2017-01-101-1/+7
| | | | | | | | | | | | | The llvm_config hack for lldb-server is only necessary for !DYLIB builds, as otherwise we would get unresolved symbols from lldb libraries which do not track their dependencies correctly (all of them). In a DYLIB build, the so will already be added to the link dependencies and we can use that to resolve all missing symbols. The proper fix for this would be to have each lldb library track its dependencies correctly. llvm-svn: 291555
* [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPSNitesh Jain2017-01-102-1/+265
| | | | | | | | | | Reviewers: labath, clayborg Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D27088 llvm-svn: 291554
* [LLDB][MIPS] Revert TestLldbGdbServer failure for MIPSNitesh Jain2017-01-102-265/+1
| | | | llvm-svn: 291553
* [LLDB][MIPS] Fix TestLldbGdbServer failure for MIPSNitesh Jain2017-01-102-1/+265
| | | | | | | | | | Reviewers: labath, clayborg Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D27088 llvm-svn: 291549
* Stop limiting the number of TSan backtrace size to 8Kuba Mracek2017-01-101-1/+2
| | | | | | | | We currently limit the length of TSan returned backtraces to 8, which is not necessary (and a bug, most likely). Let's remove this. Differential Revision: https://reviews.llvm.org/D28035 llvm-svn: 291522
* [cmake] Obtain LLVM_CMAKE_PATH from llvm-configMichal Gorny2017-01-091-2/+3
| | | | | | | Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config instead of reconstructing it locally. llvm-svn: 291500
* Fix dereferencing of pointers to empty classesTamas Berghammer2017-01-074-30/+110
| | | | llvm-svn: 291350
* Remove an incorrect byte size calculation in DWARFASTParserClangTamas Berghammer2017-01-071-1/+1
| | | | llvm-svn: 291349
* Install lldb Python module on Windows.Zachary Turner2017-01-061-6/+9
| | | | | | | Patch by Vadim Chugunov Differential Revision: https://reviews.llvm.org/D27476 llvm-svn: 291291
* Reapply "Fixes for Clang API changes to use std::shared_ptr"David Blaikie2017-01-061-16/+17
| | | | | | | | | Aleksey Shlyapnikov found the memory leak I introduced, recommitted the Clang change with a fix for this. This reapplies r291200 reverted in r291250 llvm-svn: 291271
* Revert "Fixes for Clang API changes to use std::shared_ptr"David Blaikie2017-01-061-17/+16
| | | | | | | | | The original Clang change caused a memory leak detected by asan. Reverting while I investigate. This reverts commit r291200. llvm-svn: 291250
OpenPOWER on IntegriCloud