Skip to content

Commit 4017c6f

Browse files
committed
[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).
1 parent c77c3d1 commit 4017c6f

35 files changed

+338
-332
lines changed

lldb/bindings/interface/SBAddress.i

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ libraries, bundles, frameworks) being loaded at different
1717
addresses than the addresses found in the object file that
1818
represents them on disk. There are currently two types of addresses
1919
for a section:
20-
o file addresses
21-
o load addresses
20+
21+
* file addresses
22+
* load addresses
2223
2324
File addresses represents the virtual addresses that are in the 'on
2425
disk' object files. These virtual addresses are converted to be

lldb/bindings/interface/SBBreakpoint.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace lldb {
1111
"Represents a logical breakpoint and its associated settings.
1212
1313
For example (from test/functionalities/breakpoint/breakpoint_ignore_count/
14-
TestBreakpointIgnoreCount.py),
14+
TestBreakpointIgnoreCount.py),::
1515
1616
def breakpoint_ignore_count_python(self):
1717
'''Use Python APIs to set breakpoint ignore count.'''
@@ -62,13 +62,13 @@ TestBreakpointIgnoreCount.py),
6262
6363
process.Continue()
6464
65-
SBBreakpoint supports breakpoint location iteration, for example,
65+
SBBreakpoint supports breakpoint location iteration, for example,::
6666
6767
for bl in breakpoint:
6868
print('breakpoint location load addr: %s' % hex(bl.GetLoadAddress()))
6969
print('breakpoint location condition: %s' % hex(bl.GetCondition()))
7070
71-
and rich comparison methods which allow the API program to use,
71+
and rich comparison methods which allow the API program to use,::
7272
7373
if aBreakpoint == bBreakpoint:
7474
...
@@ -102,7 +102,7 @@ public:
102102

103103
lldb::SBTarget
104104
GetTarget() const;
105-
105+
106106
lldb::SBBreakpointLocation
107107
FindLocationByAddress (lldb::addr_t vm_addr);
108108

lldb/bindings/interface/SBBreakpointLocation.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A breakpoint location is defined by the breakpoint that produces it,
1515
and the address that resulted in this particular instantiation.
1616
Each breakpoint location has its settable options.
1717
18-
SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
18+
:py:class:`SBBreakpoint` contains SBBreakpointLocation(s). See docstring of SBBreakpoint
1919
for retrieval of an SBBreakpointLocation from an SBBreakpoint."
2020
) SBBreakpointLocation;
2121
class SBBreakpointLocation

