#LLDB Basics
A basic overview of lldb for personal reference.
Official documentation can be found here here.
##Command Structure General syntax
<noun> <verb> [-options [option-value]] [argument [argument...]]
0000002A -> GetErr | |
000000CE -> GetDDErr | |
00000831 -> GetDSErr | |
0000093A -> GetLastErr | |
00000947 -> TermMsg | |
00000975 -> MsgBox | |
000009C7 -> FreeDlg | |
00000A30 -> DrawDlg | |
00000A65 -> DDErrDlg | |
00000A88 -> DSErrDlg |
// ### [ Lexical part ] ######################################################## | |
_ascii_letter_upper | |
: 'A' - 'Z' | |
; | |
_ascii_letter_lower | |
: 'a' - 'z' | |
; |
#LLDB Basics
A basic overview of lldb for personal reference.
Official documentation can be found here here.
##Command Structure General syntax
<noun> <verb> [-options [option-value]] [argument [argument...]]
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <time.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
void * f(void *data) { | |
struct timespec start; | |
clock_gettime(CLOCK_REALTIME, &start); |
typedef int bool; | |
enum _0fake { | |
MQ_BUTCHER = 1, | |
MQ_GARBUD = 2, | |
MQ_ZHAR = 4, | |
MQ_LTBANNER = 8, | |
MQ_VEIL = 16, | |
MQ_WARLORD = 32, | |
MQ_SKELKING = 64, |
/* | |
* LD_PRELOAD shim which applies two patches necesary to get the game | |
* Divinity: Original Sin Enhanded Edition for Linux to work with Mesa (12+) | |
* | |
* Build with: gcc -s -O2 -shared -fPIC -o divos-hack.{so,c} -ldl | |
*/ | |
/* for RTLD_NEXT */ | |
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE |
These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).
First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter
(2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.
Finally all remaining files are listed using git ls
, the files to keep are removed from that using grep -v
and the resulting list is passed to git rm
which is invoked by git filter-branch --index-filter
(3.). A bit convoluted but it does the trick.
diff --git a/asm/global.go b/asm/global.go | |
index 5a1f04c..fc73db6 100644 | |
--- a/asm/global.go | |
+++ b/asm/global.go | |
@@ -2,6 +2,7 @@ package asm | |
import ( | |
"fmt" | |
+ "sync" | |
#include <iostream> | |
using std::cout; | |
using std::endl; | |
// Typedef for the function pointer | |
typedef void (*_PVFV)(void); | |
// Our various functions/classes that are going to log the application startup/exit | |
struct TestClass | |
{ |