Skip to content

bmanga/llvm-ir-pp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

LLVM GDB Pretty Printers

This project provides GDB pretty printers for LLVM types, specifically for llvm::Type and llvm::Value. The pretty printers directly use the dump() method when inspecting LLVM types within GDB.

Screenshot from 2024-05-25 01-34-30

Installation

  1. Clone the repository:
git clone https://github.com/bmanga/llvm-ir-pp.git
  1. Load the pretty printers in your GDB session by adding the following to your .gdbinit file:
source /path/to/llvm-ir-pp/llvm-ir-prettyprinter.py

Usage

Once the pretty printers are loaded, GDB will automatically use them to display LLVM types when they are encountered. For example:

(gdb) p *ST
$1 = store ptr addrspace(1) %data_out_raw, ptr %data, align 4

Your IDE may also be able to make use of it (eg. VSCode, see the image above)

Contributing

Contributions are welcome! Please submit pull requests or open issues to discuss potential changes.

About

GDB Pretty Printer for llvm ir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages