Skip to content

ormastes/LLD-Map-Viewer

Repository files navigation

# LLD Map Viewer

A Visual Studio Code extension for visualizing Clang LLD map files

Version VS Code License


LLD Map Viewer transforms Clang LLD (LLVM Linker) map files into intuitive, interactive tree table views. Version 2.0 features a new stack-based parser with lazy field evaluation.

📸 Screenshot

Tree Table View

✨ Features

  • 🌳 Tree Table View

    • Visualize LLD map files in an organized tree table format
    • Hierarchical structure showing parent-child relationships
    • Expand and collapse nodes to navigate through symbols
    • Clear indentation for easy understanding
  • 🔢 Number Format Switching

    • Toggle between hexadecimal and decimal number formats
    • Switch formats without re-parsing the file
  • Stack-Based Parser

    • Single-pass tree building algorithm
    • Lazy field evaluation (fields parsed only when displayed)
    • Designed specifically for LLD format files
  • 🖱️ Interactive Interface

    • Progress indicators during file opening
    • Cancellable file opening with fallback to text mode
  • 📊 Pie Chart Visualization (Coming Soon)

🔧 Requirements

  • Visual Studio Code: Make sure you have Visual Studio Code installed.
  • Node.js: Required for extension development and dependencies.

⚙️ Extension Settings

This extension contributes the following settings:

  • lldMapViewer.parsingMode: Select the parsing mode (both work with LLD format only)

    • new (default): Stack-based parser with lazy field evaluation
    • legacy: Original parser with immediate field parsing
  • lldMapViewer.debugMode: Enable debug mode (default: false)

    • When enabled, parses files with both methods and compares results
    • Logs differences to the "LLD Map Viewer" output channel
    • Useful for testing and validation
  • lldMapViewer.logParsingStats: Log parsing statistics (default: false)

    • Logs parsing time and node count to the output channel
    • Useful for performance analysis

🐛 Known Issues

  • LLD Format Only: This extension only works with LLD (LLVM Linker) format map files. Other formats (GNU ld, MSPGCC, etc.) are not supported.
  • Pie Chart Rendering: The pie chart feature is currently under development.

📝 Release Notes

1.0.0

Initial release of lld-map-viewer with tree table view and number format switching capabilities.

1.1.0

  • Added support for hexadecimal and decimal number format switching.
  • Improved tree table performance and responsiveness.

1.2.0

  • Fixed empty symbol display issue

1.3.0

  • Added modern icon and improved visual design
  • Enhanced README documentation
  • General performance improvements

2.0.0 - Major Parser Refactoring

This major version rewrites the parsing engine with a new stack-based parser optimized for LLD format files:

Core Features

  • Stack-Based Tree Building

    • Full tree structure built in one pass through the file
    • Uses space-counting algorithm
    • Proper parent-child relationship building
  • Lazy Field Parsing

    • Field values (VMA, LMA, Size, Align, Symbol) parsed only when displayed
    • Raw line stored in each node for on-demand field extraction
    • Column offsets detected from LLD header
  • LLD Format Only

    • Designed specifically for Clang LLD map file format
    • Automatic column offset detection from header line
    • Validates LLD format before parsing
  • Dual Parser Mode

    • New parser (default): Stack-based with lazy field evaluation
    • Legacy parser: Original parser with immediate parsing
    • Debug mode compares both parsers to ensure identical results

Technical Details

  • Stack-Based Algorithm

    • Uses space counting with stack for building tree structure
    • Single-pass through file content
    • Proper parent-child relationships via stack depth
  • Column Offset Detection

    • Automatic detection of VMA, LMA, Size, Align, Symbol positions from header
    • Field extraction using detected offsets
  • Lazy Evaluation

    • Field values cached after first access
    • Raw line stored for on-demand parsing
  • Progress Indicators

    • Progress bars during file opening
    • Cancellable operations

Breaking Changes

  • Complete rewrite of parsing engine
  • New state management system
  • Modified internal TreeNode structure

Testing & Validation

  • Legacy Parser Preserved: Original parser available via lldMapViewer.parsingMode setting
  • Debug Mode: Compare both parsers to validate tree structure consistency
  • Parser Comparison Tool: Built-in tree comparator reports any differences
  • Test Suite: Basic tests for LLD format validation

About

Visual Studio Code extension to display Clang LLD map files in a tree table view.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors