1
1
# Introduce
2
2
3
- The libstacktrace is a c library that provides a simple API to output the crash call stack to ** STDERR** when process crash.
3
+ The libstacktrace is a c library that provides a simple API to output the crash call stack to ** STDERR** when the process crash.
4
4
5
5
6
6
## Build
@@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
29
29
30
30
## Example
31
31
32
- Examples of use are provided in **example.c** of the repository, which make a null pointer access and the process crashes with the following output:
32
+ Examples of use are provided in **example.c** of the repository, which makes null pointer access, and the process crashes with the following output:
33
33
34
34
```shell
35
35
[root@localhost libstacktrace]# ./example
@@ -43,7 +43,7 @@ Examples of use are provided in **example.c** of the repository, which make a nu
43
43
Segmentation fault
44
44
```
45
45
46
- If ** CCFLAGS** is add ** -g** flag, more detail information will be output:
46
+ If ** CCFLAGS** is added ** -g** flag, more detailed information will be output:
47
47
48
48
``` shell
49
49
[root@localhost libstacktrace]# ./example
@@ -62,7 +62,7 @@ Segmentation fault
62
62
63
63
The libstacktrace dependence on ** libbfd** (Binary File Descriptor library).
64
64
65
- bfd build elf sections data, find the file name, function name and source line where the stack pointer is located based on the elf sections data.
65
+ bfd build elf sections data, find the file name, function name, and source line where the stack pointer is located based on the elf sections data.
66
66
67
67
bfd is provided by the ** binutils** package, which can be installed in CentOS distributions with the following command:
68
68
0 commit comments