GithubHelp home page GithubHelp logo

tiancheng-luo / jdivisitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adrianherrera/jdivisitor

0.0 1.0 0.0 180 KB

Java library for building custom debugger applications using the Java Debug Interface (JDI) and the visitor design pattern

License: MIT License

Java 100.00%

jdivisitor's Introduction

JDIVisitor

JDIVisitor is a Java library for building custom debugger applications using the Java Debug Interface (JDI) and the visitor design pattern. It draws inspiration from jfager's jdiscript project. However, JDIVisitor eschews jdiscript's script-like design in favour of a more Java-esque library. An advantage of using the visitor pattern is that the visitor object can encapsulate and maintain state as it handles JDI events, allowing for complex debugger applications to be constructed.

License

GNU GPL v2.0

Usage

The following steps can be used to create your custom debugger application:

  1. Implement an EventRequestor class that requests specific JDI events that will be handled by your debugger
  2. Implement an EventVisitor class that describes how to handle the JDI events enabled in Step 1
  3. Connect to the target virtual machine using either the LocalVMLauncher class (creates and starts a local virtual machine in debug mode) or the RemoteVMConnector class (attach to a virtual machine already running in debug mode over a network). Note that using the RemoteVMConnector and an appropriately-configured sandbox is the safer choice if you are working with malicious Java applications
  4. Instantiate a Debugger object using the VirtualMachine object returned from Step 3
  5. Call the debugger's requestEvents method with the EventRequestor implemented in Step 1
  6. Call the debugger's run method with the EventVisitor implemented in Step 2

Examples

See https://github.com/adrianherrera/jdivisitor-examples.

jdivisitor's People

Contributors

adrianherrera avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.