GithubHelp home page GithubHelp logo

mdb's Introduction

Midas

Midas Debugger library for Rust / C / C++

Workspace structure

The next section describes the layout of this workspace and what it contains.

Libraries in this workspace

cli

Command line input library, that does some rudimentary stuff, that makes for a REPL like program. This library won't be exposed in any shape through the midas library. It's sole purpose for existing in this workspace, is to provide the CLI functionality for the "repl" variant of the debugger.

To test this library, there exists an example, in the examples folder of the cli library. To run / test, this ultra simple example, from bash/your shell of choice write, in the workspace root folder:

cargo run --example prompt

It has some simple features right now, like a history, moving the cursor like you would an normal repl (ctrl + key jumps over word boundaries etc). Up/down scrolls through input history. It has functionality for highlighting and coloring although the example does not have it implemented right now.

linuxwrapper

Wrapping around the libc functionality we use. We could use an already existing library, but that would A; defeat the purpose of this project of learning the in's and outs of systems programming and B; add an incredibly unnecessary overhead, as we will not be using the entirety of libc, which other crates wrap around 1-to-1 thus, adding to binary size, compilation speed etc. We want full control when we can and we want it to be fast. But most importantly, I want to learn how the stuff works. Using crates is great, when we already know what needs to be done.

midas

The actual debugger library; the library which either the repl binary links to or the server, depending on what functionality the interface is meant to expose.

debug_info

Library that wraps around the gimli & the object crates for parsing ELF and DWARF data. The reason for wrapping this in it's own library, is because, if I ever wanted to dive down and make a rudimentary ELF and DWARF parser, switching this component out becomes much easier.

Note: I've changed my mind, I'm going to try and write rudimentary libraries for this myself at first.

Binaries in this workspace

repl

The command line version of the debugger library. The functionality that this provides, as far as debugging goes, will be an exact 1-to-1 match with the server variant, what differs are the interfaces by which we communicate with the midas library. This idea was shamelessly stolen from headcrab.

For now, extremely, ridiculously few features are implemented, but the repl binary, can produce this;

Example of setting a breakpoint on main, or symbols understood / visible by ELF

server

An interface against Midas that instead of taking commands from the commandline, solely takes commands from a socket or some other form of IPC.

Dependencies

Though, I'm trying to keep it as non-dependent on other libraries as possible, to get going and actually get somewhere here in the beginning, I'm going to pull in the following crate:

  • gimli - for reading DWARF.

mdb's People

Contributors

theidinside avatar

Watchers

 avatar

mdb's Issues

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.