Skip to content

Commit

Permalink
Docs: Updated
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pedersen <[email protected]>
  • Loading branch information
CTXz committed Jun 23, 2024
1 parent bfd228c commit 7f3c2a1
Show file tree
Hide file tree
Showing 6 changed files with 217 additions and 24 deletions.
84 changes: 82 additions & 2 deletions docs/stm8dce/asm_analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,24 @@ <h2 id="returns">Returns</h2>
<dd>List of matching Function objects.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_analysis.initializers_referencing_external"><code class="name flex">
<span>def <span class="ident">initializers_referencing_external</span></span>(<span>initializers, external_symbol)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns a list of initializer objects referencing an external symbol.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>initializers</code></strong> :&ensp;<code>list</code></dt>
<dd>List of Initializer objects.</dd>
<dt><strong><code>external_symbol</code></strong> :&ensp;<code>str</code></dt>
<dd>Name of the external symbol to match.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list</code></dt>
<dd>List of matching Initializer objects.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_analysis.interrupt_handlers"><code class="name flex">
<span>def <span class="ident">interrupt_handlers</span></span>(<span>functions)</span>
</code></dt>
Expand Down Expand Up @@ -183,8 +201,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<div class="desc"><p>Class to store constant definitions.</p>
<p>Input Attributes:
path (str): Path of the file the constant is defined in.
name (str): Name of the constant.
start_line_number (int): Start line of the constant.
name (str): Name of the constant.
end_line_number (int): End line of the constant.</p>
<p>Generated Attributes:
global_defs (list): List of resolved global definitions associated with the constant (See resolve_globals).</p>
Expand Down Expand Up @@ -236,14 +254,16 @@ <h2 id="args">Args</h2>
<div class="desc"><p>Class to store function definitions.</p>
<p>Input Attributes:
path (str): Path of the file the function is defined in.
name (str): Name of the function.
start_line_number (int): Start line of the function.
name (str): Name of the function.
end_line_number (int): End line of the function.
calls_str (list): List of calls made by the function.
long_read_labels_str (list): List of long read labels.</p>
<p>Generated Attributes:
calls (list): List of resolved functions called by the function (See resolve_calls).
external_calls (list): List of external functions (in rel &amp; lib files) called by the function.
constants (list): List of resolved constants read by the function (See resolve_constants).
external_constants (list): List of external constants (in rel &amp; lib files) read by the function.
global_defs (list): List of resolved global definitions used by the function (See resolve_globals).
fptrs (list): List of resolved function pointers assigned by the function (See resolve_fptrs).
isr_def (IntDef): Resolved interrupt definition associated with the function (See resolve_isr).
Expand Down Expand Up @@ -378,6 +398,55 @@ <h3>Methods</h3>
</dd>
</dl>
</dd>
<dt id="stm8dce.asm_analysis.Initializer"><code class="flex name class">
<span>class <span class="ident">Initializer</span></span>
</code></dt>
<dd>
<div class="desc"><p>Class to store initializer definitions.</p>
<p>Input Attributes:
path (str): Path of the file the initializer is defined in.
start_line_number (int): Start line of the initializer.
name (str): Name of the initializer.
end_line_number (int): End line of the initializer.
pointers_str (list): List of pointers defined by the initializer. Pointers store absolute labels.</p>
<p>Generated Attributes:
pointers (list): List of resolved pointers associated with the initializer (See resolve_pointers).</p>
<p>The intended use of this class is to first parse the input attributes and then call the resolve_* functions</p></div>
<h3>Methods</h3>
<dl>
<dt id="stm8dce.asm_analysis.Initializer.__init__"><code class="name flex">
<span>def <span class="ident">__init__</span></span>(<span>self, path, start_line_number, name)</span>
</code></dt>
<dd>
<div class="desc"><p>Initialize self.
See help(type(self)) for accurate signature.</p></div>
</dd>
<dt id="stm8dce.asm_analysis.Initializer.__repr__"><code class="name flex">
<span>def <span class="ident">__repr__</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Return repr(self).</p></div>
</dd>
<dt id="stm8dce.asm_analysis.Initializer.__str__"><code class="name flex">
<span>def <span class="ident">__str__</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Return str(self).</p></div>
</dd>
<dt id="stm8dce.asm_analysis.Initializer.print"><code class="name flex">
<span>def <span class="ident">print</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Prints the details of the initializer.</p></div>
</dd>
<dt id="stm8dce.asm_analysis.Initializer.resolve_pointers"><code class="name flex">
<span>def <span class="ident">resolve_pointers</span></span>(<span>self, functions, constants)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
</dd>
<dt id="stm8dce.asm_analysis.IntDef"><code class="flex name class">
<span>class <span class="ident">IntDef</span></span>
</code></dt>
Expand Down Expand Up @@ -443,6 +512,7 @@ <h1>Index</h1>
<li><code><a title="stm8dce.asm_analysis.function_by_filename_name" href="#stm8dce.asm_analysis.function_by_filename_name">function_by_filename_name</a></code></li>
<li><code><a title="stm8dce.asm_analysis.functions_by_name" href="#stm8dce.asm_analysis.functions_by_name">functions_by_name</a></code></li>
<li><code><a title="stm8dce.asm_analysis.functions_referencing_external" href="#stm8dce.asm_analysis.functions_referencing_external">functions_referencing_external</a></code></li>
<li><code><a title="stm8dce.asm_analysis.initializers_referencing_external" href="#stm8dce.asm_analysis.initializers_referencing_external">initializers_referencing_external</a></code></li>
<li><code><a title="stm8dce.asm_analysis.interrupt_handlers" href="#stm8dce.asm_analysis.interrupt_handlers">interrupt_handlers</a></code></li>
<li><code><a title="stm8dce.asm_analysis.traverse_calls" href="#stm8dce.asm_analysis.traverse_calls">traverse_calls</a></code></li>
</ul>
Expand Down Expand Up @@ -483,6 +553,16 @@ <h4><code><a title="stm8dce.asm_analysis.GlobalDef" href="#stm8dce.asm_analysis.
</ul>
</li>
<li>
<h4><code><a title="stm8dce.asm_analysis.Initializer" href="#stm8dce.asm_analysis.Initializer">Initializer</a></code></h4>
<ul class="">
<li><code><a title="stm8dce.asm_analysis.Initializer.__init__" href="#stm8dce.asm_analysis.Initializer.__init__">__init__</a></code></li>
<li><code><a title="stm8dce.asm_analysis.Initializer.__repr__" href="#stm8dce.asm_analysis.Initializer.__repr__">__repr__</a></code></li>
<li><code><a title="stm8dce.asm_analysis.Initializer.__str__" href="#stm8dce.asm_analysis.Initializer.__str__">__str__</a></code></li>
<li><code><a title="stm8dce.asm_analysis.Initializer.print" href="#stm8dce.asm_analysis.Initializer.print">print</a></code></li>
<li><code><a title="stm8dce.asm_analysis.Initializer.resolve_pointers" href="#stm8dce.asm_analysis.Initializer.resolve_pointers">resolve_pointers</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="stm8dce.asm_analysis.IntDef" href="#stm8dce.asm_analysis.IntDef">IntDef</a></code></h4>
<ul class="">
<li><code><a title="stm8dce.asm_analysis.IntDef.__init__" href="#stm8dce.asm_analysis.IntDef.__init__">__init__</a></code></li>
Expand Down
53 changes: 41 additions & 12 deletions docs/stm8dce/asm_matchers.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<title>stm8dce.asm_matchers API documentation</title>
<meta name="description" content="This module provides functions to pattern match STM8 SDCC generated assembly code." />
<meta name="description" content="This module provides classes and functions to pattern match STM8 SDCC generated assembly code." />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
Expand All @@ -22,7 +22,7 @@
<h1 class="title">Module <code>stm8dce.asm_matchers</code></h1>
</header>
<section id="section-intro">
<p>This module provides functions to pattern match STM8 SDCC generated assembly code.</p>
<p>This module provides classes and functions to pattern match STM8 SDCC generated assembly code.</p>
</section>
<section>
</section>
Expand Down Expand Up @@ -81,7 +81,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<span>(</span><span>*args, **kwds)</span>
</code></dt>
<dd>
<div class="desc"><p>Enum to represent different types of areas in assembly code.</p></div>
<div class="desc"><p>Enum to represent relevant types of areas in assembly code.</p></div>
<h3>Ancestors</h3>
<ul class="hlist">
<li>enum.Enum</li>
Expand Down Expand Up @@ -180,21 +180,37 @@ <h2 id="args">Args</h2>
<h3>Static methods</h3>
<dl>
<dt id="stm8dce.asm_matchers.Directive.is_area_directive"><code class="name flex">
<span>def <span class="ident">is_area_directive</span></span>(<span>eval, area_type=None)</span>
<span>def <span class="ident">is_area_directive</span></span>(<span>eval, area_name=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Static method to check if an instance is a Directive and is an area directive.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>eval</code></strong></dt>
<dd>The instance to check.</dd>
<dt><strong><code>area_type</code></strong> :&ensp;<code><a title="stm8dce.asm_matchers.AreaType" href="#stm8dce.asm_matchers.AreaType">AreaType</a></code>, optional</dt>
<dd>The area type to check for.</dd>
<dt><strong><code>area_name</code></strong> :&ensp;<code>str</code>, optional</dt>
<dd>The area to check for.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>bool</code></dt>
<dd>True if the instance is a Directive and is an area directive (and matches the area type, if provided), False otherwise.</dd>
<dd>True if the instance is a Directive and is an area directive (and matches the area, if provided), False otherwise.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_matchers.Directive.is_dw_directive"><code class="name flex">
<span>def <span class="ident">is_dw_directive</span></span>(<span>eval)</span>
</code></dt>
<dd>
<div class="desc"><p>Static method to check if an instance is a Directive and is a .dw directive.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>eval</code></strong></dt>
<dd>The instance to check.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>bool</code></dt>
<dd>True if the instance is a Directive and is a .dw directive, False otherwise.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_matchers.Directive.is_global_directive"><code class="name flex">
Expand Down Expand Up @@ -244,19 +260,30 @@ <h2 id="args">Args</h2>
<div class="desc"><p>Return str(self).</p></div>
</dd>
<dt id="stm8dce.asm_matchers.Directive.is_area"><code class="name flex">
<span>def <span class="ident">is_area</span></span>(<span>self, area_type=None)</span>
<span>def <span class="ident">is_area</span></span>(<span>self, area_name=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if the directive is an area directive, optionally of a specific area type.</p>
<div class="desc"><p>Checks if the directive is an area directive, optionally of a specific area.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>area_type</code></strong> :&ensp;<code><a title="stm8dce.asm_matchers.AreaType" href="#stm8dce.asm_matchers.AreaType">AreaType</a></code>, optional</dt>
<dd>The area type to check for.</dd>
<dt><strong><code>area_name</code></strong> :&ensp;<code>str</code>, optional</dt>
<dd>The area to check for.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>bool</code></dt>
<dd>True if the directive is an area directive (and matches the area type, if provided), False otherwise.</dd>
<dd>True if the directive is an area directive (and matches the area, if provided), False otherwise.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_matchers.Directive.is_dw"><code class="name flex">
<span>def <span class="ident">is_dw</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Checks if the directive is a .dw directive.</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>bool</code></dt>
<dd>True if the directive is a .dw directive, False otherwise.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_matchers.Directive.is_global"><code class="name flex">
Expand Down Expand Up @@ -638,6 +665,8 @@ <h4><code><a title="stm8dce.asm_matchers.Directive" href="#stm8dce.asm_matchers.
<li><code><a title="stm8dce.asm_matchers.Directive.__str__" href="#stm8dce.asm_matchers.Directive.__str__">__str__</a></code></li>
<li><code><a title="stm8dce.asm_matchers.Directive.is_area" href="#stm8dce.asm_matchers.Directive.is_area">is_area</a></code></li>
<li><code><a title="stm8dce.asm_matchers.Directive.is_area_directive" href="#stm8dce.asm_matchers.Directive.is_area_directive">is_area_directive</a></code></li>
<li><code><a title="stm8dce.asm_matchers.Directive.is_dw" href="#stm8dce.asm_matchers.Directive.is_dw">is_dw</a></code></li>
<li><code><a title="stm8dce.asm_matchers.Directive.is_dw_directive" href="#stm8dce.asm_matchers.Directive.is_dw_directive">is_dw_directive</a></code></li>
<li><code><a title="stm8dce.asm_matchers.Directive.is_global" href="#stm8dce.asm_matchers.Directive.is_global">is_global</a></code></li>
<li><code><a title="stm8dce.asm_matchers.Directive.is_global_directive" href="#stm8dce.asm_matchers.Directive.is_global_directive">is_global_directive</a></code></li>
</ul>
Expand Down
24 changes: 24 additions & 0 deletions docs/stm8dce/asm_parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ <h2 id="args">Args</h2>
<dd>The label indicating the start of the function.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_parser.ASMParser._parse_initializer"><code class="name flex">
<span>def <span class="ident">_parse_initializer</span></span>(<span>self, label)</span>
</code></dt>
<dd>
<div class="desc"><p>Parses an initializer and extracts relevant information.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>label</code></strong> :&ensp;<code>Label</code></dt>
<dd>The label indicating the start of the initializer.</dd>
</dl></div>
</dd>
<dt id="stm8dce.asm_parser.ASMParser._parse_initializer_section"><code class="name flex">
<span>def <span class="ident">_parse_initializer_section</span></span>(<span>self, area)</span>
</code></dt>
<dd>
<div class="desc"><p>Parses the initializer section of the file.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>area</code></strong> :&ensp;<code>Directive</code></dt>
<dd>The directive indicating the start of the initializer section.</dd>
</dl></div>
</dd>
</dl>
</dd>
</dl>
Expand Down Expand Up @@ -146,6 +168,8 @@ <h4><code><a title="stm8dce.asm_parser.ASMParser" href="#stm8dce.asm_parser.ASMP
<li><code><a title="stm8dce.asm_parser.ASMParser._parse_const_section" href="#stm8dce.asm_parser.ASMParser._parse_const_section">_parse_const_section</a></code></li>
<li><code><a title="stm8dce.asm_parser.ASMParser._parse_constant" href="#stm8dce.asm_parser.ASMParser._parse_constant">_parse_constant</a></code></li>
<li><code><a title="stm8dce.asm_parser.ASMParser._parse_function" href="#stm8dce.asm_parser.ASMParser._parse_function">_parse_function</a></code></li>
<li><code><a title="stm8dce.asm_parser.ASMParser._parse_initializer" href="#stm8dce.asm_parser.ASMParser._parse_initializer">_parse_initializer</a></code></li>
<li><code><a title="stm8dce.asm_parser.ASMParser._parse_initializer_section" href="#stm8dce.asm_parser.ASMParser._parse_initializer_section">_parse_initializer_section</a></code></li>
</ul>
</li>
</ul>
Expand Down
6 changes: 3 additions & 3 deletions docs/stm8dce/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
</dd>
<dt><code class="name"><a title="stm8dce.asm_matchers" href="asm_matchers.html">stm8dce.asm_matchers</a></code></dt>
<dd>
<div class="desc"><p>This module provides functions to pattern match STM8 SDCC generated assembly code.</p></div>
<div class="desc"><p>This module provides classes and functions to pattern match STM8 SDCC generated assembly code.</p></div>
</dd>
<dt><code class="name"><a title="stm8dce.asm_parser" href="asm_parser.html">stm8dce.asm_parser</a></code></dt>
<dd>
Expand All @@ -49,8 +49,8 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
</dd>
<dt><code class="name"><a title="stm8dce.rel_matchers" href="rel_matchers.html">stm8dce.rel_matchers</a></code></dt>
<dd>
<div class="desc"><p>This module provides functions to pattern match STM8 SDCC generated .rel and .lib files.
For more information on the STM8 .rel and .lib file formats, </p></div>
<div class="desc"><p>This module provides classes and function to pattern match STM8 SDCC generated .rel and .lib files.
For more information on the STM8 .rel and .lib …</p></div>
</dd>
<dt><code class="name"><a title="stm8dce.rel_parser" href="rel_parser.html">stm8dce.rel_parser</a></code></dt>
<dd>
Expand Down
Loading

0 comments on commit 7f3c2a1

Please sign in to comment.