hw-call-stack 项目教程
1. 项目的目录结构及介绍
hw-call-stack/
├── dist/
│ ├── hw_call_stack_x64.exe
│ ├── hw_call_stack_x86.exe
├── include/
│ ├── 各种头文件
├── resources/
│ ├── 资源文件
├── scripts/
│ ├── 脚本文件
├── source/
│ ├── hw_breakpoint.c
│ ├── dinvoke.c
│ ├── spoof_callstack.c
│ ├── syscalls.c
│ ├── main.c
├── LICENSE
├── Makefile
├── README.md
- dist/: 包含编译后的二进制文件。
- include/: 包含项目所需的头文件。
- resources/: 包含项目所需的资源文件。
- scripts/: 包含项目所需的脚本文件。
- source/: 包含项目的源代码文件。
- LICENSE: 项目的许可证文件。
- Makefile: 项目的编译配置文件。
- README.md: 项目的说明文档。
2. 项目的启动文件介绍
项目的启动文件是 source/main.c
。这个文件包含了程序的入口点,负责初始化和调用其他模块的功能。
3. 项目的配置文件介绍
项目的配置文件是 Makefile
。这个文件包含了编译项目的配置信息,如编译器选项、源文件列表等。
OPTIONS = -masm=intel -Wall -I include -DDEBUG
hw_call_stack: clean
$(CC_x64) source/hw_breakpoint.c source/dinvoke.c source/spoof_callstack.c source/syscalls.c source/main.c -o dist/hw_call_stack_x64.exe $(OPTIONS)
$(CC_x86) source/hw_breakpoint.c source/dinvoke.c source/spoof_callstack.c source/syscalls.c source/main.c -o dist/hw_call_stack_x86.exe $(OPTIONS)
clean:
rm -f dist/*
这个 Makefile
文件定义了编译选项和编译命令,用于生成 dist/
目录下的二进制文件。