Skip to main content

Pointbreak

Pointbreak lets you write python programs that debug or analysis other programs. It works like a debugger but because it's a Python library you can extend and interact with it very easily.

Pointbreak is designed to make debugging and analysing complex things like JITs simpler without having to added lots of debugging code to the target.

General Advantages

  • Breakpoints are any Python callable
  • Simple API
  • Can be used from a Python REPL like IPython
  • Can be easily embedded in other things e.g. a Flask app
  • Easy to add support for custom symbols and JIT generated code
  • Simpler and less restrictive than GDB Python API

Disadvantage

Example print BOO! when function is called

If you compile gcc ghost.c -o ghost and run ./ghost nothing much happens But if we run python boo_ghost.py it prints

Boo!
Boo!
Boo!
Boo!
Boo!
Boo!
Boo!
Boo!
Boo!

because our python function is getting called each time there_is_a_ghost is called. There are more examples in the examples directory.

ghost.c

/* I'm a silly program that does nothing much on its own. */
/* Compile me with "gcc ghost.c -o ghost".                */

void there_is_a_ghost(void) {
    return;
}

int main(int argc, char *argv[]) {
    int i;
    for (i = 0; i < 10; i++) {
        there_is_a_ghost();
    }
    return 0;
}

boo_ghost.py

from __future__ import print_function
import pointbreak

def print_boo(debugger):
    print("Boo!")
    return True

db = pointbreak.create_debugger('ghost')
db.add_breakpoint('there_is_a_ghost', print_boo)
db.continue_to_last_event()

Release files for pointbreak 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pointbreak 0.0.2
File Size Uploaded
pointbreak-0.0.2.tar.gz 8.3 kB Details

Release files / pointbreak-0.0.2.tar.gz

Download URL pointbreak-0.0.2.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
db985dfa5656965ddf056b103d8f4da604bb31deda05592cb1676338bb68e328
BLAKE2b-256 checksum
How to use checksums
546ec5665432dc6594685e83a980521773a9fb87b8733667aa6438d13c6011b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page