1
1
Fork
You've already forked mab
0
Debugging utility targeting UNIX-like systems with dynamic system linkers.
  • C 59.7%
  • Python 28.4%
  • Just 7.7%
  • Shell 4.2%
2024年09月05日 15:44:38 +01:00
scripts move scripts 2024年09月02日 21:19:24 +01:00
.gitignore reimplement mab as a c shared lib 2024年09月01日 23:38:40 +01:00
clang-format.conf reflow comments 2024年09月02日 11:13:59 +01:00
Justfile build with warns 2024年09月05日 15:44:38 +01:00
LICENSE initial commit 2024年09月01日 21:40:03 +01:00
mab.c fix warnings 2024年09月05日 15:44:31 +01:00
mab.h fix warnings 2024年09月05日 15:44:31 +01:00
README.md just install 2024年09月02日 21:18:07 +01:00

mab

mab is a debugging utility that wraps a binary executable and a library with some helper code, with the intent of facilitating the visualization of data under the lldb debugger.

Compiling

Simply building the library can be done with:

just build

To install the library, one should run:

just install

Usage

mab is implemented as a shared library that you inject into a program using the platform's dynamic linker. Usually, this is done by passing the path to the shared library to an environment variable, consulted by the linker just before running the target binary (e.g. LD_PRELOAD on GNU/Linux systems, and DYLD_INSERT_LIBRARIES on macOs).

For instance, on macOs, one might run:

DYLD_INSERT_LIBRARIES=/path/to/libmab.dylib \
MAB_LIB_PATH=/path/to/lib_with_debug_code.dylib \
/Library/Developer/CommandLineTools/usr/bin/lldb -- \
 /path/to/program/you/wish/to/debug [cmdline-args]

To generate a library to feed to $MAB_LIB_PATH, check out mab-template-rust or mab-template-c.

WTF is this name?

mab = macOs bugs