Skip to content

Instantly share code, notes, and snippets.

View yurydelendik's full-sized avatar

Yury Delendik yurydelendik

View GitHub Profile
@yurydelendik
yurydelendik / get_dwarf_info.py
Last active March 20, 2022 17:54
Extarct DWARF-like information from binary WASM
#!/usr/bin/env python
"""Utility to extract .debug_info section and print that in JSON format.
"""
import argparse
from collections import OrderedDict
import json
import logging
from math import ceil, log
import os
@yurydelendik
yurydelendik / dwarf-wasm.md
Last active July 23, 2018 21:44
DWARF for WebAssembly target
@yurydelendik
yurydelendik / dbg_value.diff
Last active January 20, 2019 05:13
Attept to extend DBG_VALUE functionality
Index: include/llvm/BinaryFormat/Dwarf.def
===================================================================
diff --git a/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def b/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def
--- a/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def (revision 336356)
+++ b/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def (working copy)
@@ -617,6 +617,8 @@
// Vendor extensions:
// Extensions for GNU-style thread-local storage.
HANDLE_DW_OP(0xe0, GNU_push_tls_address, 0, GNU)
+// Extensions for WebAssembly.
<!-- inside examples/ folder -->
<!-- run `gulp dist-install` -->
<html>
<head>
<script src="../node_modules/pdfjs-dist/build/pdf.js"></script>
</head>
<body>
<script>
PDFJS.cMapUrl = "../node_modules/pdfjs-dist/cmaps/";
@yurydelendik
yurydelendik / better30000.patch
Last active September 29, 2017 22:36
Improvements for debugger.html source tree
diff --git a/src/components/PrimaryPanes/SourcesTree.js b/src/components/PrimaryPanes/SourcesTree.js
index eadd8041..79576b1e 100644
--- a/src/components/PrimaryPanes/SourcesTree.js
+++ b/src/components/PrimaryPanes/SourcesTree.js
@@ -242,7 +242,6 @@ class SourcesTree extends Component {
onContextMenu={e => this.onContextMenu(e, item)}
>
- {arrow}
- {icon}
+ {nodeHasChildren(item) ? arrow : null}
@yurydelendik
yurydelendik / record.html
Last active August 3, 2021 06:39
Record and playback audio.
<!DOCTYPE html>
<html>
<head>
<title>Capture sound</title>
<meta charset="utf-8">
</head>
<body>
<div id="ask_donate">
<button id="donate">Donate the noise</button>
</div>
@yurydelendik
yurydelendik / sm_emcc.patch
Created June 23, 2017 01:24
Patch for emcc to enable source maps for wasm
diff --git a/emcc.py b/emcc.py
index fdbefe008..54d989c16 100755
--- a/emcc.py
+++ b/emcc.py
@@ -145,6 +145,7 @@ class EmccOptions(object):
self.exclude_files = []
self.ignore_dynamic_linking = False
self.shell_path = shared.path_from_root('src', 'shell.html')
+ self.source_map_base = None
self.js_libraries = []
@yurydelendik
yurydelendik / README.md
Last active September 12, 2020 18:24
Build wasm maps from C++ file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script>
var memory;
var env = {
sys: {
@yurydelendik
yurydelendik / from-mq-to-bookmarks.md
Last active May 12, 2018 11:39
Some version control operations

Overview

Provides set of operations to efficiently maintain set of patch for long time and be able to submit those for review.

GIT

Let's say we clone a repo and 'master' is upstream branch and we will keep it up-to-date on regular base.

We can created a branch for a new feature and will try to keep it fresh and with addressed reviews.