summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* LanguageRuntime: Simplify NSException::GetSummary() outputMed Ismail Bennani2019-12-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now, NSException::GetSummary() has the following output: "name: $exception_name - reason: $exception_reason" It would be better to simplify the output by removing the name and only showing the exception's reason. This way, annotations would look nicer in the editor, and would be a shorter summary in the Variables Inspector. Accessing the exception's name can still be done by expanding the NSException object in the Variables Inspector. rdar://54770115 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71311 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-131-1/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* [Target] Generalize some behavior in ThreadAlex Langford2019-05-151-3/+4
| | | | | | | | | | Summary: I don't think there's a good reason for this behavior to be considered ObjC-specific. We can generalize this. Differential Revision: https://reviews.llvm.org/D61776 llvm-svn: 360741
* [lldb] Make frame recognizers vend synthesized eValueTypeVariableArgument valuesKuba Mracek2019-02-071-0/+1
| | | | llvm-svn: 353363
* [Test] Fix up tests affected by the new LLVM header.Jonas Devlieghere2019-01-221-5/+5
| | | | | | | | | The new LLVM header is one line shorter than the old one, which lead to some test failures. Ideally tests should rely on line numbers for breakpoints or output, but that's a different discussion. Hopefully this turns the bots green again. llvm-svn: 351779
* [lldb] Fix ObjCExceptionRecognizedStackFrame to populate the list of ↵Kuba Mracek2019-01-041-0/+11
| | | | | | | | recognized arguments Differential Revision: https://reviews.llvm.org/D56027 llvm-svn: 350376
* [lldb] Retrieve currently handled Obj-C exception via ↵Kuba Mracek2018-12-201-12/+96
| | | | | | | | | | | | __cxa_current_exception_type and add GetCurrentExceptionBacktrace SB ABI This builds on https://reviews.llvm.org/D43884 and https://reviews.llvm.org/D43886 and extends LLDB support of Obj-C exceptions to also look for a "current exception" for a thread in the C++ exception handling runtime metadata (via call to __cxa_current_exception_type). We also construct an actual historical SBThread/ThreadSP that contains frames from the backtrace in the Obj-C exception object. The high level goal this achieves is that when we're already crashed (because an unhandled exception occurred), we can still access the exception object and retrieve the backtrace from the throw point. In Obj-C, this is particularly useful because a catch+rethrow is very common and in those cases you currently don't have any access to the throw point backtrace. Differential Revision: https://reviews.llvm.org/D44072 llvm-svn: 349718
* [lldb] Add GetCurrentException APIs to SBThread, add frame recognizer for ↵Kuba Mracek2018-11-281-0/+10
| | | | | | | | | | | | | | objc_exception_throw for Obj-C runtimes This adds new APIs and a command to deal with exceptions (mostly Obj-C exceptions): SBThread and Thread get GetCurrentException API, which returns an SBValue/ValueObjectSP with the current exception for a thread. "Current" means an exception that is currently being thrown, caught or otherwise processed. In this patch, we only know about the exception when in objc_exception_throw, but subsequent patches will expand this (and add GetCurrentExceptionBacktrace, which will return an SBThread/ThreadSP containing a historical thread backtrace retrieved from the exception object. Currently unimplemented, subsequent patches will implement this). Extracting the exception from objc_exception_throw is implemented by adding a frame recognizer. This also add a new sub-command "thread exception", which prints the current exception. Differential Revision: https://reviews.llvm.org/D43886 llvm-svn: 347813
* [lldb] Add synthetic frontend for _NSCallStackArrayKuba Mracek2018-11-121-2/+12
| | | | | | | | An Obj-C array type _NSCallStackArray is used in NSException backtraces. This patch adds a synthetic frontend for _NSCallStackArray, which now correctly returns frame PCs. Differential Revision: https://reviews.llvm.org/D44081 llvm-svn: 346708
* [lldb] Extract more fields from NSException valuesKuba Mracek2018-11-121-0/+90
This patch teaches LLDB about more fields on NSException Obj-C objects, specifically we can now retrieve the "name" and "reason" of an NSException. The goal is to eventually be able to have SB API that can provide details about the currently thrown/caught/processed exception. Differential Revision: https://reviews.llvm.org/D43884 llvm-svn: 346695
OpenPOWER on IntegriCloud