Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 738af7a6 25-Oct-2019 Jim Ingham <jingham@apple.com>

Add the ability to pass extra args to a Python breakpoint callback.

For example, it is pretty easy to write a breakpoint command that implements "stop when my caller is Foo", and
it is prett

Add the ability to pass extra args to a Python breakpoint callback.

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

show more ...


# 04edd189 22-Oct-2019 Lawrence D'Anna <lawrence_danna@apple.com>

remove multi-argument form of PythonObject::Reset()

Summary:
With this patch, only the no-argument form of `Reset()` remains in
PythonDataObjects. It also deletes PythonExceptionState in favor of

remove multi-argument form of PythonObject::Reset()

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

show more ...


# b07823f3 16-Oct-2019 Lawrence D'Anna <lawrence_danna@apple.com>

update ScriptInterpreterPython to use File, not FILE*

Summary:
ScriptInterpreterPython needs to save and restore sys.stdout and
friends when LLDB runs a python script.

It currently does this using

update ScriptInterpreterPython to use File, not FILE*

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

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 ...


# 93c98346 28-Sep-2019 Jim Ingham <jingham@apple.com>

Give an error when StepUsingScriptedThreadPlan is passed a bad classname.

Differential Revision: https://reviews.llvm.org/D68173

llvm-svn: 373135


# 4d4a8eed 25-Sep-2019 Jonas Devlieghere <jonas@devlieghere.com>

remove unused method ResetOutputFileHandle()

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: Lawrenc

remove unused method ResetOutputFileHandle()

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

show more ...


# abb3d137 18-Sep-2019 Jonas Devlieghere <jonas@devlieghere.com>

[ScriptInterpreter] Remove ScriptInterpreterPythonImpl::Clear() (NFC)

This method is never called.

llvm-svn: 372190


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
# ea1752a7 06-Aug-2019 Jonas Devlieghere <jonas@devlieghere.com>

[Gardening] Remove dead code from ScriptInterpreterPython (NFC)

The terminal state is never saved or restored.

llvm-svn: 367977


Revision tags: 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, llvmorg-8.0.1-rc1
# 8d1fb843 26-Apr-2019 Jonas Devlieghere <jonas@devlieghere.com>

[ScriptInterpreter] Pass the debugger instead of the command interpreter

As discussed in D61090, there's no good reason for the script
interpreter to depend on the command interpreter. When looking

[ScriptInterpreter] Pass the debugger instead of the command interpreter

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

show more ...


# 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 ...


# 63dd5d25 29-Mar-2019 Jonas Devlieghere <jonas@devlieghere.com>

[Python] Remove Python include from ScriptInterpreterPython.h

This patch limits the scope of the python header to the implementation
of the python script interpreter plugin. ScriptInterpreterPython

[Python] Remove Python include from ScriptInterpreterPython.h

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

show more ...


123