$linuxjunkies
>

hx(1)

A post-mortem debugger for analyzing core dumps and examining process memory on Linux.

UbuntuDebianFedoraArch

Synopsis

hx [OPTION]... [FILE]

Description

hx is a debugger designed for inspecting core dumps, crashed processes, and live process memory. It provides a command-line interface for examining memory contents, registers, stack traces, and loaded libraries without requiring the original executable or debug symbols in many cases.

Unlike gdb, hx focuses on memory analysis and forensic investigation of core dumps. It's particularly useful for understanding what a process was doing at the moment of crash, examining heap corruption, and analyzing memory layouts in production environments.

Common options

FlagWhat it does
-c, --core FILESpecify the core dump file to analyze
-p, --pid PIDAttach to a running process by its process ID
-e, --exe FILESpecify the executable file corresponding to the core dump
-m, --maps FILEUse a custom /proc/[pid]/maps file for memory layout information
-s, --symbols DIRSearch directory for symbol files and debug information
-q, --quietSuppress non-essential output and warnings
-v, --verboseIncrease verbosity of output
--helpDisplay help message and exit

Examples

Analyze a core dump from a crashed application with its executable

hx -c core.dump -e /usr/bin/myapp

Attach to the current shell process and execute debugger commands from a file

hx -p $$ < commands.txt

Display the first 50 lines of information from a core dump analysis

hx -c core.dump | head -50

Analyze a core dump using debug symbols from a specific directory

hx -c core.dump -s /usr/lib/debug

Attach to process 1234 with verbose output showing detailed memory information

hx -p 1234 -v

Analyze a core dump using custom memory maps file instead of /proc

hx -c core.dump -e ./a.out -m /tmp/custom_maps

Related commands