summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Fix a problem where LLDB was constructing a TypeImpl marking the dynamic ↵Enrico Granata2014-10-062-2/+2
| | | | | | type as the static type. Instead use the TypeImpl() constructor correctly llvm-svn: 219142
* Revert r219102 as it caused significant buildbot breakageEd Maste2014-10-061-4/+0
| | | | llvm-svn: 219120
* Call SBDebugger::Initialize/Terminate from within Create/Destroy.Matthew Gardiner2014-10-061-0/+4
| | | | | | | The above change permits developers using the lldb C++ API to code applications in a more logical manner. llvm-svn: 219102
* Stop enabling the std::vector<bool> data formatter for libstdc++, and for ↵Enrico Granata2014-10-031-7/+0
| | | | | | that matter, also skip running the test on Darwin. libstdc++ is more relevant on non-Apple platforms llvm-svn: 218952
* Issuing a "type category disable *" command followed by a "type category ↵Enrico Granata2014-10-034-26/+41
| | | | | | | | | | enable *" command does not honor the order in which categories were previously enabled While we didn't really promise it would, it seems like it should This checkin enables just that, and fixes rdar://18527468 llvm-svn: 218949
* thread state coordinator: add tests and impl to error on creation/death issues.Todd Fiala2014-10-022-7/+29
| | | | | | | | Added tests and impl to make sure the following errors are reported: * Notifying a created thread that we are already tracking. * Notifying a thread death for a thread we don't know about. llvm-svn: 218900
* thread state coordinator: added simpler deferred stop notification method.Todd Fiala2014-10-022-33/+114
| | | | | | | | | | | | | | | Now that ThreadStateCoordinator errors out on threads in unexpected states, it has enough information to know which threads need stop requests fired when we want to do a deferred callback on a thread's behalf. This change adds a new method, CallAfterRunningThreadsStop(...), which no longer takes a set of thread ids that require stop requests. It's much harder to misuse this method and (with newer error logic) it's harder to correctly use the original method. Expect the original method that takes the set of thread ids to stop to disappear in the near future. Adds several tests for CallAfterRunningThreadsStop(). llvm-svn: 218897
* thread state coordinator: requesting resume now signals error appropriately.Todd Fiala2014-10-021-5/+12
| | | | | | | | | | Added tests to verify that the coordinator signals an error if the given thread to resume is unknown, and if the thread is through to be running already. Modified resume handling code to match tests. llvm-svn: 218872
* Add a mutex lock to StackFrame to protect race conditions forJason Molenda2014-10-021-3/+20
| | | | | | | | | updating its ivars. We've had a lot of crash reports and careful analysis shows that we've got multiple threads operating on the same StackFrame objects, changing their m_sc and m_flags ivars. <rdar://problem/18406111> llvm-svn: 218845
* Remove unused variable.Eric Christopher2014-10-021-1/+1
| | | | llvm-svn: 218844
* Add SBExecutionContext.cpp to this file as well, as the commentJim Ingham2014-10-011-0/+1
| | | | | | in source/API/CMakeLists.txt instructs... llvm-svn: 218837
* Allow Python commands to optionally take an SBExecutionContext argument in ↵Enrico Granata2014-10-014-4/+14
| | | | | | case they need to handle 'where they want to act' separately from the notion of 'currently-selected entity' that is associated to the debugger. Do this in an (hopefully) non-breaking way by running an argcount check before passing in the new argument. Update the test case to also check for this new feature. www update to follow llvm-svn: 218834
* thread state coordinator: added error callbacks, cleaned up tests.Todd Fiala2014-10-012-66/+156
| | | | | | | | | | | | | | | | | | | | | | | | | ThreadStateCoordinator changes: * Most commands that run in the queue now take an error handler that will be called with an error string if an error occurs during processing. Errors generally stop the operation in progress. The errors are checked at time of execution. This is intended to help flush out ptrace/waitpid/state management issues as quickly as possible. * Threads now must be known to the coordinator before stops can be reported, resumes can be requested, thread deaths can be reported, or deferred stop notifications can be made. Failure to know the thread will cause the coordinator to call the error callback for the event being processed. Threads are introduced to the system by the NotifyThreadCreate method. * The NotifyThreadCreate method now takes the initial state of the thread being introduces to the system. We no longer just assume the thread is running. The test cases were cleaned up, too: * A gtest test fixture is now used, which allows creating less verbose helper methods that setup common pieces of callback code for some method invocations. Net result: the tests are simpler to read and shorter to write. llvm-svn: 218833
* [cmake] Include the new file in the CMake lists. Without this everyChandler Carruth2014-10-011-0/+1
| | | | | | | | | | CMake build of any part of LLVM with LLDB checked out fails immediately. =[ We appear to not even have a build bot covering the CMake build of LLDB which makes this truly terrible. That needs to be fixed immediately. llvm-svn: 218831
* Add a new SBExecutionContext class that wraps an ExecutionContextRef. This ↵Enrico Granata2014-10-011-0/+118
| | | | | | class is a convenient way at the API level to package a target,process,thread and frame all together - or just a subset of those llvm-svn: 218808
* thread state coordinator: replaced shortened type name Func suffix with ↵Todd Fiala2014-10-012-30/+30
| | | | | | | | | | | | Function. ThreadIDFunc => ThreadIDFunction LogFunc => LogIDFunction We try to avoid abbreviations/shortened names. Adjusted function parameter names as well to replace _func with _function. llvm-svn: 218773
* Minor tweak to Ed's FreeBSD fix.Todd Fiala2014-10-011-1/+1
| | | | | | | Fall back to including the Linux version if not on __FreeBSD__. Also covers __ANDROID__ case. llvm-svn: 218770
* Add a bandaid to fix the FreeBSD buildEd Maste2014-10-011-0/+4
| | | | | | | | | | | | r218568 added an explicit #include of the Linux ProcessMonitor.h to POSIXThread.cpp, rather than including just "ProcessMonitor.h" and relying on the build infrastructure for the appropriate paths. For now add #ifdefs in the source to use the FreeBSD or Linux header as appropriate; a cleaner fix (and perhaps some refactoring of the POSIX classes) should still be done later. llvm-svn: 218762
* Not all processes have a Dynamic Loader. Be sure to check that it exists ↵Jim Ingham2014-09-301-1/+4
| | | | | | | | before using it. <rdar://problem/18491391> llvm-svn: 218699
* Add SBThreadPlan to this CMakeLists.txt as well.Jim Ingham2014-09-301-0/+1
| | | | llvm-svn: 218687
* Fix FreeBSD build.Zachary Turner2014-09-301-6/+6
| | | | llvm-svn: 218685
* Fixup some minor issues with HostProcess.Zachary Turner2014-09-303-0/+12
| | | | llvm-svn: 218684
* thread state coordinator: add test to be explicit about resume behavior in ↵Todd Fiala2014-09-302-9/+59
| | | | | | | | | | | | | | | | | | | | presence of deferred stop notification still pending. There is a state transition that seems potentially buggy that I am capturing and logging here, and including an explicit test to demonstrate expected behavior. See new test for detailed description. Added logging around this area since, if we hit it, we may have a usage bug, or a new state transition we really need to investigate. This is around this scenario: Thread C deferred stop notification awaiting thread A and thread B to stop. Thread A stops. Thread A requests resume. Thread B stops. Here we will explicitly signal the deferred stop notification after thread B stops even though thread A is now resumed. Copious logging happens here. llvm-svn: 218683
* Fix cmake build for new thread plan files.Todd Fiala2014-09-302-0/+2
| | | | llvm-svn: 218679
* This checkin is the first step in making the lldb thread stepping mechanism ↵Jim Ingham2014-09-2917-307/+1294
| | | | | | | | | | | | more accessible from the user level. It adds the ability to invent new stepping modes implemented by python classes, and to view the current thread plan stack and to some extent alter it. I haven't gotten to documentation or tests yet. But this should not cause any behavior changes if you don't use it, so its safe to check it in now and work on it incrementally. llvm-svn: 218642
* dwarf: add dwarf v4 maximum_operations_per_instruction to DWARFDebugLine.Todd Fiala2014-09-292-2/+10
| | | | | | | | See http://reviews.llvm.org/D5533 for details. Change by Tong Shen. llvm-svn: 218641
* thread state coordinator: added a thread resume request and related tests.Todd Fiala2014-09-292-1/+50
| | | | | | | | | The thread resume block is executed in the normal flow of thread state queued event processing. The tests verify that it is executed when we track the thread to be stopped and skipped when we track it to already be running. llvm-svn: 218638
* thread state coordinator: add exec reset support, remove empty virtual ↵Todd Fiala2014-09-292-22/+66
| | | | | | | | | | | destructors. Also added a test for the reset handling. The reset/state clearing happens as a processed queue event. The only diff vs. standard processing is that the exec clears the queue before queueing the activity to clear internal state. i.e. once we get an exec, we really stop doing any other queue-based activity. llvm-svn: 218629
* Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sectionsMatthew Gardiner2014-09-297-40/+102
| | | | | | | | | | | works, as do breakpoints, run and pause, display zeroth frame. See http://reviews.llvm.org/D5503 for a fuller description of the changes in this commit. llvm-svn: 218596
* Included cstdarg for compilation of va_start and va_end.Matthew Gardiner2014-09-291-0/+1
| | | | llvm-svn: 218594
* thread state coordinator: added new thread support.Todd Fiala2014-09-282-0/+64
| | | | | | | | | | A new thread arriving while a pending signal notification is outstanding will (1) add the new thread to the list of stops expected before the deferred signal notification is fired, (2) send a stop request for the new thread, and (3) track the new thread as currently running. llvm-svn: 218578
* Enable llgs to build against experimental Android AOSP ↵Todd Fiala2014-09-2726-45/+147
| | | | | | | | | | | | lldb/llvm/clang/compiler-rt repos. See http://reviews.llvm.org/D5495 for more details. These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}. llvm-svn: 218568
* thread state coordinator: added thread death support and more tests.Todd Fiala2014-09-272-10/+81
| | | | | | | | | | Tested two pending stops before notification, where one of the pending stop requirements was already known to be stopped. Tested pending thread stop before notification, then reporting thread with pending stop died and verifies pending notification is made. llvm-svn: 218559
* thread state coordinator: added test for notify after two pending thread stops.Todd Fiala2014-09-271-1/+1
| | | | | | | Glad I did - caught a bug where the auto variable was not a reference to a set and instead was a copy. I need to review rules on that! llvm-svn: 218558
* thread state coordinator: handle when prerequisite pending stop is already ↵Todd Fiala2014-09-261-5/+20
| | | | | | | | stopped. Change includes new gtest and functionality. llvm-svn: 218555
* gtest: tweaked test runner to fix an extra comma, added more tdd-based ↵Todd Fiala2014-09-262-16/+302
| | | | | | | | | thread coordinator behavior. Starting to flesh out the thread state coordinator class that will be used by Linux/llgs. llvm-svn: 218537
* Fixup gtest layout, add Linux ThreadStateCoordinator.cpp.Todd Fiala2014-09-253-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: * Remove test/c++/... * Add gtest. * Add gtest/unittest directory for unittesting individual classes. * Add an initial Plugins/Process?linux/ThreadStateCoordinatorTest.cpp. - currently failing a test (intentional). - added a bare-bones ThreadStateCoordinator.cpp to Plugins/Process/Linux, more soon. Just enough to prove out running gtest on Ubuntu and MacOSX. * Added recursive make machinery so that doing a 'make' in gtest/ is sufficient to kick off the existing test several directories down. - Caveat - I currently short circuit from gtest/unittest/Makefile directly to the one and only gtest/unittest/Plugins/Process/Linux directory. We'll need to add the intervening layers. I haven't done this yet since to fix the Xcode test failure correspondence, I may need to add a python layer which might just handle the directory crawling. * Added an Xcode project to the lldb workspace for gtest. - Runs the recursive make system in gtest/Makefile. - Default target is 'test'. test and clean are supported. - Currently does not support test failure file/line correspondence. Requires a bit of text transformation to hook that up. llvm-svn: 218460
* Moved PlatformDarwin::GetEnvironment() to PlatformPOSIX to fix Linux/llgs issue.Todd Fiala2014-09-244-14/+15
| | | | | | | | | | | | | | | | | See http://reviews.llvm.org/D5486 for more details. I was tracking a problem where llgs on linux would not pick up any environment variables. On OSX there is a virtual function PlatformDarwin::GetEnvironment() which correctly sets up the list of environment variables. On linux llgs it defaults to a base class default implementation which clears the list. I moved the OSX implementation down to PlatformPOSIX. This fixes my problem on linux still works properly on OSX. Change by Shawn Best. Slight tweak to convert 'virtual' to 'override' in PlatformDarwin.h virtual method override by Todd. Tested: Ubuntu 14.04 x86_64, cmake/ninja build + tests. MacOSX 10.9.5 x86_64, Xcode 6.1 Beta build + tests. llvm-svn: 218424
* Change inline-breakpoint-strategy setting to default to ↵Todd Fiala2014-09-241-3/+4
| | | | | | | | | | | | | | | eInlineBreakpointsAlways strategy. See thread started here for motivation: http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-September/005225.html This change enables the ability to set breakpoints in ccache-based and executables that make use of preprocessed source files. This ability existed in lldb before, but was off by default. Change by Doug Snyder. llvm-svn: 218405
* Adjust to LLVM JIT API changeTodd Fiala2014-09-241-111/+2
| | | | | | | | | | | | | | | | | | Those wrapper functions seems not used by lldb... Removed Reference for replacing JITMemoryManager with SectionMemoryManager replacing "llvm::JITMemoryManager::CreateDefaultMemManager()" with "new llvm::SectionMemoryManager()" http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-jitlistener/llvm-jitlistener.cpp?r1=218316&r2=218315&pathrev=218316 Change by Tong Shen. Tested: Ubuntu 14.04 x86_64 MacOSX 10.9.5 with Xcode Version 6.1 (6A1030) (Beta) llvm-svn: 218383
* Fix up the HostThread interface, making the interface simpler.Zachary Turner2014-09-2312-108/+74
| | | | | | | Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5417 llvm-svn: 218325
* Add ASan history threads into process_sp->GetExtendedThreadList, so they ↵Kuba Brecka2014-09-231-37/+35
| | | | | | | | don't get freed too early Reviewed at http://reviews.llvm.org/D5452 llvm-svn: 218323
* ConnectionFileDescriptor::Connect()'s handling of the "fd://" methodJason Molenda2014-09-231-3/+0
| | | | | | | | | was broken in r214984 by the addition of an unconditional error return at the start of the code block handling this method. Remove the errant lines. <rdar://problem/18416691> llvm-svn: 218291
* Have CommandObject::CheckRequirements() report the largest missingJason Molenda2014-09-201-3/+18
| | | | | | | | | | | requirement for a command instead of the smallest. e.g. if a command requires a Target, Process, Thread, and Frame, and none of those are available, report the largest -- Target -- as being missing instead of the smallest -- Frame. Patch by Paul Osmialowski. llvm-svn: 218181
* Fix a thinko in how the RemoteiOS Platform looked up files in the SDK & otherJim Ingham2014-09-191-66/+52
| | | | | | | | | | platform locations. We didn't always do an exhaustive search through all the platform locations, so we would have to read some files out of memory even though they existed in the exploded shared cache or SDK. <rdar://problem/18385947> llvm-svn: 218157
* We had to squirrel away the dyld module before doing ↵Jim Ingham2014-09-191-1/+7
| | | | | | | | | | | | ResolveExecutableModule, since that would clear the module list, and then put it back by hand. But we forgot to also put its sections back in the target SectionList, so we would jettison it as unloaded when we finished handling the first real load event. Add its sections. <rdar://problem/18385947> llvm-svn: 218156
* Make sure to #include <atomic> when using std::atomic.Zachary Turner2014-09-191-0/+1
| | | | llvm-svn: 218148
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-1931-144/+209
| | | | | | | | | | | | | if a "file a.out" auto selected a different platform than the selected one. Changes include: - fix it so you can select the "host" platform using "platform select host" - change all callbacks that create platforms to returns shared pointers - fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host" - Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform - cache platforms that are created and re-use them instead of always creating a new one llvm-svn: 218145
* Adds two new functions to SBTarget FindGlobalVariables and ↵Carlo Kok2014-09-192-0/+104
| | | | | | FindGlobalFunctions that lets you search by name, by regular expression and by starts with. llvm-svn: 218140
* Fix typo in Linux ASLR logging.Todd Fiala2014-09-192-2/+2
| | | | llvm-svn: 218133
OpenPOWER on IntegriCloud