Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ A demo of how to record an application in a Kubernetes pod using live-record.
[**Load Debug Symbols**](load_debug_symbols/README.md)
Loads debug symbols by parsing the relevant section addresses.

[**Process Tree**](process_tree/README.md)
Visualizes process trees from .undo recording files showing parent-child relationships.

[**Reconstruct file**](reconstruct_file/README.md)
Reconstructs the content of a file by analysing reads on the execution history
of a debugged program or LiveRecorder recording.
Expand Down
3 changes: 3 additions & 0 deletions follow_fork/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Follow `fork()`
===============

**This addon has been superceded by the `--on-fork` options to live-record in Undo 9.1. Please
use `--on-fork` if you have Undo 9.1 or later.**

Often, when recording, engineers might want to record both the parent and the
children generated during the run.
This pre-load library intercepts the calls to 'fork()' and calls the
Expand Down
7 changes: 7 additions & 0 deletions private/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
"version_min": "7.0.0",
"help": "whatmap EXPRESSION -- Locate memory map containing EXPRESSION.\n\n\nExamples:\n\nwhatmap my_variable: looks up the map where my_variable is stored.\n\nwhatmap *0x1234: looks up the map containing the address 0x1234."
},
"process-tree": {
"description": "Visualizes process trees from Undo recordings showing parent-child relationships.",
"repo": "addons",
"script": "process_tree/process_tree.py",
"version_min": "9.1.0",
"help": "process-tree RECORDINGS_DIR [OPTIONS] -- Visualize process tree from Undo recordings.\n\n\nBy default, only ASCII tree output is shown. Use --output-svg to also generate an SVG.\n\n\nOptions:\n\n--output-svg FILE: Output SVG file path (generates SVG in addition to ASCII)\n\n\nExamples:\n\nprocess-tree /path/to/recordings\n\nprocess-tree /path/to/recordings --output-svg tree.svg"
},
"altui": {
"description": "Altui provides a modern and user-friendly alternative to plain UDB and to TUI mode.",
"repo": "altui",
Expand Down
72 changes: 72 additions & 0 deletions process_tree/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Process Tree

Visualizes process trees from Undo recordings. Shows both ASCII tree output and SVG timeline diagrams of parent-child process relationships.

Note: this addon was created with Claude Code and has had only minimal human review and testing.

## Usage

This addon can be used in two ways:

### As a UDB Command

Before using the command it must be loaded into the debugger:
```
extend process-tree
```

Then use the command:
```
process-tree RECORDINGS_DIR [--output-svg FILE]
```

**Arguments:**
- `RECORDINGS_DIR`: Directory containing .undo recordings.

**Options:**
- `--output-svg FILE`: Output SVG file path

**Note:** By default, only ASCII tree output is shown. Use `--output-svg` to also generate an SVG visualization.

### As a Standalone Script

```bash
./process_tree.py RECORDINGS_DIR [--output-svg FILE]
```

## Examples

**Basic usage** (shows ASCII output only):
```
process-tree /path/to/recordings
```

**Generate SVG visualization**:
```
process-tree /path/to/recordings --output-svg my_tree.svg
```

## Output

The addon can generate two types of visualizations:

### ASCII Tree
A hierarchical text representation of the process tree showing parent-child relationships:
```
Process Tree Visualization:
==================================================
└── PID 1234 (recording_0001.undo)
├── PID 1235 (recording_0002.undo)
│ └── PID 1237 (recording_0004.undo)
└── PID 1236 (recording_0003.undo)
```

### SVG Timeline
A visual timeline diagram showing:
- Horizontal timeline for each process
- Fork points showing where new processes are created
- Process IDs and recording file names
- Parent-child relationships with connecting lines

The SVG file can be viewed in any web browser or image viewer.

Loading