summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix build for mingw.Hafiz Abid Qadeer2016-12-151-1/+1
| | | | | | | | | | | | Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there. Reviewers: zturner, labath, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27759 llvm-svn: 289821
* [LLDB][MIPS] Fix TestWatchpointIter failureNitesh Jain2016-12-091-2/+9
| | | | | | | | | | Reviewers: jingham Subscribers: jaydeep, bhushan, slthakur, lldb-commits Differential Revision: https://reviews.llvm.org/D27124 llvm-svn: 289211
* Fixed a crasher that has been borking out heap for a long time. Greg Clayton2016-12-081-1/+2
| | | | | | | | | | ThreadList had an assignment operator that didn't lock the "rhs" thread list object. This means a thread list can be mutated while it is being copied. The copy constructor calls the assignment operator as well. So this fixes the unsafe threaded access to ThreadList which we believe is responsible for a lot of crashes. <rdar://problem/28075793> llvm-svn: 289100
* When we interrupt a process, it was possible or the thread namesJason Molenda2016-12-081-5/+7
| | | | | | | | | | | | | | | | | | to not be set by Process::WillPublicStop() so the driver won't get access to them. The fix is straightforward, moving the call to WillPublicStop above the early return for the interrupt case. (the interrupt case does an early return because the rest of the function is concerned with running stop hooks etc and those are not applicable when we've interrupted the process). Also added a test case for it. The test case is a little complicated because I needed to drive lldb asynchronously to give the program a chance to get up and running before I interrupt it. Running to a breakpoint was not sufficient to catch this bug. <rdar://problem/22693778> llvm-svn: 289026
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-062-24/+14
| | | | llvm-svn: 288797
* Use Timeout<> in Process::RunThreadPlanPavel Labath2016-12-011-94/+72
| | | | | | | | | | | | | | | | Summary: Since the function is way too big already, I tried at least to factor out the timeout computation stuff into a separate function. I've tried to make the new code semantically equivalent, and it also makes sense when I look at it as a done deal. Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27258 llvm-svn: 288326
* Convert most of the Process class to Timeout<>Pavel Labath2016-11-302-76/+54
| | | | | | | | | | | This changes most of the class to use the new Timeout class. The one function left is RunThreadPlan, which I left for a separate change as the function is massive. A couple of things to call out: - I've renamed the affected functions to match the listener interface names. This should also help catch any places I did not convert at compile time. - I've deleted the WaitForState function as it was unused. llvm-svn: 288241
* Use Timeout<> in the Listener classPavel Labath2016-11-301-16/+30
| | | | | | | | | | | | | | | | | | | | Summary: Communication classes use the Timeout<> class to specify the timeout. Listener class was converted to chrono some time ago, but it used a different meaning for a timeout of zero (Listener: infinite wait, Communication: no wait). Instead, Listener provided separate functions which performed a non-blocking event read. This converts the Listener class to the new Timeout class, to improve consistency. It also allows us to get merge the different GetNextEvent*** and WaitForEvent*** functions into one. No functional change intended. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27136 llvm-svn: 288238
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-263-3/+3
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* Fix a bug caught by adding LLVM_NODISCARD to StringRef.Zachary Turner2016-11-211-1/+1
| | | | llvm-svn: 287598
* Fix some accidental Prints of StringRefs that snuck in.Zachary Turner2016-11-191-1/+2
| | | | llvm-svn: 287412
* Change CreateTarget and dependents to accept StringRef.Zachary Turner2016-11-182-21/+23
| | | | llvm-svn: 287376
* Fix step-over when SymbolContext.function is missing and symbol is present.Sam McCall2016-11-171-14/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: Fix step-over when SymbolContext.function is missing and symbol is present. With targets from our build configuration, ThreadPlanStepOverRange::IsEquivalentContext fails to fire for relevant frames, leading to ShouldStop() returning true prematurely. The frame's SymbolContext, and m_addr_context have: - comp_unit set and matching - function = nullptr - symbol set and matching (but this is never checked) My naive guess is that the context should be equivalent in this case :-) Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26804 llvm-svn: 287274
* Make GetRegisterByName() take a StringRef.Zachary Turner2016-11-171-13/+12
| | | | | | | This one is fairly trivial and only really involves changing function signatures and a few simple call-sites. llvm-svn: 287266
* Convert Platform, Process, and Connection functions to StringRef.Zachary Turner2016-11-173-8/+8
| | | | | | All tests pass on Linux and Windows. llvm-svn: 287259
* Rewrite all Property related functions in terms of StringRef.Zachary Turner2016-11-172-11/+8
| | | | | | | | | | | | | | | This was a bit tricky, especially for things like OptionValueArray and OptionValueDictionary since they do some funky string parsing. Rather than try to re-write line-by-line I tried to make the StringRef usage idiomatic, even though it meant often re-writing from scratch large blocks of code in a different way while keeping true to the original intent. The finished code is a big improvement though, and often much shorter than the original code. All tests and unit tests pass on Windows and Linux. llvm-svn: 287242
* Fix warnings and errors introduced with UUID changes.Zachary Turner2016-11-171-6/+8
| | | | llvm-svn: 287208
* Make GetValueForVariableExpression use StringRef.Zachary Turner2016-11-171-546/+523
| | | | | | | | | Also significantly reduced the indentation level by use of early returns, and simplified some of the logic by using StringRef functions such as consumeInteger() and getAsInteger() instead of strtoll, etc. llvm-svn: 287189
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-169-48/+45
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Fix uninitialized members.Sam McCall2016-11-151-3/+2
| | | | | | | | | | | | Summary: Fix uninitialized members. Reviewers: jingham Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D26528 llvm-svn: 286947
* Make DiagnosticsManager functions take StringRefs.Zachary Turner2016-11-121-16/+15
| | | | llvm-svn: 286730
* Make ValueObjectMemory::Create accept StringRefs.Zachary Turner2016-11-121-1/+1
| | | | llvm-svn: 286726
* Make Options::SetOptionValue take a StringRef.Zachary Turner2016-11-122-15/+9
| | | | llvm-svn: 286723
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-113-6/+6
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Make the Error class constructor protectedMehdi Amini2016-11-113-6/+6
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* Remove TimeValue usage from lldb/TargetPavel Labath2016-11-091-3/+0
| | | | | | It was only used for declaring unused variables. :) llvm-svn: 286374
* Remove TimeValue usage from lldb/Core. NFC.Pavel Labath2016-11-091-0/+1
| | | | llvm-svn: 286366
* Clean up the stop printing header lines.Jim Ingham2016-11-082-9/+20
| | | | | | | | | | | | | | | | I added a "thread-stop-format" to distinguish between the form that is just the thread info (since the stop printing immediately prints the frame info) and one with more frame 0 info - which is useful for "thread list" and the like. I also added a frame.no-debug boolean to the format entities so you can print frame information differently between frames with source info and those without. This closes https://reviews.llvm.org/D26383. <rdar://problem/28273697> llvm-svn: 286288
* Convert some Expression parser functions to StringRef.Zachary Turner2016-11-082-16/+15
| | | | llvm-svn: 286208
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-023-4/+4
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Implement a general type scavenger that can dig types from debug info + a ↵Enrico Granata2016-11-011-0/+33
| | | | | | | | | | filtering mechanism to accept/reject results thusly obtained Implement the C++ type lookup support in terms of this general scavenger The idea is that we may want other languages to do debug info based search (exclusively, or as an add-on to runtime/module based searching) and it makes sense to avoid duplicating this functionality llvm-svn: 285727
* Fix a race condition between the "ephemeral watchpoint disabling" and ↵Jim Ingham2016-10-251-26/+60
| | | | | | | | commands the continue the process. This closes https://reviews.llvm.org/D25875. llvm-svn: 285114
* Revert "Fix a race condition between "ephemeral watchpoint disable/enable" ↵Pavel Labath2016-10-211-52/+21
| | | | | | | | | | | | | | | | | and continue in commands." This reverts commit r284795, as it breaks watchpoint handling on arm (and presumable all architectures that report watchpoint hits without executing the tripping instruction). There seems to be something fundamentally wrong with this patch: it uses process_sp->AddPreResumeAction to re-enable the watchpoint, but the whole point of the step-over-watchpoint logic (which AFAIK is the only user of this class) is to disable the watchpoint *after* we resume to do the single step. I have no idea how to fix this except by reverting the offending patch. llvm-svn: 284817
* Fix a race condition between "ephemeral watchpoint disable/enable" and ↵Jim Ingham2016-10-211-21/+52
| | | | | | | | | | continue in commands. Also, watchpoint commands, like breakpoint commands, need to run in async mode. This was causing intermittent failures in TestWatchpointCommandPython.py, which is now solid. llvm-svn: 284795
* Add an API to remove an action from the Process PreResumeActions.Jim Ingham2016-10-201-0/+10
| | | | llvm-svn: 284792
* Simplify GetGlobalProperties functions of Thread/Process/TargetPavel Labath2016-10-193-15/+6
| | | | | | | | | | | | | | | | | Summary: "Initialization of function-local statics is guaranteed to occur only once even when called from multiple threads, and may be more efficient than the equivalent code using std::call_once." <http://en.cppreference.com/w/cpp/thread/call_once> I'd add that it's also more readable. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17710 llvm-svn: 284601
* Convert CommandObject constructors to StringRef.Zachary Turner2016-10-051-6/+4
| | | | llvm-svn: 283384
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-052-3/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Change Platform::GetRemoteSharedModule so if it's given a ModuleSpecJason Molenda2016-10-051-0/+19
| | | | | | | | | | | | | which specifies a file path and UUID but not an architecture, open the file at that path and try every one of the architectures in the file to see if there is a UUID match. Currently we'll pick the first slice of a multi-architecture file and return that as the match, and when the UUID doesn't match because it's the wrong architecture, we'll end up ignoring the file. <rdar://problem/28487804> llvm-svn: 283295
* Introduced a null check to avoid a crash in a test on i386.Sean Callanan2016-09-291-0/+4
| | | | llvm-svn: 282653
* Added a setting that enables saving all .o files from a given JIT expression.Sean Callanan2016-09-261-0/+9
| | | | | | | | This allows debugging of the JIT and other analyses of the internals of the expression parser. I've also added a testcase that verifies that the setting works correctly when off and on. llvm-svn: 282434
* Change FileAction::GetPath() to return a StringRef.Zachary Turner2016-09-232-22/+13
| | | | llvm-svn: 282306
* Change Module::RemapPath to use StringRef.Zachary Turner2016-09-231-9/+10
| | | | llvm-svn: 282277
* Update the prompt related functions to use StringRefs.Zachary Turner2016-09-231-4/+8
| | | | llvm-svn: 282269
* Update OptionGroup::SetValue to take StringRef.Zachary Turner2016-09-232-7/+3
| | | | | | | | Then deal with all the fallout. Differential Revision: https://reviews.llvm.org/D24847 llvm-svn: 282265
* Add the ability to append breakpoints to the save file.Jim Ingham2016-09-221-5/+27
| | | | llvm-svn: 282212
* Add the ability to deserialize only breakpoints matching a given name.Jim Ingham2016-09-221-0/+13
| | | | | | Also tests for this and the ThreadSpec serialization. llvm-svn: 282207
* Serilize the thread options within the breakpoint options.Jim Ingham2016-09-221-0/+51
| | | | llvm-svn: 282205
* Try to fix build errors on Android.Zachary Turner2016-09-222-4/+4
| | | | | | | It doesn't like the implicit conversion from T[] to ArrayRef<T> so I'm using `llvm::makeArrayRef()`. Hopefully I got everything. llvm-svn: 282195
* Convert option tables to ArrayRefs.Zachary Turner2016-09-222-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup:: GetDefinitions()` to return an `ArrayRef<OptionDefinition>` instead of a `const OptionDefinition *`. In the case of the former, it deletes the sentinel entry from every table, and in the case of the latter, it removes the `GetNumDefinitions()` method from the interface. These are no longer necessary as `ArrayRef` carries its own length. In the former case, iteration was done by using a sentinel entry, so there was no knowledge of length. Because of this the individual option tables were allowed to be defined below the corresponding class (after all, only a pointer was needed). Now, however, the length must be known at compile time to construct the `ArrayRef`, and as a result it is necessary to move every option table before its corresponding class. This results in this CL looking very big, but in terms of substance there is not much here. Differential revision: https://reviews.llvm.org/D24834 llvm-svn: 282188
OpenPOWER on IntegriCloud