llvm-project/llvm/docs
David Spickett 85bc498826 [LLDB] Show sub type of signals when debugging a core file
Previously we only looked at the si_signo field, so you got:
```
(lldb) bt
* thread #1, name = 'a.out.mte', stop reason = signal SIGSEGV
  * frame #0: 0x00000000004007f4
```
This patch adds si_code so we can show:
```
(lldb) bt
* thread #1, name = 'a.out.mte', stop reason = signal SIGSEGV: sync tag check fault
  * frame #0: 0x00000000004007f4
```

The order of errno and code was incorrect in ElfLinuxSigInfo::Parse.
It was the order that a "swapped" siginfo arch would use, which for Linux,
is only MIPS. We removed MIPS Linux support some time ago.

See:
fe15c26ee2/include/uapi/asm-generic/siginfo.h (L121)

A test is added using memory tagging faults. Which were the original
motivation for the changes.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D146045
2023-03-21 09:10:09 +00:00
..
_ocamldoc
_static
_templates [docs] remove extra slash from llvm github url 2022-11-18 21:57:17 +08:00
_themes/llvm-theme
AMDGPU [AMDGPU][GFX11][DOC][NFC] Add GFX11 assembler syntax description 2022-12-21 12:49:48 +03:00
AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack [AMDGPU][NFC] Heterogeneous DWARF extensions update 2023-01-13 02:06:20 +00:00
CommandGuide [Docs] Fix llvm-cov debuginfod option formatting. 2023-03-17 15:49:21 -07:00
DependenceGraphs
Frontend
GlobalISel [PowerPC][GISel] add support for fpconstant 2023-02-14 02:39:22 +00:00
HistoricalNotes
PDB
Proposals
TableGen TableGen: Introduce llvm::TableGen::Emitter to register backends 2023-03-21 16:21:27 +09:00
tutorial [Kaleidoscope] Update code snippets in text to match full code listings 2023-01-31 23:31:02 +05:30
AArch64SME.rst [IR] Add LLVM IR support for target("aarch64.svcount") type. 2023-03-01 08:17:53 +00:00
AddingConstrainedIntrinsics.rst
AdvancedBuilds.rst [CMake] Replace clang binary if using clang-bolt target 2023-01-28 11:54:09 -08:00
AliasAnalysis.rst [AliasAnalysis] Introduce getModRefInfoMask() as a generalization of pointsToConstantMemory(). 2022-10-31 13:03:41 -07:00
AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst [AMDGPU][NFC] Clarify heterogeneous DWARF address/memory spaces 2023-01-20 21:12:06 +00:00
AMDGPUInstructionNotation.rst [AMDGPU][DOC][NFC] Update assembler syntax description 2022-12-20 14:03:46 +03:00
AMDGPUInstructionSyntax.rst [AMDGPU][GFX11][DOC][NFC] Add GFX11 assembler syntax description 2022-12-21 12:49:48 +03:00
AMDGPUModifierSyntax.rst [AMDGPU][GFX11][DOC][NFC] Add GFX11 assembler syntax description 2022-12-21 12:49:48 +03:00
AMDGPUOperandSyntax.rst [AMDGPU][GFX11][DOC][NFC] Add GFX11 assembler syntax description 2022-12-21 12:49:48 +03:00
AMDGPUUsage.rst Fix the LLVM Sphinx build 2023-02-24 07:57:25 -05:00
ARM-BE-bitcastfail.png
ARM-BE-bitcastsuccess.png
ARM-BE-ld1.png
ARM-BE-ldr.png
AssignmentTracking.md [DebugInfo][Docs] Remove dbg.addr from docs 2023-03-02 09:29:42 +00:00
Atomics.rst [RISCV] Add target feature to force-enable atomics 2022-08-09 16:04:46 +02:00
Benchmarking.rst
BigEndianNEON.rst
BitCodeFormat.rst [IR] Add a target extension type to LLVM. 2022-12-20 11:02:11 -05:00
BlockFrequencyTerminology.rst [llvm][docs] Update old metadata syntax in examples 2023-01-26 19:34:21 +00:00
BranchWeightMetadata.rst [llvm][docs] Update old metadata syntax in examples 2023-01-26 19:34:21 +00:00
BugLifeCycle.rst
Bugpoint.rst Use opt -passes=<name> instead of opt -name 2022-11-08 12:15:42 +01:00
BugpointRedesign.md
buildbot_worker_contact.png
BuildingADistribution.rst
CFIVerify.rst
CMake.rst Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-03-18 20:32:43 +01:00
CMakeLists.txt [OCaml] Remove all PassManager-related functions 2023-02-24 13:14:18 -08:00
CMakePrimer.rst
CodeGenerator.rst [docs] Remove unmaintained target feature matrix 2022-07-18 18:38:23 +01:00
CodeOfConduct.rst Commit changes to the Code of Conduct that make it more clear regarding behavior outside of LLVM spaces that impact the safety of our community members. Discussion may be found here: https://discourse.llvm.org/t/code-of-conduct-changes-related-to-llvm-project-policy-changes/64197 2022-12-26 11:31:42 -08:00
CodeReview.rst [Docs][CodeReview] Add a small paragraph on adding tokens, NFC. 2022-08-30 17:01:12 -07:00
CodingStandards.rst Revert "CodingStandards: restrict CamelCase variable names guideline to llvm/clang/clang-tools-extra/polly/bolt" 2023-01-06 09:44:27 +01:00
CommandLine.rst
CompileCudaWithLLVM.rst
CompilerWriterInfo.rst Fix a dead link in the docs 2023-01-25 15:09:11 -05:00
conf.py [docs] Use relative URLs for man pages 2022-09-11 20:43:57 +02:00
Contributing.rst
convergence-both-diverged-nested.png RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
convergence-closed-path.png RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
convergence-divergent-inside.png RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
convergence-divergent-outside.png RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
convergence-natural-loop.png RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
ConvergenceAndUniformity.rst [llvm][Uniformity] consistently handle always-uniform instructions 2023-03-10 14:23:40 +05:30
Coroutines.rst Revert "Don't treat readnone call in presplit coroutine as not access memory" 2022-07-20 17:00:58 +08:00
CoverageMappingFormat.rst
cycle-1.png
cycle-2.png
cycle-3.png
CycleTerminology.rst RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
DebuggingJITedCode.rst
DeveloperPolicy.rst Update developer policy on potentially breaking changes 2022-10-13 10:58:52 -04:00
DirectXUsage.rst
DiscourseMigrationGuide.md
Docker.rst
doxygen-mainpage.dox
doxygen.cfg.in
epilogue-vectorization-cfg.png
ExceptionHandling.rst ExceptionHandling documentation tweaks. 2023-01-16 20:36:09 -05:00
ExtendedIntegerResults.txt
ExtendingLLVM.rst
Extensions.rst [MC] .addrsig_sym: ignore unregistered symbols 2022-10-11 15:07:14 -07:00
FAQ.rst
FaultMaps.rst
FuzzingLLVM.rst
GarbageCollection.rst Revert "Remove PlaceSafepoints pass" 2022-10-13 07:17:25 -07:00
gcc-loops.png
GetElementPtr.rst [Docs] Update GEP docs for opaque pointers 2022-07-25 09:52:14 +02:00
GettingInvolved.rst Revert "[Docs] Add my Office Hours" 2023-03-06 10:51:48 +01:00
GettingStarted.rst Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-03-18 20:32:43 +01:00
GettingStartedTutorials.rst
GettingStartedVS.rst
GitBisecting.rst
GitHub.rst
GitRepositoryPolicy.md
GoldPlugin.rst [gold] Ignore bitcode from sections inside object files 2022-07-14 14:46:15 -07:00
GwpAsan.rst Make -fsanitize=scudo use scudo_standalone. Delete check-scudo. 2022-12-02 11:29:41 -08:00
HowToAddABuilder.rst [docs] Document how frequently the staging buildmaster configuration is reconfigured 2023-03-08 10:48:01 +00:00
HowToBuildOnARM.rst
HowToBuildWindowsItaniumPrograms.rst
HowToBuildWithPGO.rst [docs] Add/update docs regarding LLVM_NATIVE_TOOL_DIR vs LLVM_TABLEGEN 2023-01-23 23:49:37 +02:00
HowToCrossCompileBuiltinsOnArm.rst
HowToCrossCompileLLVM.rst [docs] Rewrite/improve the docs for LLVM_NATIVE_TOOL_DIR 2023-02-03 10:55:33 +02:00
HowToReleaseLLVM.rst More llvm-docs-sphinx buildbot fixes 2022-08-20 01:51:48 -07:00
HowToSetUpLLVMStyleRTTI.rst [llvm] Use std::optional instead of llvm::Optional (NFC) 2023-02-14 20:27:41 -08:00
HowToSubmitABug.rst
HowToUpdateDebugInfo.rst [Assignment Tracking][1/*] Add initial docs for Assignment Tracking 2022-11-02 13:47:50 +00:00
HowToUseAttributes.rst
HowToUseInstrMappings.rst
InAlloca.rst
index.rst
InstrRefDebugInfo.md [DebugInfo][Docs] Fix broken link in instruction referencing doc 2023-02-15 17:04:51 +00:00
JITLink.rst [JITLink][docs] Update docs for generic link algorithm and memory manager apis. 2023-03-09 23:37:32 -08:00
LangRef.rst [docs] Document MemProf metadata in LangRef 2023-03-14 11:04:17 -07:00
Lexicon.rst [docs] Document "PGO" (Profile-Guided Optimization) in the lexicon. 2023-03-16 12:14:44 +01:00
LibFuzzer.rst Fix a typo in the docs; NFC 2022-10-10 14:22:25 -04:00
LinkTimeOptimization.rst
linpack-pc.png
llvm-objdump.1 [llvm-objdump][docs] Fix documentation for offloading flags 2022-07-11 15:44:48 -04:00
loop-guard.svg
loop-irreducible.svg
loop-merge.svg
loop-nested.svg
loop-nonmaximal.svg
loop-separate.svg
loop-single.svg
loop-terminology-guarded-loop.png
loop-terminology-initial-loop.png
loop-terminology-rotated-loop.png
loop-terminology.svg
LoopTerminology.rst [Docs] Fix typo in LoopTerminology. 2023-03-17 13:42:27 +00:00
make.bat
MarkdownQuickstartTemplate.md
MarkedUpDisassembly.rst
MCJIT-creation.png
MCJIT-dyld-load.png
MCJIT-engine-builder.png
MCJIT-load-object.png
MCJIT-load.png
MCJIT-resolve-relocations.png
MCJITDesignAndImplementation.rst
MeetupGuidelines.rst
MemorySSA.rst [Docs] update MemorySSA for opaque ptrs 2023-03-02 12:58:58 -08:00
MemTagSanitizer.rst
MergeFunctions.rst
MIRLangRef.rst [DebugInfo] Allow non-stack_value variadic expressions and use in DBG_INSTR_REF 2023-01-06 19:31:10 +00:00
MisExpect.rst
MyFirstTypoFix.rst
NewPassManager.rst [opt] Rename -enable-new-pm -> -bugpoint-enable-legacy-pm 2023-03-16 09:51:44 -07:00
NVPTXUsage.rst Remove TargetMachine::adjustPassManager 2022-11-28 10:24:16 +01:00
OpaquePointers.rst [llvm-c] Remove LLVMContextSetOpaquePointers 2023-01-25 10:28:58 -08:00
OptBisect.rst [OptBisect] Add flag to print IR when opt-bisect kicks in 2022-09-14 13:48:03 -07:00
ORCv2.rst
Packaging.rst
Passes.rst Fix LLVM sphinx docs, redux 2023-01-30 07:46:20 -05:00
PCSectionsMetadata.rst [SanitizerBinaryMetadata] Emit constants as ULEB128 2023-02-08 13:12:34 +01:00
Phabricator_premerge_results.png
Phabricator_premerge_unit_tests.png
Phabricator.rst [llvm][docs] commit phabricator patch 2022-07-11 12:33:57 -07:00
PointerAuth.md
ProgrammersManual.rst Recommit: [NFC][IR] Make Module::getGlobalList() private 2023-02-14 15:12:51 -08:00
Projects.rst Update references to mailing lists that have moved to Discourse. 2022-07-28 16:54:58 -07:00
re_format.7
README.txt
Reference.rst RFC: Uniformity Analysis for Irreducible Control Flow 2022-12-20 07:22:24 +05:30
ReleaseNotes.rst [LLDB] Show sub type of signals when debugging a core file 2023-03-21 09:10:09 +00:00
ReleaseProcess.rst
Remarks.rst
ReportingGuide.rst
ResponseGuide.rst
RISCVUsage.rst [RISCV] Add vendor-defined XTheadCondMov (conditional move) extension 2023-02-24 21:40:42 +01:00
ScudoHardenedAllocator.rst
Security.rst [Nomination] Adding Nvidia Compiler security representative to the LLVM security group. 2023-03-03 10:02:37 -08:00
SecurityTransparencyReports.rst Add security group 2022 transparency report. 2023-01-20 09:49:30 +01:00
SegmentedStacks.rst
SourceLevelDebugging.rst [DebugInfo][Docs] Remove dbg.addr from docs 2023-03-02 09:29:42 +00:00
speculative_load_hardening_microbenchmarks.png
SpeculativeLoadHardening.md
SphinxQuickstartTemplate.rst
SPIRVUsage.rst [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V. 2023-03-13 14:20:24 -04:00
StackMaps.rst Migrate llvm.experimental.patchpoint() to ptr. 2022-08-10 13:18:02 +01:00
StackSafetyAnalysis.rst
Statepoints.rst [RS4GC] Remove the hardcoded GC strategy names (v2) 2023-01-25 20:47:16 +03:00
SupportLibrary.rst
SupportPolicy.rst
SymbolizerMarkupFormat.rst [docs] Use relative URLs for man pages 2022-09-11 20:43:57 +02:00
SystemLibrary.rst
TableGenFundamentals.rst
TestingGuide.rst [Docs] Add best practices for regression tests 2023-01-26 14:27:50 +01:00
TestSuiteGuide.md
TestSuiteMakefileGuide.rst
TransformMetadata.rst
TypeMetadata.rst
UserGuides.rst [AArch64][SME] Document SME ABI implementation in LLVM 2022-09-16 14:48:37 +00:00
Vectorizers.rst
WritingAnLLVMBackend.rst [Docs] Update PatFrag definition in documentation 2022-12-09 09:56:08 +00:00
WritingAnLLVMNewPMPass.rst [docs][NewPM] Move pass plugin documentation into existing new PM docs 2022-11-02 10:47:17 -07:00
WritingAnLLVMPass.rst [opt] Rename -enable-new-pm -> -bugpoint-enable-legacy-pm 2023-03-16 09:51:44 -07:00
XRay.rst
XRayExample.rst
XRayFDRFormat.rst
yaml2obj.rst
YamlIO.rst

LLVM Documentation
==================

LLVM's documentation is written in reStructuredText, a lightweight
plaintext markup language (file extension `.rst`). While the
reStructuredText documentation should be quite readable in source form, it
is mostly meant to be processed by the Sphinx documentation generation
system to create HTML pages which are hosted on <https://llvm.org/docs/> and
updated after every commit. Manpage output is also supported, see below.

If you instead would like to generate and view the HTML locally, install
Sphinx <http://sphinx-doc.org/> and then do:

    cd <build-dir>
    cmake -DLLVM_ENABLE_SPHINX=true -DSPHINX_OUTPUT_HTML=true <src-dir>
    make -j3 docs-llvm-html
    $BROWSER <build-dir>/docs/html/index.html

The mapping between reStructuredText files and generated documentation is
`docs/Foo.rst` <-> `<build-dir>/docs//html/Foo.html` <-> `https://llvm.org/docs/Foo.html`.

If you are interested in writing new documentation, you will want to read
`SphinxQuickstartTemplate.rst` which will get you writing documentation
very fast and includes examples of the most important reStructuredText
markup syntax.

Manpage Output
===============

Building the manpages is similar to building the HTML documentation. The
primary difference is to use the `man` makefile target, instead of the
default (which is `html`). Sphinx then produces the man pages in the
directory `<build-dir>/docs/man/`.

    cd <build-dir>
    cmake -DLLVM_ENABLE_SPHINX=true -DSPHINX_OUTPUT_MAN=true <src-dir>
    make -j3 docs-llvm-man
    man -l <build-dir>/docs/man/FileCheck.1

The correspondence between .rst files and man pages is
`docs/CommandGuide/Foo.rst` <-> `<build-dir>/docs//man/Foo.1`.
These .rst files are also included during HTML generation so they are also
viewable online (as noted above) at e.g.
`https://llvm.org/docs/CommandGuide/Foo.html`.

Checking links
==============

The reachability of external links in the documentation can be checked by
running:

    cd llvm/docs/
    sphinx-build -b linkcheck . _build/lintcheck/
    # report will be generated in _build/lintcheck/output.txt

Doxygen page Output
==============

Install doxygen <https://www.doxygen.nl/download.html> and dot2tex <https://dot2tex.readthedocs.io/en/latest>.

    cd <build-dir>
    cmake -DLLVM_ENABLE_DOXYGEN=On <llvm-top-src-dir>
    make doxygen-llvm # for LLVM docs
    make doxygen-clang # for clang docs

It will generate html in

    <build-dir>/docs/doxygen/html # for LLVM docs
    <build-dir>/tools/clang/docs/doxygen/html # for clang docs