summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/BreakpointList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change Target::FindBreakpointsByName to return Expected<vector>Joseph Tremoulet2019-12-041-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Using a BreakpointList corrupts the breakpoints' IDs because BreakpointList::Add sets the ID, so use a vector instead, and update the signature to return the vector wrapped in an llvm::Expected which can propagate any error from the inner call to StringIsBreakpointName. Note that, despite the similar name, SBTarget::FindBreakpointsByName doesn't suffer the same problem, because it uses a SBBreakpointList, which is more like a BreakpointIDList than a BreakpointList under the covers. Add a check to TestBreakpointNames that, without this fix, notices the ID getting mutated and fails. Reviewers: jingham, JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70907
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [BreakpointList] Simplify/modernize BreakpointList (NFC)Jonas Devlieghere2019-01-081-113/+56
| | | | | | | | | | | | | | | I was looking at the code in BreakpointList.cpp and found it deserved a quick cleanup. - Use std::vector instead of a std::list. - Extract duplicate code for notifying. - Remove code duplication when returning a const value. - Use range-based for loop. - Use early return in loops. Differential revision: https://reviews.llvm.org/D56425 llvm-svn: 350659
* Remove header grouping comments.Jonas Devlieghere2018-11-111-4/+0
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* Make sure deleting all breakpoints clears their sites firstEugene Zemtsov2018-04-161-5/+7
| | | | | | | | Bug: https://bugs.llvm.org/show_bug.cgi?id=36430 Differential Revision: https://reviews.llvm.org/D45554 llvm-svn: 330163
* Make breakpoint names real entities.Jim Ingham2017-09-141-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introduced, breakpoint names were just tags that you could apply to breakpoints that would allow you to refer to a breakpoint when you couldn't capture the ID, or to refer to a collection of breakpoints. This change makes the names independent holders of breakpoint options that you can then apply to breakpoints when you add the name to the breakpoint. It adds the "breakpoint name configure" command to set up or reconfigure breakpoint names. There is also full support for then in the SB API, including a new SBBreakpointName class. The connection between the name and the breakpoints sharing the name remains live, so if you reconfigure the name, all the breakpoint options all change as well. This allows a quick way to share complex breakpoint behavior among a bunch of breakpoints, and a convenient way to iterate on the set. You can also create a name from a breakpoint, allowing a quick way to copy options from one breakpoint to another. I also added the ability to make hidden and delete/disable protected names. When applied to a breakpoint, you will only be able to list, delete or disable that breakpoint if you refer to it explicitly by ID. This feature will allow GUI's that need to use breakpoints for their own purposes to keep their breakpoints from getting accidentally disabled or deleted. <rdar://problem/22094452> llvm-svn: 313292
* Rename Error -> Status.Zachary Turner2017-05-121-1/+1
| | | | | | | | | | | | | | | This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
* Adds tests for breakpoint names, and a FindBreakpointsByName.Jim Ingham2016-09-211-0/+17
| | | | | | | | Also if you set a breakpoint with an invalid name, we'll refuse to set the breakpoint rather than silently ignoring the name. llvm-svn: 282043
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-191/+152
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-20/+17
| | | | llvm-svn: 270024
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-041-1/+1
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* Fixed the the breakpoint test case failures. Greg Clayton2013-11-091-19/+19
| | | | | | There were 6 on darwin. All of these were related to the recent changes for exec. llvm-svn: 194298
* <rdar://problem/15367122>Greg Clayton2013-11-051-2/+2
| | | | | | | | Fixed the test case for "test/functionalities/exec/TestExec.py" on Darwin. The issue was breakpoints were persisting and causing problems. When we exec, we need to clear out the process and target and start fresh with nothing and let the breakpoints populate themselves again. This patch correctly clears out the breakpoints and also flushes the process so that the objects (process/thread/frame) give out valid information. llvm-svn: 194106
* <rdar://problem/13069948>Greg Clayton2013-01-251-4/+4
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* Adding events when watchpoints are set or changed.Jim Ingham2012-12-181-1/+6
| | | | | | <rdar://problem/11597849> llvm-svn: 170400
* If we notice that a module with a given file path is replaced by another ↵Jim Ingham2012-05-171-0/+11
| | | | | | | | | | | with the same file path on rerunning, evict the old module from the target module list, inform the breakpoints about this so they can do something intelligent as well. rdar://problem/11273043 llvm-svn: 157008
* Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes. Jim Ingham2012-05-041-1/+1
| | | | | | | | | | | | | No one was using it and Locker(pthread_mutex_t *) immediately asserts for pthread_mutex_t's that don't come from a Mutex anyway. Rather than try to make that work, we should maintain the Mutex abstraction and not pass around the platform implementation... Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor taking a pthread_mutex_t *. You no longer need to call Mutex::GetMutex to pass your mutex to a Locker (you can't in fact, since I made it private.) llvm-svn: 156221
* No functionality changes, mostly cleanup.Greg Clayton2012-04-111-1/+1
| | | | | | | | Cleaned up the Mutex::Locker and the ReadWriteLock classes a bit. Also cleaned up the GDBRemoteCommunication class to not have so many packet functions. Used the "NoLock" versions of send/receive packet functions when possible for a bit of performance. llvm-svn: 154458
* Update declarations for all functions/methods that accept printf-styleJason Molenda2011-09-201-1/+1
| | | | | | | | stdarg formats to use __attribute__ format so the compiler can flag incorrect uses. Fix all incorrect uses. Most of these are innocuous, a few were resulting in crashes. llvm-svn: 140185
* Added needed breakpoint functionality to the public API that includes:Greg Clayton2010-07-231-8/+31
| | | | | | | | | | SBTarget: - get breakpoint count - get breakpoint at index SBBreakpoint: - Extract data from breakpoint events llvm-svn: 109289
* Add a "thread specification" class that specifies thread specific ↵Jim Ingham2010-06-161-0/+6
| | | | | | | | | | | | breakpoints by name, index, queue or TID. Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created. Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a breakpoint hit event for that thread. Added a "breakpoint configure" command to allow you to reset any of the thread specific options (or the ignore count.) llvm-svn: 106078
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+198
llvm-svn: 105619
OpenPOWER on IntegriCloud