From 5b1c281fca01373c95d9ddf59bdb59e9ae2ae4ff Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Thu, 6 Mar 2025 18:57:54 -0800 Subject: [PATCH] [LLDB][Docstrings] Fix some poorly formatted Docstrings (#129605) I was looking earlier on the public doc website, and noticed the markdown was very badly mangled for this recent docstring that I added. So I'm dropping the backticks and just leaving the snippet. ![image](https://github.com/user-attachments/assets/de63ab73-3bd5-4f8f-a07c-9f6accfee7e1) --- lldb/bindings/interface/SBProcessDocstrings.i | 6 +++--- lldb/bindings/interface/SBProgressDocstrings.i | 4 ++-- lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i | 9 +++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lldb/bindings/interface/SBProcessDocstrings.i b/lldb/bindings/interface/SBProcessDocstrings.i index b5b22052a609..2438a6bfc124 100644 --- a/lldb/bindings/interface/SBProcessDocstrings.i +++ b/lldb/bindings/interface/SBProcessDocstrings.i @@ -260,12 +260,12 @@ SBProcess supports thread iteration. For example (from test/lldbutil.py), :: ) lldb::SBProcess::DeallocateMemory; %feature("docstring", " - Get a list of all the memory regions associated with this process. - ``` + Get a list of all the memory regions associated with this process. :: + readable_regions = [] for region in process.GetMemoryRegions(): if region.IsReadable(): readable_regions.append(region) - ``` + " ) lldb::SBProcess::GetMemoryRegions; diff --git a/lldb/bindings/interface/SBProgressDocstrings.i b/lldb/bindings/interface/SBProgressDocstrings.i index 7b7e1dc79187..8d252ef1f370 100644 --- a/lldb/bindings/interface/SBProgressDocstrings.i +++ b/lldb/bindings/interface/SBProgressDocstrings.i @@ -23,7 +23,7 @@ specify a new detail. Some implementations differ on throttling updates and this if the progress is deterministic or non-deterministic. For DAP, non-deterministic update messages have a higher throttling rate than deterministic ones. -Below are examples in Python for deterministic and non-deterministic progresses. +Below are examples in Python for deterministic and non-deterministic progresses. :: deterministic_progress1 = lldb.SBProgress('Deterministic Progress', 'Detail', 3, lldb.SBDebugger) for i in range(3): @@ -44,7 +44,7 @@ If you don't call Finalize() when the progress is not done, the progress object garbage collected by the Python runtime, the end event will eventually get sent, but it is best not to rely on the garbage collection when using lldb.SBProgress. -Non-deterministic progresses behave the same, but omit the total in the constructor. +Non-deterministic progresses behave the same, but omit the total in the constructor. :: non_deterministic_progress = lldb.SBProgress('Non deterministic progress, 'Detail', lldb.SBDebugger) for i in range(10): diff --git a/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i b/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i index 08bbdf89d68d..6efbe45d2d3a 100644 --- a/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i +++ b/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i @@ -4,16 +4,13 @@ SBSaveCoreOptions includes API's to specify the memory regions and threads to include when generating a core file. It extends the existing SaveCoreStyle option. -* eSaveCoreFull will save off all thread and memory regions, ignoring the memory regions and threads in -the options object. +* eSaveCoreFull will save off all thread and memory regions, ignoring the memory regions and threads in the options object. -* eSaveCoreDirtyOnly pages will capture all threads and all rw- memory regions, in addition to the regions specified -in the options object if they are not already captured. +* eSaveCoreDirtyOnly pages will capture all threads and all rw- memory regions, in addition to the regions specified in the options object if they are not already captured. * eSaveCoreStackOnly will capture all threads, but no memory regions unless specified. -* eSaveCoreCustomOnly Custom defers entirely to the SBSaveCoreOptions object and will only save what is specified. - Picking custom and specifying nothing will result in an error being returned. +* eSaveCoreCustomOnly Custom defers entirely to the SBSaveCoreOptions object and will only save what is specified. Picking custom and specifying nothing will result in an error being returned. Note that currently ELF Core files are not supported." ) lldb::SBSaveCoreOptions;