Giter Site home page Giter Site logo

alicedbg's Introduction

dd86k

Hi there, I'm dd!

I'm interested in software engineering, system administration, telecommunications, and technical documentation.

My main programming language is the D programming language. I also know a good amount of C, C#, PHP, and JavaScript.

Available on: GitHub, Gitlab, and Codeberg.

A more complete portfolio is available online.

Active Projects

Project Links Description
alicedbg GitHub, GitLab, Codeberg Debugger toolkit and shell
aliceserver GitHub, GitLab, Codeberg Debugger server implementing DAP
ddhx GitHub, GitLab Hex viewer
ddgst GitHub, GitLab Hashing multithreaded utility
binco GitHub Binary-text encoder/decoder
sha3-d GitHub Keccak-f[1600,24] (SHA-3) implementation
blake2-d GitHub BLAKE2 implementation (s and b variants)
lateterm GitHub, GitLab WordPress "DOS" theme
npp_vs2012 GitHub Notepad++ "VS2012" theme

alicedbg's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

webfreak001

alicedbg's Issues

Symbol demangling

Ref Description
Module adbg.symbol
Function size_t adbg_symbol_demangle(char* buf, size_t bufsz, const char* sym);

Add symbol demangling.

Minimum:

  • C
  • MSVC C++ (stdcall?)
  • GCC C++
  • D

Tests:

  • C
    • Probably none, usually as-is.
  • C++
    • GCC C++: _ZN11RealSenseID7PreviewC1ERKNS_13PreviewConfigE to RealSenseID::Preview::Preview(RealSenseID::PreviewConfig const&)
    • http://demangler.com/
  • D
    • One test per type.

Start DWARF support

Need: Kickstart support for DWARF for symbol resolution, frame handling, etc.

Typically under sections such as .debug_info, .debug_frame, etc.

  • Identify which versions of DWARF that DMD uses, if used at all.
  • Identify which versions of DWARF that GCC (and notably GDC) uses.
    • GDC has a special version, hinting to DWARF2.
  • Identify which versions of DWARF that LDC uses.
  • Write a small POC.

New wait function with filtering

Currently, the wait function only supports exceptions.

A new wait function could be something closer to what Windows currently offers, with an option to choose what to filter.

With ptrace(2), options such as PTRACE_O_TRACESYSGOOD adds the possibility to look for dlopen for "DLL events" and exec* for "new process event", PTRACE_O_TRACEFORK/PTRACE_O_TRACEVFORK/PTRACE_O_TRACECLONE for "new thread event", etc.

There aren't that many types to filter, so a uint may be acceptable for filtering options.

Not planned any time soon, but would be pretty nice to bring a feature parity.

Prototype: adbg_wait2(adbg_process_t *proc, uint filter, void function(adbg_event_t*) ucallback)

Formatted CLI output

Noticed how nice it is to use curl in scripts, things like --write-out "%{errcode}" would make alicedbg worth using in CI pipelines.

Maybe even --help-from-code?

Example Windows script:

alicedbg --write-out "%E"
IF ERRORLEVEL 1 (
	echo Debug failed with message:
	alicedbg --help-from-code %ERRORLEVEL%
)

Maybe a useful feature, but then alicedbg isn't curl. That would make the project's scope a little too broad.

Use as a stand-alone library

While there is the headers build type, headers generated by DMD or LDC are within one folder, which poses a multiple of issues:

  1. Files with the same module name are overwritten (DMD)
  2. Compiler depends on the folder hierarchy to import modules (Any)

Can't find much online. See commit message 29f3f45 for a bit more details

Possible solutions:

  1. do like vibe-d and do subpackages
  2. make a script that generates proper folder hierarchy + headers
    a. (optional) make it accessible via dub
  3. pact all header files into one (via a script)
    a. (optional) make it accessible via dub
  4. manually prep a .di file (by hand)
    a. enables doing one import (nice!)

Application: Separate dumper and debugger portions

Right now, both the debugger portion and the dumper portion fall under the same executable.

But both do absolutely different things, and shares so little code. For the functions that do, a common folder will be created.

We lose nothing separating the two, plus:

  • Makes the debugger smaller.
  • Dumper can have more options and existing options trimmed (--dump-xyz to --xyz).
  • Separating the applications as configuration also makes it possible to switch configuration in vscode.
  • Edits on dumper or debugger won't affect each other.
  • Leaves space for an eventual alicetools app or similar.

Support Backtraces

With PE32 and/or ELF.

We need support for a "get symbol from address" function first...

Server

Planned feature. Made this ticket for tracking purposes.

This could be implemented as stand-alone (server/).

Protocols:

Testsuite Framework

Obviously, unit testing can only cover a portion of code.

For the shell and other modules that require external tests, it'll be worthwhile to create a D script.

Things to test:

  • Shell commands.
  • Fuzzing input for object server.

tester.d:

  • Compiles and runs example programs found in tests/automated/.
  • May need to finish some APIs first.
  • Support for Fuzzing (especially object server).
    • Either zzuf or AFL.
  • Could be nice to check version (--ver)

Better logging, tracing

Right now, trace logs are only written to stdout, logging is very minimal, and somewhat messy.

Issues:

  1. Alicedbg does not offer logging facilities.
  2. Both the debugger and dumper module lack proper logging formats when it comes to debugging either apps.
  3. Trace builds spam stdout, reducing visibility when debugging.
  4. A little difficult to differentiate between debugger output from debuggee output.

Options:

  1. Provide logging callbacks for Issue 1.
  2. Have tracing output to a alicedbg.log file for Issue 3.

Solutions:

  • Shell: Debug events can be formatted [adbg] event: message.
    • Fixes Issue 2 and 4.
  • Shell: Debugger messages (verbose) can be formatted [adbg] debugger: message.
    • Fixes Issue 2 and 4.
  • Dumper: Can be formatted dumper: message.
    • Fixes Issue 2.
  • Trace output can be written to alicedbg.log and/or alicedump.log.
    • Fixes Issue 3.

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.