This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir openssl1.0 | |
| cd openssl1.0 | |
| wget http://archive.debian.org/debian/pool/main/o/openssl/libssl1.0.0_1.0.2l-1~bpo8+1_amd64.deb | |
| wget http://archive.debian.org/debian/pool/main/o/openssl/libssl-dev_1.0.2l-1~bpo8+1_amd64.deb | |
| wget http://archive.debian.org/debian/pool/main/o/openssl/openssl_1.0.2l-1~bpo8+1_amd64.deb | |
| dpkg -x libssl-dev_1.0.2l-1~bpo8+1_amd64.deb . | |
| dpkg -x libssl1.0.0_1.0.2l-1~bpo8+1_amd64.deb . | |
| dpkg -x openssl_1.0.2l-1~bpo8+1_amd64.deb . | |
| cd usr/lib/x86_64-linux-gnu/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DWARF has a clever (too clever?) VM representation for source line to asm mapping. | |
| VM has state which represents virtual program and source line counters. | |
| The DW_LNS_advance_pc instruction advances the program counter while the DW_LNS_advance_line instruction | |
| advances the line counter. Both these instructions encode the "advance amount" value as a variably sized immediate operand. | |
| The DW_LNS_copy instructions tells us that current VM pc and source counter states correspond together | |
| both counter values can be copied to a array of line numbers and assembly addresses. When the VM reads a byte from the | |
| instruction stream it compares this value with a VM specified "opcode base" variable. If the value is below the "opcode base" | |
| then it represents an opcode for an instruction. If the value is above the "opcode base" then it represents the operand for | |
| an implicit "instruction". This special implicit "instruction" advances both the program and source line counters at once | |
| using this single byte value. But how |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* I spent an entire evening getting JIT debug symbols to work in GDB. | |
| * Here is a minimal example to get you started. | |
| * Have fun! | |
| */ | |
| #include <errno.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <memory> | |
| using namespace std; | |
| class Resource { | |
| public: | |
| Resource(string id) : _id(id) { | |
| cout << "Resource::Resource(" << _id << ")" << endl; |