summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb] Fix ninja URLShoaib Meenai2017-04-101-1/+1
| | | | | | The old URL is a 404 now. Pointed out by Smirftsch1 on IRC. llvm-svn: 299845
* Mark this test as XFAIL on all platforms, it's happening everywhere.Jason Molenda2017-04-071-1/+1
| | | | | | llvm.org/pr32553 and <rdar://problem/30646077> are tracking this. llvm-svn: 299807
* Correct environ parsing on NetBSDKamil Rytarowski2017-04-071-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This replaces old code in Host::GetEnvironment for NetBSD with the version from Linux. This makes parsing environment variables correctly. It also fixes programs that depend on the variables like curses(3) applications. Long term this function should be moved to Process Plugin, as currently env variables are not available with remote debugging. Other BSDs might want to catch up after this change. Tested with NetBSD top(1). Sponsored by <The NetBSD Foundation> Reviewers: emaste, labath, joerg, kettenis Reviewed By: emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31784 llvm-svn: 299783
* Correct environ parsing on FreeBSDEd Maste2017-04-071-12/+9
| | | | | | | Sync Host:GetEnvironment with Linux and Kamil Rytarowski's forthcoming NetBSD change in review D31784. llvm-svn: 299781
* Add more tests for ExtractContextAndIdentifierEugene Zemtsov2017-04-061-0/+5
| | | | llvm-svn: 299729
* New C++ function name parsing logic (Resubmit)Eugene Zemtsov2017-04-067-129/+1010
| | | | | | | | | | | | | | | | | | | | | Current implementation of CPlusPlusLanguage::MethodName::Parse() doesn't get anywhere close to covering full extent of possible function declarations. It causes incorrect behavior in avoid-stepping and sometimes messes printing of thread backtrace. This change implements more methodical parsing logic based on clang lexer and simple recursive parser. Examples: void std::vector<Class, std::allocator<Class>>::_M_emplace_back_aux<Class const&>(Class const&) void (*&std::_Any_data::_M_access<void (*)()>())() Previous version of this change (D31451) was rolled back due to an issue with Objective-C selectors being incorrectly recognized as a C++ identifier. Differential Revision: https://reviews.llvm.org/D31451 llvm-svn: 299721
* Try to fix FreeBSD build after IWYU changes.Zachary Turner2017-04-061-0/+1
| | | | llvm-svn: 299719
* Fix build failure in unit test.Zachary Turner2017-04-061-0/+1
| | | | llvm-svn: 299718
* iwyu fixes for lldbCore.Zachary Turner2017-04-06126-845/+1958
| | | | | | | | | | | | | | This adjusts header file includes for headers and source files in Core. In doing so, one dependency cycle is eliminated because all the includes from Core to that project were dead includes anyway. In places where some files in other projects were only compiling due to a transitive include from another header, fixups have been made so that those files also include the header they need. Tested on Windows and Linux, and plan to address failures on OSX and FreeBSD after watching the bots. llvm-svn: 299714
* Try to fix FreeBSD build after iwyu changes.Zachary Turner2017-04-061-0/+1
| | | | llvm-svn: 299705
* XFAIL TestDataFormatterLibcxxVBool on Linux & AndroidTamas Berghammer2017-04-061-0/+1
| | | | | | | The skipping logic for the test have been fixed recently but the test is very flakey on the buildbot. llvm-svn: 299677
* iwyu fixes on lldbUtility.Zachary Turner2017-04-0666-215/+350
| | | | | | | | | | | | | This patch makes adjustments to header file includes in lldbUtility based on recommendations by the iwyu tool (include-what-you-use). The goal here is to make sure that all files include the exact set of headers which are needed for that file only, to eliminate cases of dead includes (e.g. someone deleted some code but forgot to delete the header includes that that code necessitated), and to eliminate the case where header includes are picked up transitively. llvm-svn: 299676
* Update unittests/Host/SocketTest.cpp to also use the newJason Molenda2017-04-061-7/+4
| | | | | | one-socket API. llvm-svn: 299613
* Some old mach-o core files have an LC_IDENT load command Jason Molenda2017-04-064-3/+84
| | | | | | | | and there's a string in there that can be helpful in locating the kernel binary. Use it. <rdar://problem/31444711> llvm-svn: 299612
* getAsInteger is not a equivalent replacement for strtolJim Ingham2017-04-061-2/+10
| | | | | | | | work around that fact for CommandObjectMemoryWrite. <rdar://problem/31457148> llvm-svn: 299609
* Change how UDP sockets are set up -- use the same one socket forJason Molenda2017-04-065-42/+37
| | | | | | | | | both sending and receiving information, instead of using one socket to send and another to receive. The two socket arrangement fails over when a firewall is between the two systems. <rdar://problem/31286757> llvm-svn: 299608
* Annotate some more libc++ tests with the new categoryPavel Labath2017-04-053-29/+20
| | | | | | This makes sure we are able to run them properly on android. llvm-svn: 299588
* The darwin_log tests are very fragile and currently do not properly assess ↵Sean Callanan2017-04-053-2/+4
| | | | | | | | | | the state of that functionality. I have put them all in their own category, and made that category disabled by default. Differential revision: https://reviews.llvm.org/D31718 llvm-svn: 299587
* Fix a typo introduce in r299200.Nitesh Jain2017-04-051-1/+1
| | | | llvm-svn: 299527
* Reverting r299374 & r299402 due to testsuite failure.Jim Ingham2017-04-057-982/+129
| | | | | | | | | | | | | | This caused a failure in the test case: functionalities/breakpoint/objc/TestObjCBreakpoints.py When we are parsing up names we stick interesting parts of the names in various buckets, one of which is the ObjC selector bucket. The new C++ name parser must be interfering with this process somehow. <rdar://problem/31439305> llvm-svn: 299489
* Tone down the "lldb types" log a bit.Jim Ingham2017-04-041-4/+13
| | | | | | | | | | Change the get shared class info function to only dump its results to the inferior stdout when the log is verbose. This matches the lldb side of the same process, which only logs what it found if the log is on verbose. llvm-svn: 299451
* Enable lldm-mi commands -stack-list-locals -stack-list-variables and ↵Ilia K2017-04-045-3/+111
| | | | | | | | | | | | | | | | -var-create to work only with variables in scope Patch by ayuckhulk Reviewers: abidh, lldb-commits, ki.stfu Reviewed By: ki.stfu Tags: #lldb Differential Revision: https://reviews.llvm.org/D31073 llvm-svn: 299417
* Skip three test cases that are asserting on macosx as of r299199. A quickJason Molenda2017-04-043-0/+10
| | | | | | | | | | | | | | | | | | look showed that the target's arch has no core / byte order and so when AuxVector::AuxVector calls into a dataextractor and sets the byte size to 0, it asserts. e.g. m_arch = { m_triple = (Data = "x86_64--linux", Arch = x86_64, SubArch = NoSubArch, Vendor = UnknownVendor, OS = Linux, Environment = UnknownEnvironment, ObjectFormat = ELF) m_core = kCore_invalid m_byte_order = eByteOrderInvalid m_flags = 0x00000000 m_distribution_id = <no value available> } <rdar://problem/31380097> llvm-svn: 299408
* Add CPlusPlusNameParser to the xcodeprojSean Callanan2017-04-031-0/+6
| | | | llvm-svn: 299402
* The LIBLLDB_LOG_TEMPORARY channel got lost at some point whereJason Molenda2017-04-032-0/+2
| | | | | | Logging.cpp was being changed in the past. Re-add it. llvm-svn: 299394
* New C++ function name parsing logicEugene Zemtsov2017-04-036-129/+976
| | | | | | | | | | | | | | | | | | Current implementation of CPlusPlusLanguage::MethodName::Parse() doesn't get anywhere close to covering full extent of possible function declarations. It causes incorrect behavior in avoid-stepping and sometimes messes printing of thread backtrace. This change implements more methodical parsing logic based on clang lexer and simple recursive parser. Examples: void std::vector<Class, std::allocator<Class>>::_M_emplace_back_aux<Class const&>(Class const&) void (*&std::_Any_data::_M_access<void (*)()>())() Differential Revision: https://reviews.llvm.org/D31451 llvm-svn: 299374
* Back out temporary masking of EXC_SYSCALL mach exceptions.Jason Molenda2017-04-031-1/+1
| | | | | | <rdar://problem/31359720> llvm-svn: 299345
* DisassembleRange can return an empty DisassemblerSPJim Ingham2017-03-311-1/+1
| | | | | | | | check for it. <rdar://problem/31379799> llvm-svn: 299276
* add more RegisterContext files to xcode projectTim Hammerquist2017-03-311-0/+16
| | | | llvm-svn: 299261
* Stop calling ValueObject::SetName from synthetic child providersTamas Berghammer2017-03-316-20/+28
| | | | | | | | | | | | | | | Summary: Calling ValueObject::SetName from a sythetic child provider would change the underying value object used for the non-synthetic child as well what is clearly unintentional. Reviewers: jingham, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31371 llvm-svn: 299259
* Add support for sythetic operator dereferenceTamas Berghammer2017-03-315-3/+39
| | | | | | | | | | | | | | | | Summary: After this change a sythetic child provider can generate a special child named "$$dereference$$" what if present is used when "operator*" or "operator->" used on a ValueObject. The goal of the change is to make expressions like "up->foo" work inside the "frame variable" command. Reviewers: labath, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31368 llvm-svn: 299251
* Do not dereference std::unique_ptr by defaultTamas Berghammer2017-03-313-12/+52
| | | | | | | | | | | | | | | Summary: Displaying the object pointed by the unique_ptr can cause an infinite recursion when we have a pointer loop so this change stops that behavior. Additionally it makes the unique_ptr act more like a class containing a pointer (what is the underlying truth) instead of some "magic" class. Reviewers: labath, jingham Differential Revision: https://reviews.llvm.org/D31366 llvm-svn: 299249
* Verify memory address range validity in GDBRemoteCommunicationClientStephane Sezer2017-03-312-7/+51
| | | | | | | | | | | | | | | | | | | | | Summary: This aims to verify the validity of the response from the debugging server in GDBRemoteCommunicationClient::GetMemoryRegionInfo. I was working with ds2 (https://github.com/facebook/ds2) and encountered a bug that caused the server's response to have a 'size' value of 0, which caused lldb to behave incorrectly. Reviewers: k8stone, labath, clayborg Reviewed By: labath, clayborg Subscribers: clayborg, sas, lldb-commits Differential Revision: https://reviews.llvm.org/D31485 Change by Alex Langford <apl@fb.com> llvm-svn: 299239
* [LLDB][MIPS] Core Dump Support.Nitesh Jain2017-03-3115-245/+443
| | | | | | | | | | Reviewers: labath, emaste Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D30457 llvm-svn: 299200
* [LLDB][MIPS] Fix Core file Architecture and OS information.Nitesh Jain2017-03-319-6/+63
| | | | | | | | | | Reviewers: labath, clayborg Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D31280 llvm-svn: 299199
* [LLDB][MIPS] Check if memory_info.GetName() is empty before finding ↵Nitesh Jain2017-03-311-1/+2
| | | | | | | | | | | | corresponding module. Reviewers: labath, clayborg Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D30454 llvm-svn: 299196
* Don't add a newline if the object description already has one.Jim Ingham2017-03-311-1/+6
| | | | | | <rdar://problem/25755431> llvm-svn: 299147
* add NetBSD files to Xcode project to resolve failure from r299109Tim Hammerquist2017-03-301-0/+6
| | | | llvm-svn: 299116
* Battery of NetBSD support improvementsKamil Rytarowski2017-03-3012-55/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Include initial support for: - single step mode (PT_STEP) - single step trap handling (TRAP_TRACE) - exec() trap (TRAP_EXEC) - add placeholder interfaces for FPR - initial code for NetBSD core(5) files - minor tweaks While there improve style of altered elf-core/ files. This code raises the number of passing tests on NetBSD to around 50% (600+/1200+). The introduced code is subject to improve afterwards for additional features and bug fixes. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, emaste, kettenis Reviewed By: labath Subscribers: srhines, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31450 llvm-svn: 299109
* Revert r298776 - Expression: add missing linkage to RuntimeDyld ...Michal Gorny2017-03-301-1/+0
| | | | | | This needs to be addressed within LLVM itself. llvm-svn: 299095
* Mask out EXC_SYSCALL exceptions as well.Jason Molenda2017-03-301-1/+1
| | | | | | <rdar://problem/31335814> llvm-svn: 299040
* Centralize libc++ test skipping logicPavel Labath2017-03-2918-79/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to replace the different decorators we've had on each libc++ test with a single solution. Each libc++ will be assigned to the "libc++" category and a single central piece of code will decide whether we are actually able to run libc++ test in the given configuration by enabling or disabling the category (while giving the user the opportunity to override this). I started this effort because I wanted to get libc++ tests running on android, and none of the existing decorators worked for this use case: - skipIfGcc - incorrect, we can build libc++ executables on android with gcc (in fact, after this, we can now do it on linux as well) - lldbutil.skip_if_library_missing - this checks whether libc++.so is loaded in the proces, which fails in case of a statically linked libc++ (this makes copying executables to the remote target easier to manage). To make this work I needed to split out the pseudo_barrier code from the force-included file, as libc++'s atomic does not play well with gcc on linux, and this made every test fail, even though we need the code only in the threading tests. So far, I am only annotating one of the tests with this category. If this does not break anything, I'll proceed to update the rest. Reviewers: jingham, zturner, EricWF Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30984 llvm-svn: 299028
* Add NetBSD path for Debugging Information in Separate FilesKamil Rytarowski2017-03-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD stores debug information files in the `/usr/libdata/debug` path. This change fixes debugging distribution executables, e.g. `look`(1): ``` $ lldb /usr/bin/look (lldb) target create "/usr/bin/look" Current executable set to '/usr/bin/look' (x86_64). (lldb) b main Breakpoint 1: where = look`main + 22 at look.c:107, address = 0x0000000000000da6 (lldb) r Process 23473 launched: '/usr/bin/look' (x86_64) Process 23473 stopped * thread #1, stop reason = breakpoint 1.1 frame #0: 0x0000000186600da6 look`main(argc=1, argv=0x00007f7fffc7c488) at look.c:107 104 105 string = NULL; 106 file = _PATH_WORDS; -> 107 termchar = '\0'; 108 while ((ch = getopt(argc, argv, "dft:")) != -1) 109 switch(ch) { 110 case 'd': (lldb) ``` There is no `/usr/lib/debug` path on NeBSD, so remove it from search. Sponsored by <The NetBSD Foundation> Reviewers: jingham, emaste, kettenis, labath, joerg Reviewed By: labath Subscribers: aprantl, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31461 llvm-svn: 299023
* Move the definition of SBListener::GetSP() to SBListener.cpp.Sean Callanan2017-03-292-1/+3
| | | | | | | This is the requirement for all functions in the public API, to eliminate weak symbol definitions. llvm-svn: 299020
* Remove dead include <sys/user.h> from the NetBSD code.Kamil Rytarowski2017-03-291-3/+1
| | | | llvm-svn: 298970
* Print the error if dsymForUUID sometimes produces bad plists.Jim Ingham2017-03-281-1/+5
| | | | | | | Not much we can do about it but at least we can print the bad plist and the error. llvm-svn: 298958
* Add support for tracing hello-world application on NetBSDKamil Rytarowski2017-03-289-5/+1803
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a stripped down from features a NetBSD process code (patch is kept under 2k LOC). This code has assumption that there is only one thread within a debugged process. The only debugger trap supported is software breakpoint (TRAP_BRKPT). The generic platform code requires to add dummy function for watchpoints etc. These functions are currently empty. This code is not the final platform support as is and it's treated as a base to extend, refactor and address issues afterwards. Supported features: - handle software breakpoints, - correctly attach to a tracee, - support NetBSD specific ptrace(2), - monitor process termination, - monitor SIGTRAP events, - monitor SIGSTOP events, - monitor other signals events, - resume the whole process, - get memory region info perms, - read memory from tracee, - write memory to tracee, - read ELF AUXV, - x86_64 GPR read and write code For the generic framework include: - halt, - detach, - signal, - kill, - allocatememory, - deallocatememory, - update threads, - getarchitecture, - getfileloadaddress, - and others. This code has preliminary AddThread code. Out of interest in this patch: - exec() traps, - hardware debug register traps, - single step trap, - thread creation/termination trap, - process fork(2), vfork(2) and vfork(2) done traps, - syscall entry and exit trap, - threads, - FPR registers, - retrieving tracee's thread name, - non x86_64 support. This code can be used to start a hello world application and trace it. This code can be used by other BSD systems as a starting point to get similar capabilities. Sponsored by <The NetBSD Foundation> Reviewers: emaste, joerg, kettenis, labath Subscribers: mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31374 llvm-svn: 298953
* In FileSpec::Equal, short-cut GetNormalizedPath.Jim Ingham2017-03-272-1/+28
| | | | | | | | | | | | GetNormalizedPath seems to be slow, so it's worth shortcutting it if possible. This change does so when the filenames and not equal and we can tell GetNormalizedPath would not make them equal. Also added a test for "." final component since that was missing. llvm-svn: 298876
* Fix the Xcode project for OpenBSD additions.Jim Ingham2017-03-271-0/+26
| | | | llvm-svn: 298874
* [LLDB] OpenBSD supportKamil Rytarowski2017-03-2625-9/+990
| | | | | | | | | | | | | | | | | | | | Summary: Add basic OpenBSD support. This is enough to be able to analyze core dumps for OpenBSD/amd64, OpenBSD/arm, OpenBSD/arm64 and OpenBSD/i386. Note that part of the changes to source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp fix a bug that probably affects other platforms as well. The GetProgramHeaderByIndex() interface use 1-based indices, but in some case when looping over the headers the, the loop starts at 0 and misses the last header. This caused problems on OpenBSD since OpenBSD core dumps have the PT_NOTE segment as the last program header. Reviewers: joerg, labath, krytarowski Reviewed By: krytarowski Subscribers: aemerson, emaste, rengolin, srhines, krytarowski, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D31131 llvm-svn: 298810
OpenPOWER on IntegriCloud