lldb/bindings/interface/SBBreakpointName.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
namespace lldb {
1010
%feature("docstring",
11-
"Represents a breakpoint name registered in a given SBTarget.
11+
"Represents a breakpoint name registered in a given :py:class:`SBTarget`.
1212
1313
Breakpoint names provide a way to act on groups of breakpoints. When you add a
1414
name to a group of breakpoints, you can then use the name in all the command
1515
line lldb commands for that name. You can also configure the SBBreakpointName
16-
options and those options will be propagated to any SBBreakpoints currently
16+
options and those options will be propagated to any :py:class:`SBBreakpoint` s currently
1717
using that name. Adding a name to a breakpoint will also apply any of the
1818
set options to that breakpoint.
1919

lldb/bindings/interface/SBCommandInterpreter.i

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
namespace lldb {
1010

1111
%feature("docstring",
12-
"SBCommandInterpreter handles/interprets commands for lldb. You get the
13-
command interpreter from the SBDebugger instance. For example (from test/
14-
python_api/interpreter/TestCommandInterpreterAPI.py),
12+
"SBCommandInterpreter handles/interprets commands for lldb.
13+
14+
You get the command interpreter from the :py:class:`SBDebugger` instance.
15+
16+
For example (from test/ python_api/interpreter/TestCommandInterpreterAPI.py),::
1517
1618
def command_interpreter_api(self):
1719
'''Test the SBCommandInterpreter APIs.'''

lldb/bindings/interface/SBCommandInterpreterRunOptions.i

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ namespace lldb {
1010

1111
%feature("docstring",
1212
"SBCommandInterpreterRunOptions controls how the RunCommandInterpreter runs the code it is fed.
13+
1314
A default SBCommandInterpreterRunOptions object has:
14-
StopOnContinue: false
15-
StopOnError: false
16-
StopOnCrash: false
17-
EchoCommands: true
18-
PrintResults: true
19-
AddToHistory: true
15+
* StopOnContinue: false
16+
* StopOnError: false
17+
* StopOnCrash: false
18+
* EchoCommands: true
19+
* PrintResults: true
20+
* AddToHistory: true
2021
2122
") SBCommandInterpreterRunOptions;
2223
class SBCommandInterpreterRunOptions

lldb/bindings/interface/SBCommandReturnObject.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ namespace lldb {
1010

1111
%feature("docstring",
1212
"Represents a container which holds the result from command execution.
13-
It works with SBCommandInterpreter.HandleCommand() to encapsulate the result
13+
It works with :py:class:`SBCommandInterpreter.HandleCommand()` to encapsulate the result
1414
of command execution.
1515
16-
See SBCommandInterpreter for example usage of SBCommandReturnObject."
16+
See :py:class:`SBCommandInterpreter` for example usage of SBCommandReturnObject."
1717
) SBCommandReturnObject;
1818
class SBCommandReturnObject
1919
{

lldb/bindings/interface/SBCompileUnit.i

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace lldb {
1111
%feature("docstring",
1212
"Represents a compilation unit, or compiled source file.
1313
14-
SBCompileUnit supports line entry iteration. For example,
14+
SBCompileUnit supports line entry iteration. For example,::
1515
1616
# Now get the SBSymbolContext from this frame. We want everything. :-)
1717
context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
@@ -25,23 +25,23 @@ SBCompileUnit supports line entry iteration. For example,
2525
print('start addr: %s' % str(lineEntry.GetStartAddress()))
2626
print('end addr: %s' % str(lineEntry.GetEndAddress()))
2727
28-
produces:
29-
30-
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
31-
start addr: a.out[0x100000d98]
32-
end addr: a.out[0x100000da3]
33-
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
34-
start addr: a.out[0x100000da3]
35-
end addr: a.out[0x100000da9]
36-
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
37-
start addr: a.out[0x100000da9]
38-
end addr: a.out[0x100000db6]
39-
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
40-
start addr: a.out[0x100000db6]
41-
end addr: a.out[0x100000dbc]
42-
...
43-
44-
See also SBSymbolContext and SBLineEntry"
28+
produces: ::
29+
30+
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
31+
start addr: a.out[0x100000d98]
32+
end addr: a.out[0x100000da3]
33+
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
34+
start addr: a.out[0x100000da3]
35+
end addr: a.out[0x100000da9]
36+
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
37+
start addr: a.out[0x100000da9]
38+
end addr: a.out[0x100000db6]
39+
line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
40+
start addr: a.out[0x100000db6]
41+
end addr: a.out[0x100000dbc]
42+
...
43+
44+
See also :py:class:`SBSymbolContext` and :py:class:`SBLineEntry`"
4545
) SBCompileUnit;
4646
class SBCompileUnit
4747
{

lldb/bindings/interface/SBEnvironment.i

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ namespace lldb {
1111
%feature("docstring",
1212
"Represents the environment of a certain process.
1313
14-
Example:
14+
Example: ::
15+
1516
for entry in lldb.debugger.GetSelectedTarget().GetEnvironment().GetEntries():
1617
print(entry)
1718

lldb/bindings/interface/SBError.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace lldb {
1111
%feature("docstring",
1212
"Represents a container for holding any error code.
1313
14-
For example (from test/python_api/hello_world/TestHelloWorld.py),
14+
For example (from test/python_api/hello_world/TestHelloWorld.py), ::
1515
1616
def hello_world_attach_with_id_api(self):
1717
'''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),
4545
checks that after the attach, there is no error condition by asserting
4646
that error.Success() is True and we get back a valid process object.
4747
48-
And (from test/python_api/event/TestEvent.py),
48+
And (from test/python_api/event/TestEvent.py), ::
4949
5050
# Now launch the process, and do not stop at entry point.
5151
error = lldb.SBError()

0 commit comments

Comments
 (0)