summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_argsLawrence D'Anna2019-10-292-41/+56
| | | | | | | | | | | | | | | | | | | | Summary: Move breakpoints from the old, bad ArgInfo::count to the new, better ArgInfo::max_positional_args. Soon ArgInfo::count will be no more. It looks like this functionality is already well tested by `TestBreakpointCommandsFromPython.py`, so there's no need to write additional tests for it. Reviewers: labath, jingham, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69468
* [LLDB][Python] fix another fflush issue on NetBSDLawrence D'Anna2019-10-292-15/+20
| | | | | | | | | | | | | | | | Summary: Here's another instance where we were calling fflush on an input stream, which is illegal on NetBSD. Reviewers: labath, mgorny Reviewed By: mgorny Subscribers: krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69488
* Correct size_t format specifierShu-Chun Weng2019-10-261-1/+1
| | | | Differential Revision: https://reviews.llvm.org/D69455
* Add the ability to pass extra args to a Python breakpoint callback.Jim Ingham2019-10-253-19/+116
| | | | | | | | | | | | | | | | | For example, it is pretty easy to write a breakpoint command that implements "stop when my caller is Foo", and it is pretty easy to write a breakpoint command that implements "stop when my caller is Bar". But there's no way to write a generic "stop when my caller is..." function, and then specify the caller when you add the command to a breakpoint. With this patch, you can pass this data in a SBStructuredData dictionary. That will get stored in the PythonCommandBaton for the breakpoint, and passed to the implementation function (if it has the right signature) when the breakpoint is hit. Then in lldb, you can say: (lldb) break com add -F caller_is -k caller_name -v Foo More generally this will allow us to write reusable Python breakpoint commands. Differential Revision: https://reviews.llvm.org/D68671
* [lldb] [Python] Do not attempt to flush() a read-only fdMichal Gorny2019-10-241-5/+7
| | | | | | | | | | | | | | | Summary: When creating a FileSP object, do not flush() the underlying file unless it is open for writing. Attempting to flush() a read-only fd results in EBADF on NetBSD. Reviewers: lawrence_danna, labath, krytarowski Reviewed By: lawrence_danna, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D69320
* remove multi-argument form of PythonObject::Reset()Lawrence D'Anna2019-10-227-479/+316
| | | | | | | | | | | | | | | | | | | | Summary: With this patch, only the no-argument form of `Reset()` remains in PythonDataObjects. It also deletes PythonExceptionState in favor of PythonException, because the only call-site of PythonExceptionState was also using Reset, so I cleaned up both while I was there. Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69214 llvm-svn: 375475
* eliminate nontrivial Reset(...) from TypedPythonObjectLawrence D'Anna2019-10-193-39/+75
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This deletes `Reset(...)`, except for the no-argument form `Reset()` from `TypedPythonObject`, and therefore from `PythonString`, `PythonList`, etc. It updates the various callers to use assignment, `As<>`, `Take<>`, and `Retain<>`, as appropriate. followon to https://reviews.llvm.org/D69080 Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69133 llvm-svn: 375350
* [LLDB] bugfix: command script add -f doesn't work for some callablesLawrence D'Anna2019-10-192-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When users define a debugger command from python, they provide a callable object. Because the signature of the function has been extended, LLDB needs to inspect the number of parameters the callable can take. The rule it was using to decide was weird, apparently not tested, and giving wrong results for some kinds of python callables. This patch replaces the weird rule with a simple one: if the callable can take 5 arguments, it gets the 5 argument version of the signature. Otherwise it gets the old 4 argument version. It also adds tests with a bunch of different kinds of python callables with both 4 and 5 arguments. Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69014 llvm-svn: 375333
* eliminate one form of PythonObject::Reset()Lawrence D'Anna2019-10-172-27/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: I'd like to eliminate all forms of Reset() and all public constructors on these objects, so the only way to make them is with Take<> and Retain<> and the only way to copy or move them is with actual c++ copy, move, or assignment. This is a simple place to start. Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69080 llvm-svn: 375182
* clean up the implementation of PythonCallable::GetNumArgumentsLawrence D'Anna2019-10-172-35/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The current implementation of PythonCallable::GetNumArguments is not exception safe, has weird semantics, and is just plain incorrect for some kinds of functions. Python 3.3 introduces inspect.signature, which lets us easily query for function signatures in a sane and documented way. This patch leaves the old implementation in place for < 3.3, but uses inspect.signature for modern pythons. It also leaves the old weird semantics in place, but with FIXMEs grousing about it. We should update the callers and fix the semantics in a subsequent patch. It also adds some tests. Reviewers: JDevlieghere, clayborg, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68995 llvm-svn: 375181
* delete SWIG typemaps for FILE*Lawrence D'Anna2019-10-173-35/+7
| | | | | | | | | | | | | | | | | | 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
* update ScriptInterpreterPython to use File, not FILE*Lawrence D'Anna2019-10-162-55/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ScriptInterpreterPython needs to save and restore sys.stdout and friends when LLDB runs a python script. It currently does this using FILE*, which is not optimal. If whatever was in sys.stdout can not be represented as a FILE*, then it will not be restored correctly when the script is finished. It also means that if the debugger's own output stream is not representable as a file, ScriptInterpreterPython will not be able to redirect python's output correctly. This patch updates ScriptInterpreterPython to represent files with lldb_private::File, and to represent whatever the user had in sys.stdout as simply a PythonObject. This will make lldb interoperate better with other scripts or programs that need to manipulate sys.stdout. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68962 llvm-svn: 374964
* eliminate virtual methods from PythonDataObjectsLawrence D'Anna2019-10-152-380/+121
| | | | | | | | | | | | | | | | | | | | | 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
* SBFile::GetFile: convert SBFile back into python native files.Lawrence D'Anna2019-10-152-24/+80
| | | | | | | | | | | | | | | | | | | | | | 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
* uint32_t options -> File::OpenOptions optionsLawrence D'Anna2019-10-141-7/+12
| | | | | | | | | | | | | | | | | | | | | | | 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
* SBFile support in SBCommandReturnObjectLawrence D'Anna2019-10-091-2/+3
| | | | | | | | | | | | | | | | | | Summary: This patch add SBFile interfaces to SBCommandReturnObject, and removes the internal callers of its FILE* interfaces. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68434 llvm-svn: 374238
* allow arbitrary python streams to be converted to SBFileLawrence D'Anna2019-10-091-14/+401
| | | | | | | | | | | | | | | | | | | | | | | | 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
* exception handling in PythonDataObjects.Lawrence D'Anna2019-10-082-36/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [lldb] Reverts part of 61f471aHaibo Huang2019-10-081-1/+6
| | | | | | | | | | | Seems I wrongly merged an old patch. Reverts the change related to python dir for windows. FileSpec should always contain normalized path. I.e. using '/' even in windows. llvm-svn: 373998
* [lldb] Unifying lldb python pathHaibo Huang2019-10-073-40/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on mgorny@'s D67890 There are 3 places where python site-package path is calculated independently: 1. finishSwigPythonLLDB.py where files are written to site-packages. 2. lldb/scripts/CMakeLists.txt where site-packages are installed. 3. ScriptInterpreterPython.cpp where site-packages are added to PYTHONPATH. This change creates the path once and use it everywhere. So that they will not go out of sync. Also it provides a chance for cross compiling users to specify the right path for site-packages. Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68442 llvm-svn: 373991
* [Python] Remove unused variableJonas Devlieghere2019-10-041-1/+0
| | | | | | warning: unused variable 'py_func_obj' [-Wunused-variable] PyObject *py_func_obj = m_py_obj; llvm-svn: 373686
* Python3 doesn't seem to allow you to tell whether an object is a classJim Ingham2019-10-031-2/+0
| | | | | | | | | 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
* Pass an SBStructuredData to scripted ThreadPlans on use.Jim Ingham2019-10-034-2/+26
| | | | | | | | | | 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
* factor out an abstract base class for FileLawrence D'Anna2019-10-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* SBDebugger::SetInputFile, SetOutputFile, etc.Lawrence D'Anna2019-10-031-0/+2
| | | | | | | | | | | | | | | | | | | | | 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
* new api class: SBFileLawrence D'Anna2019-10-032-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [JSON] Use LLVM's library for encoding JSON in StructuredDataJonas Devlieghere2019-10-012-3/+3
| | | | | | | | | 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
* Give an error when StepUsingScriptedThreadPlan is passed a bad classname.Jim Ingham2019-09-282-5/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D68173 llvm-svn: 373135
* remove File::SetStream(), make new files instead.Lawrence D'Anna2019-09-271-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch removes File::SetStream() and File::SetDescriptor(), and replaces most direct uses of File with pointers to File. Instead of calling SetStream() on a file, we make a new file and replace it. My ultimate goal here is to introduce a new API class SBFile, which has full support for python io.IOStream file objects. These can redirect read() and write() to python code, so lldb::Files will need a way to dispatch those methods. Additionally it will need some form of sharing and assigning files, as a SBFile will be passed in and assigned to the main IO streams of the debugger. In my prototype patch queue, I make File itself copyable and add a secondary class FileOps to manage the sharing and dispatch. In that case SBFile was a unique_ptr<File>. (here: https://github.com/smoofra/llvm-project/tree/files) However in review, Pavel Labath suggested that it be shared_ptr instead. (here: https://reviews.llvm.org/D67793) In order for SBFile to use shared_ptr<File>, everything else should as well. If this patch is accepted, I will make SBFile use a shared_ptr I will remove FileOps from future patches and use subclasses of File instead. Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67891 llvm-svn: 373090
* Convert FileSystem::Open() to return Expected<FileUP>Lawrence D'Anna2019-09-263-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove unused method ResetOutputFileHandle()Jonas Devlieghere2019-09-252-4/+0
| | | | | | | | | | | ResetOutputFileHandle() isn't being used by anything. Also it's using FILE*, which is something we should be doing less of. Remove it. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D68001 llvm-svn: 372800
* File::SetDescriptor() should require optionsJonas Devlieghere2019-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* [ScriptInterpreter] Limit LLDB's globals to interactive mode.Jonas Devlieghere2019-09-181-6/+10
| | | | | | | | | | | Jim pointed out that the LLDB global variables should only be available in interactive mode. When used from a command for example, their values might be stale or not at all what the user expects. Therefore we want to explicitly make these variables unavailable. Differential revision: https://reviews.llvm.org/D67685 llvm-svn: 372192
* [ScriptInterpreter] Remove ScriptInterpreterPythonImpl::Clear() (NFC)Jonas Devlieghere2019-09-182-14/+0
| | | | | | This method is never called. llvm-svn: 372190
* [ScriptInterpreter] Initialize globals when loading a scripting module.Jonas Devlieghere2019-09-171-6/+6
| | | | | | | | | | | | | The LoadScriptingModule used by command script import wasn't initializing the LLDB global variables (things like `lldb.frame` and `lldb.debugger`). They would get initialized however when running the interactive script interpreter or running a single script line (e.g. `script print(lldb.frame)`). This patch fixes that by properly initializing the globals when loading a Python module. Differential revision: https://reviews.llvm.org/D67644 llvm-svn: 372060
* [LLDB] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-4/+4
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368933
* [Gardening] Remove dead code from ScriptInterpreterPython (NFC)Jonas Devlieghere2019-08-062-24/+3
| | | | | | The terminal state is never saved or restored. llvm-svn: 367977
* [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere2019-07-241-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
* [lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]] This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information. This is the command I ran and I to fix and format the code base: ``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ``` NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow. NOTE: I know this is a rather large commit but it is a nobrainer in most parts. Reviewers: martong, espindola, shafik, #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D61847 llvm-svn: 361484
* Delete unnecessary copy ctorsFangrui Song2019-05-222-31/+0
| | | | llvm-svn: 361358
* [ScriptInterpreter] Move ownership into debugger (NFC)Jonas Devlieghere2019-04-261-13/+7
| | | | | | | | | | | | | | This is part two of the change started in r359330. This patch moves the ownership of the script interpreter from the command interpreter into the debugger. I would've preferred to remove the lazy initialization, however the fact that the scripting language is set after the debugger is created makes that tricky. So for now this does exactly the same thing as when it was under the command interpreter. The result is that this patch is fully NFC. Differential revision: https://reviews.llvm.org/D61211 llvm-svn: 359354
* [ScriptInterpreter] Pass the debugger instead of the command interpreterJonas Devlieghere2019-04-263-35/+29
| | | | | | | | | | | | | | | | As discussed in D61090, there's no good reason for the script interpreter to depend on the command interpreter. When looking at the code, it becomes clear that we mostly use the command interpreter as a way to access the debugger. Hence, it makes more sense to just pass that to the script interpreter directly. This is part 1 out of 2. I have another patch in the pipeline that changes the ownership of the script interpreter to the debugger as well, but I didn't get around to finish that today. Differential revision: https://reviews.llvm.org/D61172 llvm-svn: 359330
* [ScriptInterpreterPython] find_first_of -> find (NFC)Jonas Devlieghere2019-04-241-1/+2
| | | | | | Follow up to r357198. llvm-svn: 359138
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-102-20/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* [Python] Remove Python include from ScriptInterpreterPython.hJonas Devlieghere2019-03-294-767/+773
| | | | | | | | | | | This patch limits the scope of the python header to the implementation of the python script interpreter plugin. ScriptInterpreterPython is now an abstract interface that doesn't expose any Python specific types, and is implemented by the ScriptInterpreterPythonImpl. Differential revision: https://reviews.llvm.org/D59976 llvm-svn: 357307
* [ScriptInterpreterPython] Remove unused field (NFC)Jonas Devlieghere2019-03-292-2/+1
| | | | | | The m_lldb_module was initialized but not used. llvm-svn: 357292
* [CMake] Move link dependencies where they are used.Jonas Devlieghere2019-03-291-0/+2
| | | | | | | | | The utility library shouldn't depend on curses, libedit or python. Move curses to core, libedit to host and python to the python plugin. Differential revision: https://reviews.llvm.org/D59970 llvm-svn: 357287
* [NFC] find_first_of/find_last_of -> find/rfind for single char.Jonas Devlieghere2019-03-281-2/+2
| | | | | | | | | 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
* [Python] Remove unused includesJonas Devlieghere2019-03-273-15/+7
| | | | llvm-svn: 357126
* [Python] Remove dynamic indirectionJonas Devlieghere2019-03-262-452/+69
| | | | | | | Now that the Python plugin relies on the SWIG symbols, we no longer need to dynamically resolve these functions. llvm-svn: 357034
OpenPOWER on IntegriCloud