Skip to content

Commit bbcb752

Browse files
committed
docs: update README and documentation consistency
1 parent bfeb98c commit bbcb752

File tree

10 files changed

+37
-18
lines changed

10 files changed

+37
-18
lines changed

README-zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<img src="https://img.shields.io/badge/版本-0.1.0-blue.svg" alt="Version"/>
1616
<img src="https://img.shields.io/badge/协议-GPL-green.svg" alt="License: GPL"/>
1717
<img src="https://img.shields.io/badge/Linux-4.4+-orange.svg" alt="Linux 4.4+"/>
18-
<img src="https://img.shields.io/badge/Rust-1.75+-red.svg" alt="Rust 1.75+"/>
18+
<img src="https://img.shields.io/badge/Rust-1.88.0-red.svg" alt="Rust 1.88.0"/>
1919
</p>
2020

2121
</div>
@@ -157,7 +157,7 @@ GhostScope 将编译后的二进制文件转变为可观测系统。在函数入
157157

158158
我们欢迎贡献!无论是错误报告、功能请求、文档改进还是代码贡献,我们都感谢您帮助改进 GhostScope。
159159

160-
请查看我们的[贡献指南](docs/contributing.md)了解:
160+
请查看我们的[贡献指南](docs/zh/contributing.md)了解:
161161
- 行为准则
162162
- 开发工作流
163163
- 编码标准

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<img src="https://img.shields.io/badge/version-0.1.0-blue.svg" alt="Version"/>
1616
<img src="https://img.shields.io/badge/license-GPL-green.svg" alt="License: GPL"/>
1717
<img src="https://img.shields.io/badge/Linux-4.4+-orange.svg" alt="Linux 4.4+"/>
18-
<img src="https://img.shields.io/badge/Rust-1.75+-red.svg" alt="Rust 1.75+"/>
18+
<img src="https://img.shields.io/badge/Rust-1.88.0-red.svg" alt="Rust 1.88.0"/>
1919
</p>
2020

2121
<!-- Language Switch -->

docs/contributing.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,3 @@ git commit -m "docs: update installation instructions"
4848
## Development Setup
4949

5050
Please refer to the [Development Guide](development.md) for setting up your development environment.
51-
52-
## Community
53-
54-
- [GitHub Discussions](https://github.com/swananan/ghostscope/discussions) - Questions and discussions
55-

docs/images/info-line.png

249 KB
Loading

docs/limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Currently only supports **Linux** operating system due to its core dependency on
2222
## Soft Limitations
2323

2424
### 1. Language Support
25-
Currently supports compiled languages (C, C++, Rust) with DWARF debug information. Support for advanced language features is limited, such as Rust async functions and C++ templates, requiring significant effort to improve gradually.
25+
Primary focus is on **C language**, which has the best support. C++ and Rust are supported with limitations - advanced language features such as Rust async functions and C++ templates have limited support and require significant effort to improve gradually.
2626

2727
For interpreted languages (Lua, Python, Ruby, etc.), only the interpreter itself can be traced (since interpreters are typically implemented in compiled languages). Tracing script code is technically feasible but requires substantial development time. JIT language support is an even more distant goal.
2828

docs/roadmap.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# GhostScope Roadmap (Milestones)
22

3-
## Global variables in `-p <pid>` mode — stability and compatibility improvements
4-
- Automatic ASLR section offset computation and population
5-
- Runtime null-pointer dereference protection
6-
73
## Global variables in `-t <exec_path>` mode (planned)
84
- Background: resolving globals requires per-module ASLR offsets computed from `/proc/<pid>/maps`, while `-t` mode has no PID context.
95
- Direction: introduce PID discovery/subscription in the attach flow, or compute and populate offsets once a PID is known at trigger time; ensure safety and ordering.

docs/tutorial.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ A more efficient approach is to start from the source panel:
132132

133133
This workflow is more fluid, making trace point setting effortless.
134134

135+
### 💡 Viewing Available Variables at Trace Points
136+
137+
Before setting a trace point, if you want to know which local variables and parameters are accessible at a specific location, you can use the `info` commands:
138+
139+
```
140+
info line <file:line> # View available variables at a source line
141+
info function <func_name> # View available variables at function entry
142+
info address <0xADDR> # View available variables at an address
143+
```
144+
145+
These commands display debug information for that location, including the list of accessible variables:
146+
147+
![Info Source Line](images/info-line.png)
148+
*Using info line command to view available variables*
149+
135150
## Using Script Files
136151

137152
For repeated use, save your traces in a file:

docs/zh/limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ eBPF 的 helper 函数不支持处理缺页错误,在读取目标进程的虚
2222
## 软性限制
2323

2424
### 1. 语言支持
25-
目前主要支持编译型语言(C、C++、Rust)及其生成的 DWARF 调试信息。对于这些语言的高级特性支持有限,例如 Rust 的异步函数、C++ 的模板等,需要投入大量精力逐步完善。
25+
主要支持 **C 语言**,对 C 的支持最为完善。C++ 和 Rust 是有限支持 - 这些语言的高级特性支持有限,例如 Rust 的异步函数、C++ 的模板等,需要投入大量精力逐步完善。
2626

2727
对于解释型语言(Lua、Python、Ruby 等),目前只能追踪解释器本身(因为解释器通常用编译型语言实现)。追踪脚本代码在技术上可行,但需要大量开发时间,JIT 语言支持计划就更远了。
2828

docs/zh/roadmap.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# GhostScope 路线图(里程碑)
22

3-
## 全局变量在 `-p <pid>` 模式下的稳定性与兼容性提升:
4-
- ASLR 偏移自动计算与下发
5-
- 运行时空指针解引用保护
6-
73
## `-t <exec_path>` 模式支持全局变量(计划中):
84
- 背景:全局变量需要结合 `/proc/<pid>/maps` 计算模块偏移,`-t` 启动时尚无 PID 上下文。
95
- 方向:在 attach 流程中引入 PID 发现/订阅机制,或在触发时机得到 PID 后再计算并下发偏移;同时确保安全与时序正确。

docs/zh/tutorial.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ trace {target} # target 可以是函数或源码行号
9898

9999
#### 3. 命令模式
100100
这个时候,如果一切顺利,我们将在 eBPF 输出面板上看到脚本对应的输出。但要查看输出,我们需要把焦点切换到 eBPF 输出面板。
101+
101102
![eBPF Output](../images/ebpf-output.png)
102103
*eBPF 输出结果*
103104

@@ -132,6 +133,22 @@ trace {target} # target 可以是函数或源码行号
132133

133134
这样的工作流程更加流畅,让追踪点的设置变得轻而易举。
134135

136+
### 💡 查看追踪点可用变量
137+
138+
在设置追踪点之前,如果想知道某个位置可以访问哪些局部变量和参数,可以使用 `info` 命令:
139+
140+
```
141+
info line <file:line> # 查看源码行的可用变量
142+
info function <func_name> # 查看函数入口的可用变量
143+
info address <0xADDR> # 查看地址的可用变量
144+
```
145+
146+
这些命令会显示该位置的调试信息,包括可访问的变量列表:
147+
148+
![Info Source Line](../images/info-line.png)
149+
*使用 info line 命令查看可用变量*
150+
151+
135152
## 使用脚本文件
136153

137154
为了重复使用,我们可以将追踪脚本保存在文件中:

0 commit comments

Comments
 (0)