summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Add logging to SBThread::GetInfoItemByPathAsString toJason Molenda2017-02-021-2/+2
| | | | | | | | | | | | print the path being requested. Change the GetInfoItemByPathAsString docuemtnation in the .i file to use docstring instead of autodoc so the function signature is included in the python help. <rdar://problem/29999567> llvm-svn: 293858
* Break some dependencies in lldbUtility.Zachary Turner2017-02-0121-1294/+1010
| | | | | | Differential Revision: https://reviews.llvm.org/D29359 llvm-svn: 293806
* Fix android build of the new process launcherPavel Labath2017-02-011-0/+1
| | | | | | | Android does not define the "cross-platform" symbol PT_TRACE_ME. Define it ourselves, so we can keep the rest of the code generic. llvm-svn: 293779
* Document that LaunchProcessPosixSpawn is used on NetBSDKamil Rytarowski2017-02-011-1/+1
| | | | | | | | No functional change. Sponsored by <The NetBSD Foundation> llvm-svn: 293770
* Transform ProcessLauncherLinux to ProcessLauncherPosixForkKamil Rytarowski2017-02-015-232/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use ProcessLauncherPosixFork in Linux and NetBSD. Changes to ProcessLauncherLinux: - Limit personality.h and ASLR code to Linux. - Reuse portable ptrace(2) PT_TRACE_ME operation available on Linux and BSDs. - Limit ETXTBSY error path from execve(2) to Linux. - In LaunchProcess declaration change virtual to override. This code should be readily available for FreeBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, labath, emaste Reviewed By: labath Subscribers: danalbert, srhines, mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29347 llvm-svn: 293768
* Open ELF core dumps with more than 64K sectionsPavel Labath2017-01-314-8/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Problem: There are three filelds in the ELF header - e_phnum, e_shnum, and e_shstrndx - that could be bigger than 64K and therefore do not fit in 16 bits reserved for them in the header. If this happens, pretty often there is a special section at index 0 which contains their real values for these fields in the section header in the fields sh_info, sh_size, and sh_link respectively. Fix: - Rename original fields in the header declaration. We want to have them around just in case. - Reintroduce these fields as 32-bit members at the end of the header. By default they are initialized from the header in Parse() method. - In Parse(), detect the situation when the header might have been extended into section info #0 and try to read it from the same data source. - ObjectFileELF::GetModuleSpecifications accesses some of these fields but the original parse uses too small data source. Re-parse the header if necessary using bigger data source. - ProcessElfCore::CreateInstance uses header with potentially sentinel values, but it does not access these fields, so a comment here is enough. Reviewers: labath Reviewed By: labath Subscribers: davidb, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D29095 Author: Eugene Birukov <eugenebi@hotmail.com> llvm-svn: 293714
* [CMake] [4/4] Update a batch of pluginsChris Bieneman2017-01-3111-16/+93
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293701
* [CMake] [3/4] Update a batch of pluginsChris Bieneman2017-01-3121-21/+210
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293700
* [CMake] [2/4] Update a batch of pluginsChris Bieneman2017-01-3118-18/+174
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293699
* [CMake] [1/4] Update a batch of pluginsChris Bieneman2017-01-3116-16/+175
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293698
* [CMake] Add explicit dependencies to pluginsChris Bieneman2017-01-3113-13/+106
| | | | | | | | | | | | | | | | | Summary: This patch does two things. First it updates all the ABI plugins with accurate dependencies, and second it adds a tracking mechanism for add_lldb_library to denote plugin libraries, allowing us to build up a list of all the configured plugins. This list of generated plugins will be used during generating liblldb so that we can link all the plugins into the library. If this patch looks good I will update all the other plugins in subsequent patches. Reviewers: labath, zturner Subscribers: nemanjai, mgorny, lldb-commits, jgosnell Differential Revision: https://reviews.llvm.org/D29348 llvm-svn: 293696
* [CMake] Fix broken NetBSD botsChris Bieneman2017-01-311-4/+5
| | | | | | http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7/builds/4558/steps/cmake%20local/logs/stdio llvm-svn: 293687
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-3111-1/+177
| | | | | | | | | | | | | | | | | Summary: This patch adds accurate dependency specifications to the mail LLDB libraries and tools. In all cases except lldb-server, these dependencies are added in addition to existing dependencies (making this low risk), and I performed some code cleanup along the way. For lldb-server I've cleaned up the LLVM dependencies down to just the minimum actually required. This is more than lldb-server actually directly references, and I've left a todo in the code to clean that up. Reviewers: labath, zturner Subscribers: lldb-commits, danalbert, srhines, ki.stfu, mgorny, jgosnell Differential Revision: https://reviews.llvm.org/D29333 llvm-svn: 293686
* NFC. Remove unused header include.Chris Bieneman2017-01-311-1/+0
| | | | llvm-svn: 293646
* Add NetBSD support in Host::GetCurrentThreadIDKamil Rytarowski2017-01-311-0/+6
| | | | | | | | | | | | | | | | | | | Summary: To retrieve the native thread ID there must be called _lwp_self(). Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, emaste, labath Reviewed By: joerg, clayborg, labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29264 llvm-svn: 293625
* Switch HostInfoNetBSD::GetProgramFileSpec to sysctl(7)Kamil Rytarowski2017-01-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: Remove dependency on the proc (/proc) filesystem, which is optional. KERN_PROC_PATHNAME is available in NetBSD-current and will land NetBSD 8.0. Older stable versions of NetBSD will not be supported. Sponsored by <The NetBSD Foundation> Reviewers: emaste, joerg, labath, clayborg Reviewed By: clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29089 llvm-svn: 293392
* Recognize Real-Time Signals on NetBSDKamil Rytarowski2017-01-281-3/+31
| | | | | | | | | | | | | | | | | | | | Summary: Real-Time Signals are available in NetBSD-current and will land NetBSD 8.0. Older stable versions of NetBSD will not be supported. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, clayborg, emaste Reviewed By: labath, clayborg, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29091 llvm-svn: 293391
* One of the changes Jim made in r286288 (cleaning up the stop printJason Molenda2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | header line, backtrace output) was to remove the current pc value from frames where we have source level information. We've been discussing this for the past week and based on input from a group of low level users, I believe this is the wrong default behavior for the command line lldb tool. lldb's backtrace will include the pc value for all stack frames regardless of whether they have source level debug information or not. A related part of r286288 removes the byte offset printing for functions with source level information (e.g. "main + 22 sourcefile.c:10" is printed as "main sourcefile.c:10"). I don't see a compelling case for changing this part of 286288 so I'm leaving that as-is (in addition to the rest of 286288 which is clearly better than the previous output style). <rdar://problem/30083904> llvm-svn: 293366
* NFC: Improve comments in SymbolFilePDB.cppAdrian McCarthy2017-01-271-72/+46
| | | | | | | Mostly this just fixes bad wrapping caused by the reformat, with tiny changes sprinkled here and there. llvm-svn: 293336
* Address post-commit review remarksPavel Labath2017-01-271-1/+1
| | | | | | | Tamas pointed out that the macro name I used in r293282 was too vague. Rename it to better reflect what it is used for. llvm-svn: 293287
* Refactor the android accept hackPavel Labath2017-01-271-5/+7
| | | | | | | | This moves the accept hack from the android toolchain file into LLDBConfig.cmake. This allows successful lldb android compilation without relying on our custom toolchain file. llvm-svn: 293281
* Unroll r292930 due to TestCallThatThrows test fail is not fixed in ↵Boris Ulasevich2017-01-274-85/+17
| | | | | | reasonable time. llvm-svn: 293269
* Fix SBData::SetData() so that it always sets the address byte size correctly ↵Greg Clayton2017-01-251-0/+4
| | | | | | and added a test. llvm-svn: 293102
* include Host/Time.h in Cocoa.cppPavel Labath2017-01-251-0/+1
| | | | | | | Time.h contains the necessary magic to enable timegm on all android targets. llvm-svn: 293047
* NPL: Compartmentalize arm64 single step workaround betterPavel Labath2017-01-254-133/+106
| | | | | | | | | | | The main motivation for me doing this is being able to build an arm android lldb-server against api level 9 headers, but it seems like a good cleanup nonetheless. The entirety of the cpu_set_t dance now resides in SingleStepCheck.cpp, which is only built on arm64. llvm-svn: 293046
* Replace chdir() usage with the llvm equivalent.Pavel Labath2017-01-253-22/+7
| | | | | | | This removes a hack in PosixApi.h, which tends to produce strange compile errors when it's included in the wrong order. llvm-svn: 293045
* Jim unintentionally had the gdb-format specifiers falling throughJason Molenda2017-01-251-17/+21
| | | | | | | | | 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-243-6/+21
| | | | | | | | | | | | | | 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-244-17/+85
| | | | | | | | 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-242-9/+6
| | | | | | | | | | Reviewers: clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D29036 llvm-svn: 292920
* 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
* Replace getcwd with the llvm equivalentPavel Labath2017-01-235-48/+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-203-33/+71
| | | | | | | | | | | | | | | | | | 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-193-0/+63
| | | | | | | | | | | | | | | 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
* Add a more succinct logging syntaxPavel Labath2017-01-183-53/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-10/+9
| | | | | | | | | | | | | | | | | 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-161-24/+22
| | | | | | | | | | | | | | | | 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
* Remove a couple of Stream flagsPavel Labath2017-01-139-168/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud