#
0f783599 |
| 17-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
delete SWIG typemaps for FILE*
Summary: The SWIG typemaps for FILE* are no longer used, so this patch deletes them.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers:
delete SWIG typemaps for FILE*
Summary: The SWIG typemaps for FILE* are no longer used, so this patch deletes them.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68963
llvm-svn: 375073
show more ...
|
#
d3bd5b3d |
| 15-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
eliminate virtual methods from PythonDataObjects
Summary: This patch eliminates a bunch of boilerplate from PythonDataObjects, as well as the use of virtual methods. In my opinion it also makes the
eliminate virtual methods from PythonDataObjects
Summary: This patch eliminates a bunch of boilerplate from PythonDataObjects, as well as the use of virtual methods. In my opinion it also makes the Reset logic a lot more clear and easy to follow. The price is yet another template. I think it's worth it.
Reviewers: JDevlieghere, jasonmolenda, labath, zturner
Reviewed By: JDevlieghere, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68918
llvm-svn: 374916
show more ...
|
#
d9b553ec |
| 15-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
SBFile::GetFile: convert SBFile back into python native files.
Summary: This makes SBFile::GetFile public and adds a SWIG typemap to convert the result back into a python native file.
If the underl
SBFile::GetFile: convert SBFile back into python native files.
Summary: This makes SBFile::GetFile public and adds a SWIG typemap to convert the result back into a python native file.
If the underlying File itself came from a python file, it is returned identically. Otherwise a new python file object is created using the file descriptor.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68737
llvm-svn: 374911
show more ...
|
#
62c9fe42 |
| 14-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
uint32_t options -> File::OpenOptions options
Summary: This patch re-types everywhere that passes a File::OpenOptions as a uint32_t so it actually uses File::OpenOptions.
It also converts some Open
uint32_t options -> File::OpenOptions options
Summary: This patch re-types everywhere that passes a File::OpenOptions as a uint32_t so it actually uses File::OpenOptions.
It also converts some OpenOptions related functions that fail by returning 0 or NULL into llvm::Expected
split off from https://reviews.llvm.org/D68737
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68853
llvm-svn: 374817
show more ...
|
#
21b8a8ae |
| 09-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
allow arbitrary python streams to be converted to SBFile
Summary: This patch adds SWIG typemaps that can convert arbitrary python file objects into lldb_private::File.
A SBFile may be initialized f
allow arbitrary python streams to be converted to SBFile
Summary: This patch adds SWIG typemaps that can convert arbitrary python file objects into lldb_private::File.
A SBFile may be initialized from a python file using the constructor. There are also alternate, tagged constructors that allow python files to be borrowed, and for the caller to control whether or not the python I/O methods will be called even when a file descriptor is available.I
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: zturner, amccarth, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68188
llvm-svn: 374225
show more ...
|
#
085328ee |
| 08-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
exception handling in PythonDataObjects.
Summary: Python APIs nearly all can return an exception. They do this by returning NULL, or -1, or some such value and setting the exception state with PyE
exception handling in PythonDataObjects.
Summary: Python APIs nearly all can return an exception. They do this by returning NULL, or -1, or some such value and setting the exception state with PyErr_Set*(). Exceptions must be handled before further python API functions are called. Failure to do so will result in asserts on debug builds of python. It will also sometimes, but not usually result in crashes of release builds.
Nearly everything in PythonDataObjects.h needs to be updated to account for this. This patch doesn't fix everything, but it does introduce some new methods using Expected<> return types that are safe to use.
split off from https://reviews.llvm.org/D68188
Reviewers: JDevlieghere, jasonmolenda, labath, zturner
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68547
llvm-svn: 374094
show more ...
|
#
2d511023 |
| 04-Oct-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Python] Remove unused variable
warning: unused variable 'py_func_obj' [-Wunused-variable] PyObject *py_func_obj = m_py_obj; llvm-svn: 373686
|
#
ebaa3eb1 |
| 03-Oct-2019 |
Jim Ingham <jingham@apple.com> |
Python3 doesn't seem to allow you to tell whether an object is a class
PyClass_Check and everything it relied on seems gone from Python3.7. So I won't check whether it is a class first...
Also cle
Python3 doesn't seem to allow you to tell whether an object is a class
PyClass_Check and everything it relied on seems gone from Python3.7. So I won't check whether it is a class first...
Also cleaned up a couple of warnings.
llvm-svn: 373679
show more ...
|
#
27a14f19 |
| 03-Oct-2019 |
Jim Ingham <jingham@apple.com> |
Pass an SBStructuredData to scripted ThreadPlans on use.
This will allow us to write reusable scripted ThreadPlans, since you can use key/value pairs with known keys in the plan to parametrize its b
Pass an SBStructuredData to scripted ThreadPlans on use.
This will allow us to write reusable scripted ThreadPlans, since you can use key/value pairs with known keys in the plan to parametrize its behavior.
Differential Revision: https://reviews.llvm.org/D68366
llvm-svn: 373675
show more ...
|
#
f913fd6e |
| 03-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
factor out an abstract base class for File
Summary: This patch factors out File as an abstract base class and moves most of its actual functionality into a subclass called NativeFile. In the next
factor out an abstract base class for File
Summary: This patch factors out File as an abstract base class and moves most of its actual functionality into a subclass called NativeFile. In the next patch, I'm going to be adding subclasses of File that don't necessarily have any connection to actual OS files, so they will not inherit from NativeFile.
This patch was split out as a prerequisite for https://reviews.llvm.org/D68188
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68317
llvm-svn: 373564
show more ...
|
#
96898eb6 |
| 03-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
SBDebugger::SetInputFile, SetOutputFile, etc.
Summary: Add new methods to SBDebugger to set IO files as SBFiles instead of as FILE* streams.
In future commits, the FILE* methods will be deprecated
SBDebugger::SetInputFile, SetOutputFile, etc.
Summary: Add new methods to SBDebugger to set IO files as SBFiles instead of as FILE* streams.
In future commits, the FILE* methods will be deprecated and these will become the primary way to set the debugger I/O streams.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68181
llvm-svn: 373563
show more ...
|
#
57504530 |
| 03-Oct-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
new api class: SBFile
Summary: SBFile is a scripting API wrapper for lldb_private::File
This is the first step in a project to enable arbitrary python io.IOBase file objects -- including those that
new api class: SBFile
Summary: SBFile is a scripting API wrapper for lldb_private::File
This is the first step in a project to enable arbitrary python io.IOBase file objects -- including those that override the read() and write() methods -- to be used as the main debugger IOStreams.
Currently this is impossible because python file objects must first be converted into FILE* streams by SWIG in order to be passed into the debugger.
full prototype: https://github.com/smoofra/llvm-project/tree/files
Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath
Reviewed By: labath
Subscribers: labath, mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D67793
llvm-svn: 373562
show more ...
|
#
2783d817 |
| 01-Oct-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[JSON] Use LLVM's library for encoding JSON in StructuredData
This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library.
Differential revision: https://reviews.ll
[JSON] Use LLVM's library for encoding JSON in StructuredData
This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library.
Differential revision: https://reviews.llvm.org/D68248
llvm-svn: 373359
show more ...
|
#
2fce1137 |
| 26-Sep-2019 |
Lawrence D'Anna <lawrence_danna@apple.com> |
Convert FileSystem::Open() to return Expected<FileUP>
Summary: This patch converts FileSystem::Open from this prototype:
Status Open(File &File, const FileSpec &file_spec, ...);
to this one:
llvm
Convert FileSystem::Open() to return Expected<FileUP>
Summary: This patch converts FileSystem::Open from this prototype:
Status Open(File &File, const FileSpec &file_spec, ...);
to this one:
llvm::Expected<std::unique_ptr<File>> Open(const FileSpec &file_spec, ...);
This is beneficial on its own, as llvm::Expected is a more modern and recommended error type than Status. It is also a necessary step towards https://reviews.llvm.org/D67891, and further developments for lldb_private::File.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D67996
llvm-svn: 373003
show more ...
|
#
948786c9 |
| 23-Sep-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
File::SetDescriptor() should require options
lvm_private::File::GetStream() can fail if m_options == 0
It's not clear from the header a File created with a descriptor will be not be usable by many
File::SetDescriptor() should require options
lvm_private::File::GetStream() can fail if m_options == 0
It's not clear from the header a File created with a descriptor will be not be usable by many parts of LLDB unless SetOptions is also called, but it is.
This is because those parts of LLDB rely on GetStream() to use the file, and that in turn relies on calling fdopen on the descriptor. When calling fdopen, GetStream relies on m_options to determine the access mode. If m_options has never been set, GetStream() will fail.
This patch adds options as a required argument to File::SetDescriptor and the corresponding constructor.
Patch by: Lawrence D'Anna
Differential revision: https://reviews.llvm.org/D67792
llvm-svn: 372652
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
#
1d846e1a |
| 22-May-2019 |
Fangrui Song <maskray@google.com> |
Delete unnecessary copy ctors
llvm-svn: 361358
|
Revision tags: llvmorg-8.0.1-rc1 |
|
#
8b3af63b |
| 10-Apr-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[NFC] Remove ASCII lines from comments
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment.
Its use is not really consistent across the code base
[NFC] Remove ASCII lines from comments
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment.
Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment.
I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn.
Differential revision: https://reviews.llvm.org/D60508
llvm-svn: 358135
show more ...
|
#
c712bac7 |
| 28-Mar-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[NFC] find_first_of/find_last_of -> find/rfind for single char.
For a single char argument, find_first_of is equal to find and find_last_of is equal to rfind. While playing around with the plugin st
[NFC] find_first_of/find_last_of -> find/rfind for single char.
For a single char argument, find_first_of is equal to find and find_last_of is equal to rfind. While playing around with the plugin stuff this caused an export failure because it always got inlined except once, which resulted in an undefined symbol.
llvm-svn: 357198
show more ...
|
#
9a6c7572 |
| 27-Mar-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Python] Remove unused includes
llvm-svn: 357126
|
#
2819136f |
| 21-Mar-2019 |
Michal Gorny <mgorny@gentoo.org> |
[lldb] Add missing EINTR handling
Differential Revision: https://reviews.llvm.org/D59606
llvm-svn: 356703
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3 |
|
#
b81d715c |
| 16-Feb-2019 |
Tatyana Krasnukha <tatyana@synopsys.com> |
Add PythonBoolean type to the PythonDataObjects
Differential Revision: https://reviews.llvm.org/D57817
llvm-svn: 354206
|
Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo 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
show more ...
|
#
a6682a41 |
| 15-Dec-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
Simplify Boolean expressions
This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command:
run-clang-tidy.py -checks='-*,readability-simplify-
Simplify Boolean expressions
This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command:
run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD
Differential revision: https://reviews.llvm.org/D55584
llvm-svn: 349215
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
#
50bc1ed2 |
| 02-Nov-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[FileSystem] Open File instances through the FileSystem.
This patch modifies how we open File instances in LLDB. Rather than passing a path or FileSpec to the constructor, we now go through the virt
[FileSystem] Open File instances through the FileSystem.
This patch modifies how we open File instances in LLDB. Rather than passing a path or FileSpec to the constructor, we now go through the virtual file system. This is needed in order to make things work with the VFS in the future.
Differential revision: https://reviews.llvm.org/D54020
llvm-svn: 346049
show more ...
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
5457b426 |
| 25-Jul-2018 |
Pavel Labath <labath@google.com> |
Fix PythonString::GetString for >=python-3.7
The return value of PyUnicode_AsUTF8AndSize is now "const char *".
Thanks to Brett Neumeier for testing the patch out on python 3.7.
llvm-svn: 337908
|