sdb_debugger 0.2.2

Book: Building a Debugger. Rust port of C++ debugger sdb
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <cstdio>
#include <sys/signal.h>
#include <unistd.h>
int main() {
    unsigned long long a = 0xcafecafe;
    auto a_address = &a;
    write(STDOUT_FILENO, &a_address, sizeof(void*));
    fflush(stdout);
    raise(SIGTRAP);

    char b[12] = { 0 };
    auto b_address = &b;
    write(STDOUT_FILENO, &b_address, sizeof(void*));
    fflush(stdout);
    raise(SIGTRAP);
    printf("%s", b);
}