Module resymgen::data_formats::symgen_yml
source · Expand description
The resymgen
YAML format and associated APIs to integrate with other data formats.
SymGen
represents an entire resymgen
YAML file. Through this type and its methods,
resymgen
files can be read from files, manipulated in various ways, and written to files.
A resymgen
YAML file consists of one or more named Block
s. Each Block
is tagged with
some metadata, and contains two lists of Symbol
s, one for functions and one for data.
A Symbol
represents one or more memory regions containing an identifiable chunk of
instructions or data.
Optionally, each Block
can also contain a list of Subregion
s. A Subregion
represents a nested SymGen
, which has one or more of its own named Block
s, that is
contained within the parent Block
. In a resymgen
YAML file, a Subregion
is
represented as a file name. If the resymgen
YAML file has the file path
/path/to/parent.yml
, and one of its blocks has a subregion with the name sub.yml
, then
this subregion name references a corresponding subregion file (which is itself a resymgen
YAML file) with the file path /path/to/parent/sub.yml
.
Example
main:
versions:
- v1
- v2
address:
v1: 0x2000000
v2: 0x2010000
length:
v1: 0x100000
v2: 0x100000
description: The main memory region
subregions:
- sub1.yml
- sub2.yml
functions:
- name: function1
aliases:
- function1_alias1
- function1_alias2
address:
v1: 0x2001000
v2: 0x2012000
description: |-
multi
line
description
- name: function2
address:
v1:
- 0x2002000
- 0x2003000
v2: 0x2013000
description: simple description
data:
- name: SOME_DATA
address:
v1: 0x2000000
v2: 0x2010000
length:
v1: 0x1000
v2: 0x1600
other:
address: 0x2400000
length: 0x100000
functions: []
data:
- name: OTHER_DATA
address: 0x2400000
Modules
- Utilities for symbol and block bounds checking.
Structs
- A contiguous block of
Symbol
s in aresymgen
symbol table, with some metadata. - A cursor into a
Block
that allows traversal into nested subregions and blocks while keeping track of associated block names and nested file paths. - Parameters to control how data in a foreign format is merged into a
SymGen
. - A serializable string whose sorting order can be controlled dynamically by assigning it an ordinal at runtime.
- A programmatic representation of the
resymgen
YAML format. - A cursor into a
SymGen
that allows traversal into nested blocks and subregions while keeping track of associated nested file paths. - A symbol in a
resymgen
symbol table, with some metadata. - A list of
Symbol
s. - A version of a binary.
- A version-dependent piece of data, which can have potentially different values for different
Version
s.
Enums
- Error encountered while processing a
SymGen
. - Specifies how integers should be formatted during serialization.
- A single scalar value or a collection of multiple values.
- A possibly version-dependent piece of data, which can either be a single scalar value common to all relevant versions, or an explicit
VersionDep<T>
. - Error encountered while merging into a
SymGen
. - Error encountered when resolving a
Subregion
. - Types of symbols within a
SymGen
.
Traits
Generate
implementers can convert aSymGen
into a different data format.- Types that can be sorted.