Skip to content
/ dsviz Public

A tool for visualizing structures from debug info

Notifications You must be signed in to change notification settings

zolutal/dsviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debug Struct Visualizer

Converts a struct in the type info of a specified binary to an interactive graph using:

  • gdb -- for it's python api which includes an easy-to-use interface to access loaded type information, so any debug info format that gdb supports is supported
  • graphviz -- for it's graph generation capabilities
  • pywebview -- provides a view of the interactive generated graph without needing to bother with a browser and web server

Dependencies:

python dependencies will be installed with module installation:

pip install .

additional requirement: gdb and graphviz's 'dot' executable must be found in path

on ubuntu:

sudo apt install gdb graphviz

Usage:

dsviz <path-to-binary> <name-of-root-struct> (output-file)

if output-file is specified the graphviz dot file will be written to that file each time the graph is updated via interactions

to expand a struct field, right click on the field name and click 'Expand' in the context menu that appears

Examples:

vmlinux:

struct kmem_cache

dsviz ~/kernel/linux-6.1-rc3/vmlinux "struct kmem_cache"

kmem_cache

struct cred

dsviz ~/kernel/linux-6.1-rc3/vmlinux "struct cred"

cred

QEMU:

struct CPUTLB

dsviz ~/qemu/build/qemu-system-x86_64 "struct CPUTLB"

cputlb

TODO:

  • validate gdb and dot are in path
  • allow output format to be specified
  • many other things...

Releases

No releases published

Packages

No packages published