summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/MachException.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Upstream a few small Apple changes to debugserver - arm64_32, CatalystJason Molenda2019-08-071-0/+2
| | | | | | | | | Adrian's changes to support Catalyst processes and my changes to support debugserver running on an arm64_32 device (Apple Watch Series 4, which uses an IPL32 model on arm64 cpus). llvm-svn: 368118
* 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
* Enable listening for EXC_RESOURCE events, and format machJason Molenda2018-11-101-19/+36
| | | | | | | | | | | | | | | | | | | | event as a thread stop reason if we receive one, using some macros to decode the payload. Patch originally written by Fred Riss, with a few small changes by myself. Writing a test for this is a little tricky because the mach exception data interpretation relies on header macros or function calls - it may change over time and writing a gdb_remote_client test for this would break as older encoding interpretation is changed. I'll tak with Fred about this more, but neither of us has been thrilled with the kind of tests we could write for it. <rdar://problem/13097323>, <rdar://problem/40144456> llvm-svn: 346571
* Prevent double release of mach portsFrederic Riss2018-03-291-2/+0
| | | | | | | | | | | | | | | | Summary: When a MIG routine returns KERN_FAILURE, the demux function will release any OOL resources like ports. In this case, task_port and thread_port will be released twice, potentially resulting in use after free of the ports. I don't think we can test this in any useful way rdar://problem/37331387 Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D45011 llvm-svn: 328761
* [MachException] Avoid alignment UB, NFCVedant Kumar2017-12-081-4/+2
| | | | | | | | | | | Fix alignment UB in some Mach exception-handling logic. This lets us build lldb and debugserver with UBSan in trapping mode, and get further along in the testing process before a trap is encountered. rdar://35923991 llvm-svn: 320127
* Remove extant references to g_message_mutex, NFCVedant Kumar2017-12-081-9/+6
| | | | | | Thanks to Jim Ingham for providing the explanation! llvm-svn: 320126
* Rename Error -> Status.Zachary Turner2017-05-121-7/+7
| | | | | | | | | | | | | | | 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
* Back out temporary masking of EXC_SYSCALL mach exceptions.Jason Molenda2017-04-031-1/+1
| | | | | | <rdar://problem/31359720> llvm-svn: 299345
* Mask out EXC_SYSCALL exceptions as well.Jason Molenda2017-03-301-1/+1
| | | | | | <rdar://problem/31335814> llvm-svn: 299040
* Add the ability for the task port to change when a process execs.Greg Clayton2016-09-281-3/+18
| | | | | | <rdar://problem/28476369> llvm-svn: 282632
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-498/+405
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Don't crash when a process' task port goes bad.Greg Clayton2016-05-121-1/+0
| | | | | | <rdar://problem/26256049> llvm-svn: 269373
* More packet performance improvements. Greg Clayton2015-07-171-0/+7
| | | | | | | | Changed the "jthreads" key/value in the stop reply packets to be "jstopinfo". This JSON only contains threads with valid stop reasons and allows us not to have to ask about other threads via qThreadStopInfo when we are stepping. The "jstopinfo" only gets sent if there are more than one thread since the stop reply packet contains all the info needed for a single thread. Added a Process::WillPublicStop() in case process subclasses want to do any extra gathering for public stops. For ProcessGDBRemote, we end up sending a jThreadsInfo packet to gather all expedited registers, expedited memory and MacOSX queue information. We only do this for public stops to minimize the packets we send when we have multiple private stops. Multiple private stops happen when a source level single step, step into or step out run the process multiple times while implementing the stepping, and none of these private stops make it out to the UI via notifications because they are private stops. llvm-svn: 242593
* <rdar://problem/14814689>Greg Clayton2013-11-131-2/+1
| | | | | | Add a log message to the console that will display the error code when we fail to reply to a mach message. llvm-svn: 194623
* Get rid of a warning.Greg Clayton2013-02-161-1/+1
| | | | llvm-svn: 175337
* Don't listen for EXC_RESOURCE exceptions, those should really be handled by ↵Jim Ingham2013-01-241-1/+12
| | | | | | | | the system handler. Also put in string translations for a couple of exceptions we were missing. llvm-svn: 173390
* Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. ↵Greg Clayton2012-09-181-4/+4
| | | | | | Some platforms don't support this modification. llvm-svn: 164148
* Ran the static analyzer on the codebase and found a few things.Greg Clayton2012-07-171-4/+3
| | | | llvm-svn: 160338
* <rdar://problem/11007934> Greg Clayton2012-03-081-7/+12
| | | | | | | | On darwin, if child process of process being debugged dies due to mach exception, the debugged process will die. debugserver now only handles the mach exceptions for the task being debugged. llvm-svn: 152291
* <rdar://problem/10986692>Greg Clayton2012-03-061-7/+10
| | | | | | Safeguard against building on next OS and run on current OS. llvm-svn: 152077
* <rdar://problem/10963899>Greg Clayton2012-03-011-3/+29
| | | | | | | Allow debugserver to be built on a newer kernel and still allow debugging on older kernels. llvm-svn: 151827
* Enabled the "printf" attribute on all debugserver logging functions and fixed Greg Clayton2011-10-281-35/+34
| | | | | | the ensuing mayhem. llvm-svn: 143244
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+533
llvm-svn: 105619
OpenPOWER on IntegriCloud