Skip to content

Instantly share code, notes, and snippets.

@Riahiamirreza
Riahiamirreza / hack_n_debug_bitcoin_with_gdb_or_LLDB.md
Created July 10, 2022 17:57 — forked from gubatron/hack_n_debug_bitcoin_with_gdb_or_LLDB.md
How to build bitcoin and debug with GDB or LLDB

Hack and Debug with gdb or LLDB, using Bitcoin's code as an example

/*
 * Copyright CC0 Angel Leon <@gubatron>
 */

Update: I believe now it's better to use lldb, at least on MacOS, here's a LLDB to GDB command map

Here's how to use gdb to debug issues you might be having hacking bitcoinclassic (or any other C++ program)

@Riahiamirreza
Riahiamirreza / staticmethod.py
Created April 7, 2022 09:37 — forked from carljm/staticmethod.py
pure Python implementation of the staticmethod decorator
class StaticMethod(object):
def __init__(self, func):
self.func = func
def __get__(self, obj, cls):
return self.func
def staticmethod(func):
@Riahiamirreza
Riahiamirreza / ls.rst
Created February 17, 2022 12:32 — forked from amitsaha/ls.rst
How does `ls` work?

How does ls work?

I wanted to be really able to explain to a fair amount of detail how does the program :command:`ls` actually work right from the moment you type the command name and hit ENTER. What goes on in user space and and in kernel space? This is my attempt and what I have learned so far on Linux (Fedora 19, 3.x kernel).

How does the shell find the location of 'ls' ?