[Lldb-commits] [lldb] 4017c6f - [lldb][docs] Translate ASCII art to restructured text formatting
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 15 05:44:37 PST 2021
Author: Raphael Isemann
Date: 2021-01-15T14:43:27+01:00
New Revision: 4017c6fe7f11db5f266306bcd504690be586620a
URL: https://github.com/llvm/llvm-project/commit/4017c6fe7f11db5f266306bcd504690be586620a
DIFF: https://github.com/llvm/llvm-project/commit/4017c6fe7f11db5f266306bcd504690be586620a.diff
LOG: [lldb][docs] Translate ASCII art to restructured text formatting
This translates most of the old ASCII art in our documentation to the
equivalent in restructured text (which the new version of the LLDB docs
is using).
Added:
Modified:
lldb/bindings/interface/SBAddress.i
lldb/bindings/interface/SBBreakpoint.i
lldb/bindings/interface/SBBreakpointLocation.i
lldb/bindings/interface/SBBreakpointName.i
lldb/bindings/interface/SBCommandInterpreter.i
lldb/bindings/interface/SBCommandInterpreterRunOptions.i
lldb/bindings/interface/SBCommandReturnObject.i
lldb/bindings/interface/SBCompileUnit.i
lldb/bindings/interface/SBEnvironment.i
lldb/bindings/interface/SBError.i
lldb/bindings/interface/SBEvent.i
lldb/bindings/interface/SBFileSpec.i
lldb/bindings/interface/SBFrame.i
lldb/bindings/interface/SBFunction.i
lldb/bindings/interface/SBInstructionList.i
lldb/bindings/interface/SBLineEntry.i
lldb/bindings/interface/SBListener.i
lldb/bindings/interface/SBModule.i
lldb/bindings/interface/SBPlatform.i
lldb/bindings/interface/SBProcess.i
lldb/bindings/interface/SBSection.i
lldb/bindings/interface/SBSourceManager.i
lldb/bindings/interface/SBStream.i
lldb/bindings/interface/SBSymbol.i
lldb/bindings/interface/SBSymbolContext.i
lldb/bindings/interface/SBSymbolContextList.i
lldb/bindings/interface/SBTarget.i
lldb/bindings/interface/SBThread.i
lldb/bindings/interface/SBType.i
lldb/bindings/interface/SBTypeEnumMember.i
lldb/bindings/interface/SBValue.i
lldb/bindings/interface/SBValueList.i
lldb/bindings/interface/SBWatchpoint.i
lldb/bindings/python/python-extensions.swig
lldb/bindings/python/python.swig
Removed:
################################################################################
diff --git a/lldb/bindings/interface/SBAddress.i b/lldb/bindings/interface/SBAddress.i
index 6fd06c83d293..694a7723e225 100644
--- a/lldb/bindings/interface/SBAddress.i
+++ b/lldb/bindings/interface/SBAddress.i
@@ -17,8 +17,9 @@ libraries, bundles, frameworks) being loaded at
diff erent
addresses than the addresses found in the object file that
represents them on disk. There are currently two types of addresses
for a section:
- o file addresses
- o load addresses
+
+* file addresses
+* load addresses
File addresses represents the virtual addresses that are in the 'on
disk' object files. These virtual addresses are converted to be
diff --git a/lldb/bindings/interface/SBBreakpoint.i b/lldb/bindings/interface/SBBreakpoint.i
index 696795241b11..983e9facfe20 100644
--- a/lldb/bindings/interface/SBBreakpoint.i
+++ b/lldb/bindings/interface/SBBreakpoint.i
@@ -11,7 +11,7 @@ namespace lldb {
"Represents a logical breakpoint and its associated settings.
For example (from test/functionalities/breakpoint/breakpoint_ignore_count/
-TestBreakpointIgnoreCount.py),
+TestBreakpointIgnoreCount.py),::
def breakpoint_ignore_count_python(self):
'''Use Python APIs to set breakpoint ignore count.'''
@@ -62,13 +62,13 @@ TestBreakpointIgnoreCount.py),
process.Continue()
-SBBreakpoint supports breakpoint location iteration, for example,
+SBBreakpoint supports breakpoint location iteration, for example,::
for bl in breakpoint:
print('breakpoint location load addr: %s' % hex(bl.GetLoadAddress()))
print('breakpoint location condition: %s' % hex(bl.GetCondition()))
-and rich comparison methods which allow the API program to use,
+and rich comparison methods which allow the API program to use,::
if aBreakpoint == bBreakpoint:
...
@@ -102,7 +102,7 @@ public:
lldb::SBTarget
GetTarget() const;
-
+
lldb::SBBreakpointLocation
FindLocationByAddress (lldb::addr_t vm_addr);
diff --git a/lldb/bindings/interface/SBBreakpointLocation.i b/lldb/bindings/interface/SBBreakpointLocation.i
index dc39c83c2d67..fc37475ba745 100644
--- a/lldb/bindings/interface/SBBreakpointLocation.i
+++ b/lldb/bindings/interface/SBBreakpointLocation.i
@@ -15,7 +15,7 @@ A breakpoint location is defined by the breakpoint that produces it,
and the address that resulted in this particular instantiation.
Each breakpoint location has its settable options.
-SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
+:py:class:`SBBreakpoint` contains SBBreakpointLocation(s). See docstring of SBBreakpoint
for retrieval of an SBBreakpointLocation from an SBBreakpoint."
) SBBreakpointLocation;
class SBBreakpointLocation
diff --git a/lldb/bindings/interface/SBBreakpointName.i b/lldb/bindings/interface/SBBreakpointName.i
index e280d4224591..c0fdcc748988 100644
--- a/lldb/bindings/interface/SBBreakpointName.i
+++ b/lldb/bindings/interface/SBBreakpointName.i
@@ -8,12 +8,12 @@
namespace lldb {
%feature("docstring",
-"Represents a breakpoint name registered in a given SBTarget.
+"Represents a breakpoint name registered in a given :py:class:`SBTarget`.
Breakpoint names provide a way to act on groups of breakpoints. When you add a
name to a group of breakpoints, you can then use the name in all the command
line lldb commands for that name. You can also configure the SBBreakpointName
-options and those options will be propagated to any SBBreakpoints currently
+options and those options will be propagated to any :py:class:`SBBreakpoint` s currently
using that name. Adding a name to a breakpoint will also apply any of the
set options to that breakpoint.
diff --git a/lldb/bindings/interface/SBCommandInterpreter.i b/lldb/bindings/interface/SBCommandInterpreter.i
index 498084ae3ab1..b9a32716cfd6 100644
--- a/lldb/bindings/interface/SBCommandInterpreter.i
+++ b/lldb/bindings/interface/SBCommandInterpreter.i
@@ -9,9 +9,11 @@
namespace lldb {
%feature("docstring",
-"SBCommandInterpreter handles/interprets commands for lldb. You get the
-command interpreter from the SBDebugger instance. For example (from test/
-python_api/interpreter/TestCommandInterpreterAPI.py),
+"SBCommandInterpreter handles/interprets commands for lldb.
+
+You get the command interpreter from the :py:class:`SBDebugger` instance.
+
+For example (from test/ python_api/interpreter/TestCommandInterpreterAPI.py),::
def command_interpreter_api(self):
'''Test the SBCommandInterpreter APIs.'''
diff --git a/lldb/bindings/interface/SBCommandInterpreterRunOptions.i b/lldb/bindings/interface/SBCommandInterpreterRunOptions.i
index f9ccbbd24dbe..bad099205724 100644
--- a/lldb/bindings/interface/SBCommandInterpreterRunOptions.i
+++ b/lldb/bindings/interface/SBCommandInterpreterRunOptions.i
@@ -10,13 +10,14 @@ namespace lldb {
%feature("docstring",
"SBCommandInterpreterRunOptions controls how the RunCommandInterpreter runs the code it is fed.
+
A default SBCommandInterpreterRunOptions object has:
- StopOnContinue: false
- StopOnError: false
- StopOnCrash: false
- EchoCommands: true
- PrintResults: true
- AddToHistory: true
+* StopOnContinue: false
+* StopOnError: false
+* StopOnCrash: false
+* EchoCommands: true
+* PrintResults: true
+* AddToHistory: true
") SBCommandInterpreterRunOptions;
class SBCommandInterpreterRunOptions
diff --git a/lldb/bindings/interface/SBCommandReturnObject.i b/lldb/bindings/interface/SBCommandReturnObject.i
index affa16520f28..b07ef1c5eb1c 100644
--- a/lldb/bindings/interface/SBCommandReturnObject.i
+++ b/lldb/bindings/interface/SBCommandReturnObject.i
@@ -10,10 +10,10 @@ namespace lldb {
%feature("docstring",
"Represents a container which holds the result from command execution.
-It works with SBCommandInterpreter.HandleCommand() to encapsulate the result
+It works with :py:class:`SBCommandInterpreter.HandleCommand()` to encapsulate the result
of command execution.
-See SBCommandInterpreter for example usage of SBCommandReturnObject."
+See :py:class:`SBCommandInterpreter` for example usage of SBCommandReturnObject."
) SBCommandReturnObject;
class SBCommandReturnObject
{
diff --git a/lldb/bindings/interface/SBCompileUnit.i b/lldb/bindings/interface/SBCompileUnit.i
index d6a4c07038c6..4c8efaedb7dc 100644
--- a/lldb/bindings/interface/SBCompileUnit.i
+++ b/lldb/bindings/interface/SBCompileUnit.i
@@ -11,7 +11,7 @@ namespace lldb {
%feature("docstring",
"Represents a compilation unit, or compiled source file.
-SBCompileUnit supports line entry iteration. For example,
+SBCompileUnit supports line entry iteration. For example,::
# Now get the SBSymbolContext from this frame. We want everything. :-)
context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
@@ -25,23 +25,23 @@ SBCompileUnit supports line entry iteration. For example,
print('start addr: %s' % str(lineEntry.GetStartAddress()))
print('end addr: %s' % str(lineEntry.GetEndAddress()))
-produces:
-
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
-start addr: a.out[0x100000d98]
-end addr: a.out[0x100000da3]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
-start addr: a.out[0x100000da3]
-end addr: a.out[0x100000da9]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
-start addr: a.out[0x100000da9]
-end addr: a.out[0x100000db6]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
-start addr: a.out[0x100000db6]
-end addr: a.out[0x100000dbc]
-...
-
-See also SBSymbolContext and SBLineEntry"
+produces: ::
+
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
+ start addr: a.out[0x100000d98]
+ end addr: a.out[0x100000da3]
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
+ start addr: a.out[0x100000da3]
+ end addr: a.out[0x100000da9]
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
+ start addr: a.out[0x100000da9]
+ end addr: a.out[0x100000db6]
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
+ start addr: a.out[0x100000db6]
+ end addr: a.out[0x100000dbc]
+ ...
+
+See also :py:class:`SBSymbolContext` and :py:class:`SBLineEntry`"
) SBCompileUnit;
class SBCompileUnit
{
diff --git a/lldb/bindings/interface/SBEnvironment.i b/lldb/bindings/interface/SBEnvironment.i
index 4ca22fc314d2..daf25bc26d9c 100644
--- a/lldb/bindings/interface/SBEnvironment.i
+++ b/lldb/bindings/interface/SBEnvironment.i
@@ -11,7 +11,8 @@ namespace lldb {
%feature("docstring",
"Represents the environment of a certain process.
-Example:
+Example: ::
+
for entry in lldb.debugger.GetSelectedTarget().GetEnvironment().GetEntries():
print(entry)
diff --git a/lldb/bindings/interface/SBError.i b/lldb/bindings/interface/SBError.i
index ea48e2263a77..5af6b4856bd8 100644
--- a/lldb/bindings/interface/SBError.i
+++ b/lldb/bindings/interface/SBError.i
@@ -11,7 +11,7 @@ namespace lldb {
%feature("docstring",
"Represents a container for holding any error code.
-For example (from test/python_api/hello_world/TestHelloWorld.py),
+For example (from test/python_api/hello_world/TestHelloWorld.py), ::
def hello_world_attach_with_id_api(self):
'''Create target, spawn a process, and attach to it by id.'''
@@ -45,7 +45,7 @@ For example (from test/python_api/hello_world/TestHelloWorld.py),
checks that after the attach, there is no error condition by asserting
that error.Success() is True and we get back a valid process object.
-And (from test/python_api/event/TestEvent.py),
+And (from test/python_api/event/TestEvent.py), ::
# Now launch the process, and do not stop at entry point.
error = lldb.SBError()
diff --git a/lldb/bindings/interface/SBEvent.i b/lldb/bindings/interface/SBEvent.i
index 99aa5319e371..2ebf599eb893 100644
--- a/lldb/bindings/interface/SBEvent.i
+++ b/lldb/bindings/interface/SBEvent.i
@@ -13,27 +13,27 @@ class SBBroadcaster;
%feature("docstring",
"API clients can register to receive events.
-For example, check out the following output:
+For example, check out the following output: ::
-Try wait for event...
-Event description: 0x103d0bb70 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = running}
-Event data flavor: Process::ProcessEventData
-Process state: running
+ Try wait for event...
+ Event description: 0x103d0bb70 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = running}
+ Event data flavor: Process::ProcessEventData
+ Process state: running
-Try wait for event...
-Event description: 0x103a700a0 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = stopped}
-Event data flavor: Process::ProcessEventData
-Process state: stopped
+ Try wait for event...
+ Event description: 0x103a700a0 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = stopped}
+ Event data flavor: Process::ProcessEventData
+ Process state: stopped
-Try wait for event...
-Event description: 0x103d0d4a0 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = exited}
-Event data flavor: Process::ProcessEventData
-Process state: exited
+ Try wait for event...
+ Event description: 0x103d0d4a0 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = exited}
+ Event data flavor: Process::ProcessEventData
+ Process state: exited
-Try wait for event...
-timeout occurred waiting for event...
+ Try wait for event...
+ timeout occurred waiting for event...
-from test/python_api/event/TestEventspy:
+from test/python_api/event/TestEventspy: ::
def do_listen_for_and_print_event(self):
'''Create a listener and use SBEvent API to print the events received.'''
diff --git a/lldb/bindings/interface/SBFileSpec.i b/lldb/bindings/interface/SBFileSpec.i
index d287a940c051..b549321487ec 100644
--- a/lldb/bindings/interface/SBFileSpec.i
+++ b/lldb/bindings/interface/SBFileSpec.i
@@ -13,7 +13,7 @@ namespace lldb {
basename. The string values of the paths are put into uniqued string pools
for fast comparisons and efficient memory usage.
-For example, the following code
+For example, the following code ::
lineEntry = context.GetLineEntry()
self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory',
diff --git a/lldb/bindings/interface/SBFrame.i b/lldb/bindings/interface/SBFrame.i
index c65b88f863e7..b4e9b1c5f542 100644
--- a/lldb/bindings/interface/SBFrame.i
+++ b/lldb/bindings/interface/SBFrame.i
@@ -10,7 +10,7 @@ namespace lldb {
%feature("docstring",
"Represents one of the stack frames associated with a thread.
-SBThread contains SBFrame(s). For example (from test/lldbutil.py),
+SBThread contains SBFrame(s). For example (from test/lldbutil.py), ::
def print_stacktrace(thread, string_buffer = False):
'''Prints a simple stack trace of this thread.'''
@@ -37,7 +37,7 @@ def print_stacktrace(thread, string_buffer = False):
...
-And,
+And, ::
for frame in thread:
print frame
diff --git a/lldb/bindings/interface/SBFunction.i b/lldb/bindings/interface/SBFunction.i
index 630c4db22c55..dec073e9e12f 100644
--- a/lldb/bindings/interface/SBFunction.i
+++ b/lldb/bindings/interface/SBFunction.i
@@ -11,7 +11,7 @@ namespace lldb {
%feature("docstring",
"Represents a generic function, which can be inlined or not.
-For example (from test/lldbutil.py, but slightly modified for doc purpose),
+For example (from test/lldbutil.py, but slightly modified for doc purpose),::
...
diff --git a/lldb/bindings/interface/SBInstructionList.i b/lldb/bindings/interface/SBInstructionList.i
index 135732302757..b51c0374c3ad 100644
--- a/lldb/bindings/interface/SBInstructionList.i
+++ b/lldb/bindings/interface/SBInstructionList.i
@@ -14,12 +14,12 @@ namespace lldb {
"Represents a list of machine instructions. SBFunction and SBSymbol have
GetInstructions() methods which return SBInstructionList instances.
-SBInstructionList supports instruction (SBInstruction instance) iteration.
-For example (see also SBDebugger for a more complete example),
+SBInstructionList supports instruction (:py:class:`SBInstruction` instance) iteration.
+For example (see also :py:class:`SBDebugger` for a more complete example), ::
-def disassemble_instructions (insts):
- for i in insts:
- print i
+ def disassemble_instructions (insts):
+ for i in insts:
+ print i
defines a function which takes an SBInstructionList instance and prints out
the machine instructions in assembly format."
diff --git a/lldb/bindings/interface/SBLineEntry.i b/lldb/bindings/interface/SBLineEntry.i
index be365377ba8b..a61d360c96f9 100644
--- a/lldb/bindings/interface/SBLineEntry.i
+++ b/lldb/bindings/interface/SBLineEntry.i
@@ -10,7 +10,7 @@ namespace lldb {
%feature("docstring",
"Specifies an association with a contiguous range of instructions and
-a source file location. SBCompileUnit contains SBLineEntry(s). For example,
+a source file location. :py:class:`SBCompileUnit` contains SBLineEntry(s). For example, ::
for lineEntry in compileUnit:
print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
@@ -18,23 +18,23 @@ a source file location. SBCompileUnit contains SBLineEntry(s). For example,
print('start addr: %s' % str(lineEntry.GetStartAddress()))
print('end addr: %s' % str(lineEntry.GetEndAddress()))
-produces:
-
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
-start addr: a.out[0x100000d98]
-end addr: a.out[0x100000da3]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
-start addr: a.out[0x100000da3]
-end addr: a.out[0x100000da9]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
-start addr: a.out[0x100000da9]
-end addr: a.out[0x100000db6]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
-start addr: a.out[0x100000db6]
-end addr: a.out[0x100000dbc]
-...
-
-See also SBCompileUnit."
+produces: ::
+
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
+ start addr: a.out[0x100000d98]
+ end addr: a.out[0x100000da3]
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
+ start addr: a.out[0x100000da3]
+ end addr: a.out[0x100000da9]
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
+ start addr: a.out[0x100000da9]
+ end addr: a.out[0x100000db6]
+ line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
+ start addr: a.out[0x100000db6]
+ end addr: a.out[0x100000dbc]
+ ...
+
+See also :py:class:`SBCompileUnit` ."
) SBLineEntry;
class SBLineEntry
{
diff --git a/lldb/bindings/interface/SBListener.i b/lldb/bindings/interface/SBListener.i
index 535aef9f0ae7..63474b3335fb 100644
--- a/lldb/bindings/interface/SBListener.i
+++ b/lldb/bindings/interface/SBListener.i
@@ -11,7 +11,7 @@ namespace lldb {
%feature("docstring",
"API clients can register its own listener to debugger events.
-See aslo SBEvent for example usage of creating and adding a listener."
+See aslo :py:class:`SBEvent` for example usage of creating and adding a listener."
) SBListener;
class SBListener
{
diff --git a/lldb/bindings/interface/SBModule.i b/lldb/bindings/interface/SBModule.i
index d64391a40d7c..d62d8b014b02 100644
--- a/lldb/bindings/interface/SBModule.i
+++ b/lldb/bindings/interface/SBModule.i
@@ -40,30 +40,30 @@ The module is designed to be able to select a single slice of an
executable image as it would appear on disk and during program
execution.
-You can retrieve SBModule from SBSymbolContext, which in turn is available
+You can retrieve SBModule from :py:class:`SBSymbolContext` , which in turn is available
from SBFrame.
-SBModule supports symbol iteration, for example,
+SBModule supports symbol iteration, for example, ::
for symbol in module:
name = symbol.GetName()
saddr = symbol.GetStartAddress()
eaddr = symbol.GetEndAddress()
-and rich comparison methods which allow the API program to use,
+and rich comparison methods which allow the API program to use, ::
if thisModule == thatModule:
print('This module is the same as that module')
to test module equality. A module also contains object file sections, namely
-SBSection. SBModule supports section iteration through section_iter(), for
-example,
+:py:class:`SBSection` . SBModule supports section iteration through section_iter(), for
+example, ::
print('Number of sections: %d' % module.GetNumSections())
for sec in module.section_iter():
print(sec)
-And to iterate the symbols within a SBSection, use symbol_in_section_iter(),
+And to iterate the symbols within a SBSection, use symbol_in_section_iter(), ::
# Iterates the text section and prints each symbols within each sub-section.
for subsec in text_sec:
@@ -72,7 +72,7 @@ And to iterate the symbols within a SBSection, use symbol_in_section_iter(),
print(INDENT2 + repr(sym))
print(INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType()))
-produces this following output:
+produces this following output: ::
[0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
diff --git a/lldb/bindings/interface/SBPlatform.i b/lldb/bindings/interface/SBPlatform.i
index 07aecfc354bb..270aec04a2e2 100644
--- a/lldb/bindings/interface/SBPlatform.i
+++ b/lldb/bindings/interface/SBPlatform.i
@@ -104,7 +104,7 @@ current processes on the remote host, attach to one of those processes,
install programs on the remote system, attach and launch processes,
and much more.
-Every SBTarget has a corresponding SBPlatform. The platform can be
+Every :py:class:`SBTarget` has a corresponding SBPlatform. The platform can be
specified upon target creation, or the currently selected platform
will attempt to be used when creating the target automatically as long
as the currently selected platform matches the target architecture
diff --git a/lldb/bindings/interface/SBProcess.i b/lldb/bindings/interface/SBProcess.i
index b54c4629f9df..ef79016eda5c 100644
--- a/lldb/bindings/interface/SBProcess.i
+++ b/lldb/bindings/interface/SBProcess.i
@@ -11,22 +11,22 @@ namespace lldb {
%feature("docstring",
"Represents the process associated with the target program.
-SBProcess supports thread iteration. For example (from test/lldbutil.py),
-
-# ==================================================
-# Utility functions related to Threads and Processes
-# ==================================================
-
-def get_stopped_threads(process, reason):
- '''Returns the thread(s) with the specified stop reason in a list.
-
- The list can be empty if no such thread exists.
- '''
- threads = []
- for t in process:
- if t.GetStopReason() == reason:
- threads.append(t)
- return threads
+SBProcess supports thread iteration. For example (from test/lldbutil.py), ::
+
+ # ==================================================
+ # Utility functions related to Threads and Processes
+ # ==================================================
+
+ def get_stopped_threads(process, reason):
+ '''Returns the thread(s) with the specified stop reason in a list.
+
+ The list can be empty if no such thread exists.
+ '''
+ threads = []
+ for t in process:
+ if t.GetStopReason() == reason:
+ threads.append(t)
+ return threads
...
"
diff --git a/lldb/bindings/interface/SBSection.i b/lldb/bindings/interface/SBSection.i
index 3d1c900917fd..b86d4e99c5ea 100644
--- a/lldb/bindings/interface/SBSection.i
+++ b/lldb/bindings/interface/SBSection.i
@@ -12,7 +12,7 @@ namespace lldb {
"Represents an executable image section.
SBSection supports iteration through its subsection, represented as SBSection
-as well. For example,
+as well. For example, ::
for sec in exe_module:
if sec.GetName() == '__TEXT':
@@ -22,18 +22,18 @@ as well. For example,
for subsec in sec:
print INDENT + repr(subsec)
-produces:
+produces: ::
-[0x0000000100000000-0x0000000100002000) a.out.__TEXT
- Number of subsections: 6
- [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
- [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
- [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
- [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
- [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
- [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
+ [0x0000000100000000-0x0000000100002000) a.out.__TEXT
+ Number of subsections: 6
+ [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
+ [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
+ [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
+ [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
+ [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
+ [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
-See also SBModule."
+See also :py:class:`SBModule` ."
) SBSection;
class SBSection
diff --git a/lldb/bindings/interface/SBSourceManager.i b/lldb/bindings/interface/SBSourceManager.i
index dfbdc612a06e..12dd1bdb0d18 100644
--- a/lldb/bindings/interface/SBSourceManager.i
+++ b/lldb/bindings/interface/SBSourceManager.i
@@ -11,7 +11,7 @@ namespace lldb {
%feature("docstring",
"Represents a central authority for displaying source code.
-For example (from test/source-manager/TestSourceManager.py),
+For example (from test/source-manager/TestSourceManager.py), ::
# Create the filespec for 'main.c'.
filespec = lldb.SBFileSpec('main.c', False)
diff --git a/lldb/bindings/interface/SBStream.i b/lldb/bindings/interface/SBStream.i
index edd67f87c3fb..acf44e351d5f 100644
--- a/lldb/bindings/interface/SBStream.i
+++ b/lldb/bindings/interface/SBStream.i
@@ -14,7 +14,7 @@ namespace lldb {
"Represents a destination for streaming data output to. By default, a string
stream is created.
-For example (from test/source-manager/TestSourceManager.py),
+For example (from test/source-manager/TestSourceManager.py), ::
# Create the filespec for 'main.c'.
filespec = lldb.SBFileSpec('main.c', False)
diff --git a/lldb/bindings/interface/SBSymbol.i b/lldb/bindings/interface/SBSymbol.i
index 4e17ab5af0fd..fa0b3e4e1378 100644
--- a/lldb/bindings/interface/SBSymbol.i
+++ b/lldb/bindings/interface/SBSymbol.i
@@ -10,9 +10,7 @@ namespace lldb {
%feature("docstring",
"Represents the symbol possibly associated with a stack frame.
-SBModule contains SBSymbol(s). SBSymbol can also be retrieved from SBFrame.
-
-See also SBModule and SBFrame."
+:py:class:`SBModule` contains SBSymbol(s). SBSymbol can also be retrieved from :py:class:`SBFrame` ."
) SBSymbol;
class SBSymbol
{
diff --git a/lldb/bindings/interface/SBSymbolContext.i b/lldb/bindings/interface/SBSymbolContext.i
index b6b336516c94..9818fdb09498 100644
--- a/lldb/bindings/interface/SBSymbolContext.i
+++ b/lldb/bindings/interface/SBSymbolContext.i
@@ -15,7 +15,7 @@ Many debugger functions require a context when doing lookups. This class
provides a common structure that can be used as the result of a query that
can contain a single result.
-For example,
+For example, ::
exe = os.path.join(os.getcwd(), 'a.out')
diff --git a/lldb/bindings/interface/SBSymbolContextList.i b/lldb/bindings/interface/SBSymbolContextList.i
index f5adcfcebfb5..e9d4aa8d62db 100644
--- a/lldb/bindings/interface/SBSymbolContextList.i
+++ b/lldb/bindings/interface/SBSymbolContextList.i
@@ -11,7 +11,7 @@ namespace lldb {
%feature("docstring",
"Represents a list of symbol context object. See also SBSymbolContext.
-For example (from test/python_api/target/TestTargetAPI.py),
+For example (from test/python_api/target/TestTargetAPI.py), ::
def find_functions(self, exe_name):
'''Exercise SBTaget.FindFunctions() API.'''
diff --git a/lldb/bindings/interface/SBTarget.i b/lldb/bindings/interface/SBTarget.i
index 41b9be2bf1fb..3888d5a0dc55 100644
--- a/lldb/bindings/interface/SBTarget.i
+++ b/lldb/bindings/interface/SBTarget.i
@@ -11,40 +11,40 @@ namespace lldb {
%feature("docstring",
"Represents the target program running under the debugger.
-SBTarget supports module, breakpoint, and watchpoint iterations. For example,
+SBTarget supports module, breakpoint, and watchpoint iterations. For example, ::
for m in target.module_iter():
print m
produces:
-(x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out
-(x86_64) /usr/lib/dyld
-(x86_64) /usr/lib/libstdc++.6.dylib
-(x86_64) /usr/lib/libSystem.B.dylib
-(x86_64) /usr/lib/system/libmathCommon.A.dylib
-(x86_64) /usr/lib/libSystem.B.dylib(__commpage)
+ (x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out
+ (x86_64) /usr/lib/dyld
+ (x86_64) /usr/lib/libstdc++.6.dylib
+ (x86_64) /usr/lib/libSystem.B.dylib
+ (x86_64) /usr/lib/system/libmathCommon.A.dylib
+ (x86_64) /usr/lib/libSystem.B.dylib(__commpage)
-and,
+and, ::
for b in target.breakpoint_iter():
print b
-produces:
+produces: ::
-SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
-SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
+ SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
+ SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
-and,
+and, ::
for wp_loc in target.watchpoint_iter():
print wp_loc
-produces:
+produces: ::
-Watchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
- declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
- hw_index = 0 hit_count = 2 ignore_count = 0"
+ Watchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
+ declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
+ hw_index = 0 hit_count = 2 ignore_count = 0"
) SBTarget;
class SBTarget
{
diff --git a/lldb/bindings/interface/SBThread.i b/lldb/bindings/interface/SBThread.i
index 66466b7947fd..463584d2cab1 100644
--- a/lldb/bindings/interface/SBThread.i
+++ b/lldb/bindings/interface/SBThread.i
@@ -9,7 +9,7 @@
namespace lldb {
%feature("docstring",
-"Represents a thread of execution. SBProcess contains SBThread(s).
+"Represents a thread of execution. :py:class:`SBProcess` contains SBThread(s).
SBThreads can be referred to by their ID, which maps to the system specific thread
identifier, or by IndexID. The ID may or may not be unique depending on whether the
@@ -18,7 +18,7 @@ that will always uniquely reference a particular thread, and when that thread go
away it will not be reused.
SBThread supports frame iteration. For example (from test/python_api/
-lldbutil/iter/TestLLDBIterator.py),
+lldbutil/iter/TestLLDBIterator.py), ::
from lldbutil import print_stacktrace
stopped_due_to_breakpoint = False
@@ -35,7 +35,7 @@ lldbutil/iter/TestLLDBIterator.py),
self.assertTrue(stopped_due_to_breakpoint)
-See also SBProcess and SBFrame."
+See also :py:class:`SBFrame` ."
) SBThread;
class SBThread
{
diff --git a/lldb/bindings/interface/SBType.i b/lldb/bindings/interface/SBType.i
index 2d9a4a4d11d1..a6d61bdbb54f 100644
--- a/lldb/bindings/interface/SBType.i
+++ b/lldb/bindings/interface/SBType.i
@@ -111,72 +111,72 @@ protected:
"Represents a data type in lldb. The FindFirstType() method of SBTarget/SBModule
returns a SBType.
-SBType supports the eq/ne operator. For example,
-
-main.cpp:
-
-class Task {
-public:
- int id;
- Task *next;
- Task(int i, Task *n):
- id(i),
- next(n)
- {}
-};
-
-int main (int argc, char const *argv[])
-{
- Task *task_head = new Task(-1, NULL);
- Task *task1 = new Task(1, NULL);
- Task *task2 = new Task(2, NULL);
- Task *task3 = new Task(3, NULL); // Orphaned.
- Task *task4 = new Task(4, NULL);
- Task *task5 = new Task(5, NULL);
-
- task_head->next = task1;
- task1->next = task2;
- task2->next = task4;
- task4->next = task5;
-
- int total = 0;
- Task *t = task_head;
- while (t != NULL) {
- if (t->id >= 0)
- ++total;
- t = t->next;
+SBType supports the eq/ne operator. For example,::
+
+ //main.cpp:
+
+ class Task {
+ public:
+ int id;
+ Task *next;
+ Task(int i, Task *n):
+ id(i),
+ next(n)
+ {}
+ };
+
+ int main (int argc, char const *argv[])
+ {
+ Task *task_head = new Task(-1, NULL);
+ Task *task1 = new Task(1, NULL);
+ Task *task2 = new Task(2, NULL);
+ Task *task3 = new Task(3, NULL); // Orphaned.
+ Task *task4 = new Task(4, NULL);
+ Task *task5 = new Task(5, NULL);
+
+ task_head->next = task1;
+ task1->next = task2;
+ task2->next = task4;
+ task4->next = task5;
+
+ int total = 0;
+ Task *t = task_head;
+ while (t != NULL) {
+ if (t->id >= 0)
+ ++total;
+ t = t->next;
+ }
+ printf('We have a total number of %d tasks\\n', total);
+
+ // This corresponds to an empty task list.
+ Task *empty_task_head = new Task(-1, NULL);
+
+ return 0; // Break at this line
}
- printf('We have a total number of %d tasks\\n', total);
- // This corresponds to an empty task list.
- Task *empty_task_head = new Task(-1, NULL);
+ # find_type.py:
- return 0; // Break at this line
-}
+ # Get the type 'Task'.
+ task_type = target.FindFirstType('Task')
+ self.assertTrue(task_type)
-find_type.py:
+ # Get the variable 'task_head'.
+ frame0.FindVariable('task_head')
+ task_head_type = task_head.GetType()
+ self.assertTrue(task_head_type.IsPointerType())
- # Get the type 'Task'.
- task_type = target.FindFirstType('Task')
- self.assertTrue(task_type)
-
- # Get the variable 'task_head'.
- frame0.FindVariable('task_head')
- task_head_type = task_head.GetType()
- self.assertTrue(task_head_type.IsPointerType())
-
- # task_head_type is 'Task *'.
- task_pointer_type = task_type.GetPointerType()
- self.assertTrue(task_head_type == task_pointer_type)
+ # task_head_type is 'Task *'.
+ task_pointer_type = task_type.GetPointerType()
+ self.assertTrue(task_head_type == task_pointer_type)
- # Get the child mmember 'id' from 'task_head'.
- id = task_head.GetChildMemberWithName('id')
- id_type = id.GetType()
+ # Get the child mmember 'id' from 'task_head'.
+ id = task_head.GetChildMemberWithName('id')
+ id_type = id.GetType()
- # SBType.GetBasicType() takes an enum 'BasicType' (lldb-enumerations.h).
- int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
- # id_type and int_type should be the same type!
- self.assertTrue(id_type == int_type)
+ # SBType.GetBasicType() takes an enum 'BasicType' (lldb-enumerations.h).
+ int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
+ # id_type and int_type should be the same type!
+ self.assertTrue(id_type == int_type)
...") SBType;
class SBType
@@ -339,7 +339,7 @@ public:
return template_args
return None
- module = property(GetModule, None, doc='''A read only property that returns the module in which type is defined.''')
+ module = property(GetModule, None, doc='''A read only property that returns the module in which type is defined.''')
name = property(GetName, None, doc='''A read only property that returns the name for this type as a string.''')
size = property(GetByteSize, None, doc='''A read only property that returns size in bytes for this type as an integer.''')
is_pointer = property(IsPointerType, None, doc='''A read only property that returns a boolean value that indicates if this type is a pointer type.''')
@@ -431,26 +431,28 @@ public:
};
%feature("docstring",
-"Represents a list of SBTypes. The FindTypes() method of SBTarget/SBModule
-returns a SBTypeList.
+"Represents a list of :py:class:`SBType` s. The FindTypes() method of
+:py:class:`SBTarget`/:py:class:`SBModule` returns a SBTypeList.
-SBTypeList supports SBType iteration. For example,
+SBTypeList supports :py:class:`SBType` iteration. For example,
-main.cpp:
+.. code-block:: cpp
-class Task {
-public:
- int id;
- Task *next;
- Task(int i, Task *n):
- id(i),
- next(n)
- {}
-};
+ // main.cpp:
+
+ class Task {
+ public:
+ int id;
+ Task *next;
+ Task(int i, Task *n):
+ id(i),
+ next(n)
+ {}
+ };
-...
+.. code-block:: python
-find_type.py:
+ # find_type.py:
# Get the type 'Task'.
type_list = target.FindTypes('Task')
@@ -459,7 +461,7 @@ find_type.py:
for type in type_list:
# do something with type
-...") SBTypeList;
+") SBTypeList;
class SBTypeList
{
public:
diff --git a/lldb/bindings/interface/SBTypeEnumMember.i b/lldb/bindings/interface/SBTypeEnumMember.i
index 518e2bf90115..e26ac4d00b8c 100644
--- a/lldb/bindings/interface/SBTypeEnumMember.i
+++ b/lldb/bindings/interface/SBTypeEnumMember.i
@@ -75,7 +75,7 @@ protected:
"Represents a list of SBTypeEnumMembers.
SBTypeEnumMemberList supports SBTypeEnumMember iteration.
It also supports [] access either by index, or by enum
-element name by doing:
+element name by doing: ::
myType = target.FindFirstType('MyEnumWithElementA')
members = myType.GetEnumMembers()
@@ -116,7 +116,7 @@ public:
def __len__(self):
'''Return the number of members in a lldb.SBTypeEnumMemberList object.'''
return self.GetSize()
-
+
def __getitem__(self, key):
num_elements = self.GetSize()
if type(key) is int:
@@ -128,7 +128,7 @@ public:
if item.name == key:
return item
return None
- %}
+ %}
#endif
private:
diff --git a/lldb/bindings/interface/SBValue.i b/lldb/bindings/interface/SBValue.i
index fb899805c395..0bf5e4ccc648 100644
--- a/lldb/bindings/interface/SBValue.i
+++ b/lldb/bindings/interface/SBValue.i
@@ -13,7 +13,7 @@ namespace lldb {
SBValue supports iteration through its child, which in turn is represented
as an SBValue. For example, we can get the general purpose registers of a
-frame as an SBValue, and iterate through all the registers,
+frame as an SBValue, and iterate through all the registers,::
registerSet = frame.registers # Returns an SBValueList.
for regs in registerSet:
@@ -25,30 +25,30 @@ frame as an SBValue, and iterate through all the registers,
for reg in GPRs:
print('Name: ', reg.name, ' Value: ', reg.value)
-produces the output:
-
-General Purpose Registers (number of children = 21):
-Name: rax Value: 0x0000000100000c5c
-Name: rbx Value: 0x0000000000000000
-Name: rcx Value: 0x00007fff5fbffec0
-Name: rdx Value: 0x00007fff5fbffeb8
-Name: rdi Value: 0x0000000000000001
-Name: rsi Value: 0x00007fff5fbffea8
-Name: rbp Value: 0x00007fff5fbffe80
-Name: rsp Value: 0x00007fff5fbffe60
-Name: r8 Value: 0x0000000008668682
-Name: r9 Value: 0x0000000000000000
-Name: r10 Value: 0x0000000000001200
-Name: r11 Value: 0x0000000000000206
-Name: r12 Value: 0x0000000000000000
-Name: r13 Value: 0x0000000000000000
-Name: r14 Value: 0x0000000000000000
-Name: r15 Value: 0x0000000000000000
-Name: rip Value: 0x0000000100000dae
-Name: rflags Value: 0x0000000000000206
-Name: cs Value: 0x0000000000000027
-Name: fs Value: 0x0000000000000010
-Name: gs Value: 0x0000000000000048
+produces the output: ::
+
+ General Purpose Registers (number of children = 21):
+ Name: rax Value: 0x0000000100000c5c
+ Name: rbx Value: 0x0000000000000000
+ Name: rcx Value: 0x00007fff5fbffec0
+ Name: rdx Value: 0x00007fff5fbffeb8
+ Name: rdi Value: 0x0000000000000001
+ Name: rsi Value: 0x00007fff5fbffea8
+ Name: rbp Value: 0x00007fff5fbffe80
+ Name: rsp Value: 0x00007fff5fbffe60
+ Name: r8 Value: 0x0000000008668682
+ Name: r9 Value: 0x0000000000000000
+ Name: r10 Value: 0x0000000000001200
+ Name: r11 Value: 0x0000000000000206
+ Name: r12 Value: 0x0000000000000000
+ Name: r13 Value: 0x0000000000000000
+ Name: r14 Value: 0x0000000000000000
+ Name: r15 Value: 0x0000000000000000
+ Name: rip Value: 0x0000000100000dae
+ Name: rflags Value: 0x0000000000000206
+ Name: cs Value: 0x0000000000000027
+ Name: fs Value: 0x0000000000000010
+ Name: gs Value: 0x0000000000000048
See also linked_list_iter() for another perspective on how to iterate through an
SBValue instance which interprets the value object as representing the head of a
diff --git a/lldb/bindings/interface/SBValueList.i b/lldb/bindings/interface/SBValueList.i
index 17ba2056f0c2..76fa937b9876 100644
--- a/lldb/bindings/interface/SBValueList.i
+++ b/lldb/bindings/interface/SBValueList.i
@@ -9,61 +9,62 @@
namespace lldb {
%feature("docstring",
-"Represents a collection of SBValues. Both SBFrame's GetVariables() and
-GetRegisters() return a SBValueList.
-
-SBValueList supports SBValue iteration. For example (from test/lldbutil.py),
-
-def get_registers(frame, kind):
- '''Returns the registers given the frame and the kind of registers desired.
-
- Returns None if there's no such kind.
- '''
- registerSet = frame.GetRegisters() # Return type of SBValueList.
- for value in registerSet:
- if kind.lower() in value.GetName().lower():
- return value
-
- return None
-
-def get_GPRs(frame):
- '''Returns the general purpose registers of the frame as an SBValue.
-
- The returned SBValue object is iterable. An example:
- ...
- from lldbutil import get_GPRs
- regs = get_GPRs(frame)
- for reg in regs:
- print('%s => %s' % (reg.GetName(), reg.GetValue()))
- ...
- '''
- return get_registers(frame, 'general purpose')
-
-def get_FPRs(frame):
- '''Returns the floating point registers of the frame as an SBValue.
-
- The returned SBValue object is iterable. An example:
- ...
- from lldbutil import get_FPRs
- regs = get_FPRs(frame)
- for reg in regs:
- print('%s => %s' % (reg.GetName(), reg.GetValue()))
- ...
- '''
- return get_registers(frame, 'floating point')
-
-def get_ESRs(frame):
- '''Returns the exception state registers of the frame as an SBValue.
-
- The returned SBValue object is iterable. An example:
- ...
- from lldbutil import get_ESRs
- regs = get_ESRs(frame)
- for reg in regs:
- print('%s => %s' % (reg.GetName(), reg.GetValue()))
- ...
- '''
- return get_registers(frame, 'exception state')"
+"Represents a collection of SBValues. Both :py:class:`SBFrame.GetVariables()` and
+:py:class:`SBFrame.GetRegisters()` return a SBValueList.
+
+SBValueList supports :py:class:`SBValue` iteration. For example (from test/lldbutil.py),::
+
+ def get_registers(frame, kind):
+ '''Returns the registers given the frame and the kind of registers desired.
+
+ Returns None if there's no such kind.
+ '''
+ registerSet = frame.GetRegisters() # Return type of SBValueList.
+ for value in registerSet:
+ if kind.lower() in value.GetName().lower():
+ return value
+
+ return None
+
+ def get_GPRs(frame):
+ '''Returns the general purpose registers of the frame as an SBValue.
+
+ The returned SBValue object is iterable. An example:
+ ...
+ from lldbutil import get_GPRs
+ regs = get_GPRs(frame)
+ for reg in regs:
+ print('%s => %s' % (reg.GetName(), reg.GetValue()))
+ ...
+ '''
+ return get_registers(frame, 'general purpose')
+
+ def get_FPRs(frame):
+ '''Returns the floating point registers of the frame as an SBValue.
+
+ The returned SBValue object is iterable. An example:
+ ...
+ from lldbutil import get_FPRs
+ regs = get_FPRs(frame)
+ for reg in regs:
+ print('%s => %s' % (reg.GetName(), reg.GetValue()))
+ ...
+ '''
+ return get_registers(frame, 'floating point')
+
+ def get_ESRs(frame):
+ '''Returns the exception state registers of the frame as an SBValue.
+
+ The returned SBValue object is iterable. An example:
+ ...
+ from lldbutil import get_ESRs
+ regs = get_ESRs(frame)
+ for reg in regs:
+ print('%s => %s' % (reg.GetName(), reg.GetValue()))
+ ...
+ '''
+ return get_registers(frame, 'exception state')
+"
) SBValueList;
class SBValueList
{
diff --git a/lldb/bindings/interface/SBWatchpoint.i b/lldb/bindings/interface/SBWatchpoint.i
index cb0bc5f9859a..ac31c60a5614 100644
--- a/lldb/bindings/interface/SBWatchpoint.i
+++ b/lldb/bindings/interface/SBWatchpoint.i
@@ -14,7 +14,7 @@ namespace lldb {
A watchpoint is determined by the address and the byte size that resulted in
this particular instantiation. Each watchpoint has its settable options.
-See also SBTarget.watchpoint_iter() for example usage of iterating through the
+See also :py:class:`SBTarget.watchpoint_iter()` for example usage of iterating through the
watchpoints of the target."
) SBWatchpoint;
class SBWatchpoint
diff --git a/lldb/bindings/python/python-extensions.swig b/lldb/bindings/python/python-extensions.swig
index 0b23fdd40006..c899768a6fdd 100644
--- a/lldb/bindings/python/python-extensions.swig
+++ b/lldb/bindings/python/python-extensions.swig
@@ -311,19 +311,19 @@ class value_iter(object):
self.length = self.sbvalue.GetNumChildren()
class value(object):
- '''A class designed to wrap lldb.SBValue() objects so the resulting object
+ '''A class designed to wrap :py:class:`SBValue` objects so the resulting object
can be used as a variable would be in code. So if you have a Point structure
variable in your code in the current frame named "pt", you can initialize an instance
- of this class with it:
+ of this class with it: ::
- pt = lldb.value(lldb.frame.FindVariable("pt"))
- print pt
- print pt.x
- print pt.y
+ pt = lldb.value(lldb.frame.FindVariable("pt"))
+ print pt
+ print pt.x
+ print pt.y
- pt = lldb.value(lldb.frame.FindVariable("rectangle_array"))
- print rectangle_array[12]
- print rectangle_array[5].origin.x'''
+ pt = lldb.value(lldb.frame.FindVariable("rectangle_array"))
+ print rectangle_array[12]
+ print rectangle_array[5].origin.x'''
def __init__(self, sbvalue):
self.sbvalue = sbvalue
diff --git a/lldb/bindings/python/python.swig b/lldb/bindings/python/python.swig
index 66a75328d1e7..599699e33c45 100644
--- a/lldb/bindings/python/python.swig
+++ b/lldb/bindings/python/python.swig
@@ -12,23 +12,23 @@
Some of the important classes are described here:
-o SBTarget: Represents the target program running under the debugger.
-o SBProcess: Represents the process associated with the target program.
-o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
-o SBFrame: Represents one of the stack frames associated with a thread. SBThread
- contains SBFrame(s).
-o SBSymbolContext: A container that stores various debugger related info.
-o SBValue: Represents the value of a variable, a register, or an expression.
-o SBModule: Represents an executable image and its associated object and symbol
- files. SBTarget contains SBModule(s).
-o SBBreakpoint: Represents a logical breakpoint and its associated settings.
- SBTarget contains SBBreakpoint(s).
-o SBSymbol: Represents the symbol possibly associated with a stack frame.
-o SBCompileUnit: Represents a compilation unit, or compiled source file.
-o SBFunction: Represents a generic function, which can be inlined or not.
-o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
-o SBLineEntry: Specifies an association with a contiguous range of instructions
- and a source file location. SBCompileUnit contains SBLineEntry(s)."
+* :py:class:`SBTarget`: Represents the target program running under the debugger.
+* :py:class:`SBProcess`: Represents the process associated with the target program.
+* :py:class:`SBThread`: Represents a thread of execution. :py:class:`SBProcess` contains SBThreads.
+* :py:class:`SBFrame`: Represents one of the stack frames associated with a thread. :py:class:`SBThread`
+ contains SBFrame(s).
+* :py:class:`SBSymbolContext`: A container that stores various debugger related info.
+* :py:class:`SBValue`: Represents the value of a variable, a register, or an expression.
+* :py:class:`SBModule`: Represents an executable image and its associated object and symbol
+ files. :py:class:`SBTarget` contains SBModule.
+* :py:class:`SBBreakpoint`: Represents a logical breakpoint and its associated settings.
+ :py:class:`SBTarget` contains SBBreakpoints.
+* :py:class:`SBSymbol`: Represents the symbol possibly associated with a stack frame.
+* :py:class:`SBCompileUnit`: Represents a compilation unit, or compiled source file.
+* :py:class:`SBFunction`: Represents a generic function, which can be inlined or not.
+* :py:class:`SBBlock`: Represents a lexical block. :py:class:`SBFunction` contains SBBlocks.
+* :py:class:`SBLineEntry`: Specifies an association with a contiguous range of instructions
+ and a source file location. :py:class:`SBCompileUnit` contains SBLineEntry."
%enddef
/*
More information about the lldb-commits
mailing list