Skip to content

Instantly share code, notes, and snippets.

View huhuang03's full-sized avatar
😀
please focus

Aha huhuang03

😀
please focus
View GitHub Profile
#include <stdlib.h>
#include <stdio.h>
int len = 8;
void quick_sort_iter(int*, int, int);
void printArray(int array[], int len) {
for(int i = 0; i < len; i++) {
printf("%d ", array[i]);
@huhuang03
huhuang03 / gist:e00909ccacbd499d1ac835b35d7d5770
Created December 4, 2017 06:23
编译器和解释器的区别
刚开始都是相同的,都是将源输入分析成一个语法树。
但是之后,编译器会将语法树转换成其他语言。
而解释器一边分析语法树一边执行。
2. 将Unity3dRider(https://github.com/JetBrains/Unity3dRider)中的Assets/Plugins/Editor/JetBrains拷贝到Unity3d工程的Assets/Plugins/Editor/JetBrains
3. 在Unity3D中设置editor为rider
1. 安装smalidea(https://github.com/JesusFreke/smali/wiki/smalidea)
2. 在IDEA中选择New Project -> New project from exit source
3. 将smali源码文件夹右键 -> Make as source folder
gcc -E foo.c -o foo.i
gcc -S foo.i -o foo.s
Insatll apache
sudo yum install httpd
Start apache
sudo service httpd start
# R0 - R11 为寄存器
# BL 表示调用子程序
# puts 表示标准函数printf的实现
EXPORT main # IDA 生成,函数名称
main # 函数名称
var_C = -0xc # variable var_c = -0xc
var_8 = -8 # variable var_8 = -8
STMFD SP!, {R11,LR} # 将寄存器入栈
ADD R11, SP, #4 # R11 = [SP] + 4
可执行文件格式:
1. windows 可编译可执行(Portable Executable, PE)格式
2. Unix 可执行和链接格式(Executable and linking format, ELF)
反汇编算法:
1. 线性扫描。GNU调试器(gdb)、微软公司的winDbg调试器和objjump实用工具的反汇编引擎均采用这种扫描方法。
2. 递归下降反编译器。IDA Pro
IDA Pro全称为Interactive Disassembler Professional
编译的时候可以选择静态链接或者动态链接,静态链接会将需要用的的共享库一起打包到发行文件中,而动态链接会动态的链接运行环境中的库。
13位为毫秒
10位为妙