Skip to content

Commit d6a6da9

Browse files
[llvm-debuginfo-analyzer][DOC] Convert 'README.txt' to markdown.
As part of the WebAssembly support work llvm#85566 The README.txt is a bit odd since it only lists issues and problems without talking about what works. It’s also hard to read on the GitHub web view. - Use monospace instead of emphasis style.
1 parent c5a744f commit d6a6da9

File tree

1 file changed

+63
-64
lines changed

1 file changed

+63
-64
lines changed
Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,116 @@
1-
# llvm-debuginfo-analyzer
1+
# `llvm-debuginfo-analyzer`
22

33
These are the notes collected during the development, review and test.
4-
They describe limitations, know issues and future work.
4+
They describe limitations, known issues and future work.
55

6-
### Remove the use of macros in *LVReader.h* that describe the *bumpallocators*.
6+
### Remove the use of macros in ``LVReader.h`` that describe the ``bumpallocators``.
77
**[D137933](https://reviews.llvm.org/D137933#inline-1389904)**
88

9-
Use a standard (or LLVM) **map** with **typeinfo** (would need a specialization
9+
Use a standard (or LLVM) ``map`` with ``typeinfo`` (would need a specialization
1010
to expose equality and hasher) for the allocators and the creation
1111
functions could be a function template.
1212

13-
.. _lit-test-label:
14-
### Use a *lit test* instead of a *unit test* for the *logical readers*.
13+
### Use a ``lit test`` instead of a ``unit test`` for the ``logical readers``.
1514
**[D125783](https://reviews.llvm.org/D125783#inline-1324376)**
1615

17-
As the **DebugInfoLogicalView** library is sufficiently exposed via the
18-
**llvm-debuginfo-analyzer** tool, follow the LLVM general approach and
19-
use **LIT** tests to validate the **logical readers**.
16+
As the ``DebugInfoLogicalView`` library is sufficiently exposed via the
17+
``llvm-debuginfo-analyzer`` tool, follow the LLVM general approach and
18+
use ``LIT`` tests to validate the ``logical readers``.
2019

21-
Convert the **unitests**:
20+
Convert the ``unitests``:
2221
```
2322
llvm-project/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
2423
llvm-project/llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
2524
```
26-
into **LIT tests**:
25+
into ``LIT tests``:
2726
```
2827
llvm-project/llvm/test/DebugInfo/LogicalView/CodeViewReader.test
2928
llvm-project/llvm/test/DebugInfo/LogicalView/DWARFReader.test
3029
```
3130

32-
### Eliminate calls to *getInputFileDirectory()* in the unit tests.
31+
### Eliminate calls to ``getInputFileDirectory()`` in the unit tests.
3332
**[D125783](https://reviews.llvm.org/D125783#inline-1324359)**
3433

35-
Rewrite the unittests **ReaderTest** and **CodeViewReaderTest** to eliminate
34+
Rewrite the unittests ``ReaderTest`` and ``CodeViewReaderTest`` to eliminate
3635
the call:
3736
```
3837
getInputFileDirectory()
3938
```
4039
as use of that call is discouraged.
4140

42-
### Fix mismatch between *%d/%x* format strings and *uint64_t* type.
41+
### Fix mismatch between ``%d/%x`` format strings and ``uint64_t`` type.
4342
**[D137400](https://reviews.llvm.org/D137400) / [58758](https://github.com/llvm/llvm-project/issues/58758)**
4443

45-
Incorrect printing of **uint64_t** on **32-bit** platforms.
46-
Add the **PRIx64** specifier to the printing code (**format()**).
44+
Incorrect printing of ``uint64_t`` on ``32-bit`` platforms.
45+
Add the ``PRIx64`` specifier to the printing code (``format()``).
4746

48-
### Remove *LVScope::Children* container.
47+
### Remove ``LVScope::Children`` container.
4948
**[D137933](https://reviews.llvm.org/D137933#inline-1373902)**
5049

51-
Use a **chaining iterator** over the other containers rather than keep a
52-
separate container **Children** that mirrors their contents.
50+
Use a ``chaining iterator`` over the other containers rather than keep a
51+
separate container ``Children`` that mirrors their contents.
5352

54-
### Use *TableGen* for command line options.
53+
### Use ``TableGen`` for command line options.
5554
**[D125777](https://reviews.llvm.org/D125777#inline-1291801)**
5655

57-
The current trend is to use **TableGen** for command-line options in tools.
58-
Change command line options to use **tablegen** as many other LLVM tools.
56+
The current trend is to use ``TableGen`` for command-line options in tools.
57+
Change command line options to use ``tablegen`` as many other LLVM tools.
5958

60-
### *LVDoubleMap* to return *optional\<ValueType\>* instead of null pointer.
59+
### ``LVDoubleMap`` to return ``optional<ValueType>`` instead of ``null pointer``.
6160
**[D125783](https://reviews.llvm.org/D125783#inline-1294164)**
6261

63-
The more idiomatic LLVM way to handle this would be to have **find**
64-
return **Optional\<ValueType\>**.
62+
The more idiomatic LLVM way to handle this would be to have ``find``
63+
return ``Optional<ValueType>``.
6564

66-
### Pass references instead of pointers (*Comparison functions*).
65+
### Pass references instead of pointers (``Comparison functions``).
6766
**[D125782](https://reviews.llvm.org/D125782#inline-1293920)**
6867

69-
In the **comparison functions**, pass references instead of pointers (when
68+
In the ``comparison functions``, pass references instead of pointers (when
7069
pointers cannot be null).
7170

72-
### Use *StringMap* where possible.
71+
### Use ``StringMap`` where possible.
7372
**[D125783](https://reviews.llvm.org/D125783#inline-1294211)**
7473

75-
LLVM has a **StringMap** class that is advertised as more efficient than
76-
**std::map\<std::string, ValueType\>**. Mainly it does fewer allocations
77-
because the key is not a **std::string**.
74+
LLVM has a ``StringMap`` class that is advertised as more efficient than
75+
``std::map<std::string, ValueType>``. Mainly it does fewer allocations
76+
because the key is not a ``std::string``.
7877

79-
Replace the use of **std::map\<std::string, ValueType\>** with **StringMap**.
80-
One specific case is the **LVSymbolNames** definitions.
78+
Replace the use of ``std::map<std::string, ValueType>`` with ``StringMap``.
79+
One specific case is the ``LVSymbolNames`` definitions.
8180

82-
### Calculate unique offset for *CodeView* elements.
83-
In order to have the same logical functionality as the **DWARF Reader**, such
81+
### Calculate unique offset for ``CodeView`` elements.
82+
In order to have the same logical functionality as the ``DWARF`` reader, such
8483
as:
8584

8685
* find scopes contribution to debug info
8786
* sort by its physical location
8887

89-
The logical elements must have an unique offset (similar like the **DWARF
90-
DIE offset**).
88+
The logical elements must have an unique offset (similar like the ``DWARF
89+
DIE offset``).
9190

92-
### Move *initializeFileAndStringTables* to the COFF Library.
93-
There is some code in the CodeView reader that was extracted/adapted
94-
from **tools/llvm-readobj/COFFDumper.cpp** that can be moved to the **COFF**
91+
### Move ``initializeFileAndStringTables`` to the ``CodeView`` Library.
92+
There is some code in the ``CodeView`` reader that was extracted/adapted
93+
from ``tools/llvm-readobj/COFFDumper.cpp`` that can be moved to the ``CodeView``
9594
library.
9695

97-
We had a similar case with code shared with llvm-pdbutil that was moved
98-
to the PDB library: **[D122226](https://reviews.llvm.org/D122226)**
96+
We had a similar case with code shared with ``llvm-pdbutil`` that was moved
97+
to the ``PDB`` library: **[D122226](https://reviews.llvm.org/D122226)**
9998

100-
### Move *getSymbolKindName* and *formatRegisterId* to the CodeView Library.
101-
There is some code in the CodeView reader that was extracted/adapted
102-
from **lib/DebugInfo/CodeView/SymbolDumper.cpp** that can be used.
99+
### Move ``getSymbolKindName`` and ``formatRegisterId`` to the ``CodeView`` Library.
100+
There is some code in the ``CodeView`` reader that was extracted/adapted
101+
from ``lib/DebugInfo/CodeView/SymbolDumper.cpp`` that can be used.
103102

104-
### Use of *std::unordered_set* instead of *std::set*.
103+
### Use of ``std::unordered_set`` instead of ``std::set``.
105104
**[D125784](https://reviews.llvm.org/D125784#inline-1221421)**
106105

107-
Replace the **std::set** usage for **DeducedScopes**, **UnresolvedScopes** and
108-
**IdentifiedNamespaces** with **std::unordered_set** and get the benefit
106+
Replace the ``std::set`` usage for ``DeducedScopes``, ``UnresolvedScopes`` and
107+
``IdentifiedNamespaces`` with ``std::unordered_set`` and get the benefit
109108
of the O(1) while inserting/searching, as the order is not important.
110109

111-
### Optimize *LVNamespaceDeduction::find* funtion.
110+
### Optimize ``LVNamespaceDeduction::find`` funtion.
112111
**[D125784](https://reviews.llvm.org/D125784#inline-1296195)**
113112

114-
Optimize the **find** method to use the proposed code:
113+
Optimize the ``find`` method to use the proposed code:
115114

116115
```
117116
LVStringRefs::iterator Iter = std::find_if(Components.begin(), Components.end(),
@@ -125,47 +124,47 @@ Optimize the **find** method to use the proposed code:
125124
Factor out printing functionality from the logical elements into a
126125
common module.
127126

128-
### Refactor *LVBinaryReader::processLines*.
127+
### Refactor ``LVBinaryReader::processLines``.
129128
**[D125783](https://reviews.llvm.org/D125783#inline-1246155) /
130129
[D137156](https://reviews.llvm.org/D137156)**
131130

132131
During the traversal of the debug information sections, we created the
133-
logical lines representing the **disassembled instructions** from the **text
134-
section** and the logical lines representing the **line records** from the
135-
**debug line** section. Using the ranges associated with the logical scopes,
132+
logical lines representing the ``disassembled instructions`` from the ``text
133+
section`` and the logical lines representing the ``line records`` from the
134+
``debug line`` section. Using the ranges associated with the logical scopes,
136135
we will allocate those logical lines to their logical scopes.
137136

138137
Consider the case when any of those lines become orphans, causing
139138
incorrect scope parent for disassembly or line records.
140139

141-
### Add support for *-ffunction-sections*.
140+
### Add support for ``-ffunction-sections``.
142141
**[D125783](https://reviews.llvm.org/D125783#inline-1295012)**
143142

144143
Only linked executables are handled. It does not support relocatable
145-
files compiled with **-ffunction-sections**.
144+
files compiled with ``-ffunction-sections``.
146145

147146
### Add support for DWARF v5 .debug_names section / CodeView public symbols stream.
148147
**[D125783](https://reviews.llvm.org/D125783#inline-1294142)**
149148

150-
The **DWARF** and **CodeView** readers use the public names information to create
151-
the instructions (**LVLineAssembler**). Instead of relying on **DWARF** section
152-
names (**.debug_pubnames**, **.debug_names**) and **CodeView** **public symbol** stream
153-
(**S_PUB32**), the readers should collect the needed information while processing
149+
The ``DWARF`` and ``CodeView`` readers use the public names information to create
150+
the instructions (``LVLineAssembler``). Instead of relying on ``DWARF`` section
151+
names (``.debug_pubnames``, ``.debug_names``) and ``CodeView`` ``public symbol`` stream
152+
(``S_PUB32``), the readers should collect the needed information while processing
154153
the debug information.
155154

156155
If the object file supports the above section names and stream, use them
157156
to create the public names.
158157

159-
### Add support for some extra DWARF locations.
160-
The following DWARF debug location operands are not supported:
158+
### Add support for some extra `DWARF` locations.
159+
The following ``DWARF`` debug location operands are not supported:
161160

162161
* DW_OP_const_type
163162
* DW_OP_entry_value
164163
* DW_OP_implicit_value
165164

166165
### Add support for additional binary formats.
167-
* Extended COFF (XCOFF)
166+
* Extended COFF ``(XCOFF)``
168167

169-
### Add support for *JSON* or *YAML*.
168+
### Add support for ``JSON`` or ``YAML``
170169
The logical view uses its own and non-standard free form text when
171170
displaying information on logical elements.

0 commit comments

Comments
 (0)