oopsiwhoospi fixed xd
Signed-off-by: hax <hax@lainlounge.xyz>
This commit is contained in:
parent
ebe1e8ec27
commit
0d42f3aff3
1 changed files with 23 additions and 23 deletions
46
README.md
46
README.md
|
|
@ -13,7 +13,7 @@ This project generates a call graph from an executable binary compiled with debu
|
||||||
- Includes a minimal C example program for testing.
|
- Includes a minimal C example program for testing.
|
||||||
- Validates input for robustness and usability.
|
- Validates input for robustness and usability.
|
||||||
|
|
||||||
## Prerequisites 🛠️📝🔌
|
## Prerequisites
|
||||||
### Software Requirements 🌐🛠️📊
|
### Software Requirements 🌐🛠️📊
|
||||||
- `gdb` (GNU Debugger)
|
- `gdb` (GNU Debugger)
|
||||||
- `awk` (or `gawk` for enhanced features)
|
- `awk` (or `gawk` for enhanced features)
|
||||||
|
|
@ -34,13 +34,13 @@ project/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation 🔄🎮🌐
|
## Installation 🔄🎮🌐
|
||||||
1. Clone the repository: 📦🔗🌍
|
1. Clone the repository:
|
||||||
```bash
|
```bash
|
||||||
git clone <repository-url>
|
git clone <repository-url>
|
||||||
cd project
|
cd project
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Make the scripts executable: 🌧️🛠️🔧
|
2. Make the scripts executable: 🛠️🔧
|
||||||
```bash
|
```bash
|
||||||
chmod +x callgraph.sh generate_graph.awk
|
chmod +x callgraph.sh generate_graph.awk
|
||||||
```
|
```
|
||||||
|
|
@ -51,41 +51,41 @@ project/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage 🛠️🔗🔄
|
## Usage 🛠️🔗🔄
|
||||||
### 1. Compile the Example Program 🔧🔄🔖
|
### 1. Compile the Example Program
|
||||||
Compile the included `example.c` program with debugging symbols: 🔧🏋️♂️🎮
|
Compile the included `example.c` program with debugging symbols:
|
||||||
```bash
|
```bash
|
||||||
gcc -g -o example example.c
|
gcc -g -o example example.c
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Generate the Call Graph 🎮🌄🏋️♂️
|
### 2. Generate the Call Graph 🎮🌄🏋️♂️
|
||||||
Run the shell script with the compiled binary: 📦🔍🎮
|
Run the shell script with the compiled binary:
|
||||||
```bash
|
```bash
|
||||||
./callgraph.sh ./example > callgraph.txt
|
./callgraph.sh ./example > callgraph.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Generate the DOT Graph 🌍🔍📦
|
### 3. Generate the DOT Graph 🌍🔍📦
|
||||||
Use the AWK script to convert the call graph data into a DOT file: 🔗🔦🎮
|
Use the AWK script to convert the call graph data into a DOT file:
|
||||||
```bash
|
```bash
|
||||||
./generate_graph.awk callgraph.txt > callgraph.dot
|
./generate_graph.awk callgraph.txt > callgraph.dot
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Visualize the Graph (Optional) 📝🎮🎨
|
### 4. Visualize the Graph (Optional) 📝🎮🎨
|
||||||
Render the DOT file using Graphviz: 🔄🌧️🎮
|
Render the DOT file using Graphviz:
|
||||||
```bash
|
```bash
|
||||||
dot -Tpng callgraph.dot -o callgraph.png
|
dot -Tpng callgraph.dot -o callgraph.png
|
||||||
```
|
```
|
||||||
|
|
||||||
Open `callgraph.png` to view the generated graph. 🎨🎮🌄
|
Open `callgraph.png` to view the generated graph. 🎨🌄
|
||||||
|
|
||||||
## Example 🎮🌟🌄
|
## Example 🌟🌄
|
||||||
### Input (Function Call Data) 🔦🔄🌧️
|
### Input (Function Call Data)
|
||||||
```bash
|
```bash
|
||||||
foo bar
|
foo bar
|
||||||
bar baz
|
bar baz
|
||||||
baz qux
|
baz qux
|
||||||
```
|
```
|
||||||
|
|
||||||
### Output (DOT Format) 🌧️🎨🎮
|
### Output (DOT Format)
|
||||||
```dot
|
```dot
|
||||||
digraph G {
|
digraph G {
|
||||||
"foo" -> "bar";
|
"foo" -> "bar";
|
||||||
|
|
@ -94,32 +94,32 @@ digraph G {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Visualized Graph 🎨🎮🔍
|
### Visualized Graph
|
||||||
The graph will show the relationships between functions as directed edges. 🔧🎨🌧️
|
The graph will show the relationships between functions as directed edges. 🔧🎨🌧️
|
||||||
|
|
||||||
## Contributing 🌟🌈🌄
|
## Contributing 🌟🌈
|
||||||
1. Fork the repository. 🌧️📝🔧
|
1. Fork the repository.
|
||||||
2. Create a new branch: 🎮🔄🌟
|
2. Create a new branch:
|
||||||
```bash
|
```bash
|
||||||
git checkout -b feature-name
|
git checkout -b feature-name
|
||||||
```
|
```
|
||||||
3. Make your changes and commit: 🌧️🎮🔗
|
3. Make your changes and commit:
|
||||||
```bash
|
```bash
|
||||||
git commit -m "Add feature"
|
git commit -m "Add feature"
|
||||||
```
|
```
|
||||||
4. Push to your branch: 🌟📝🎨
|
4. Push to your branch:
|
||||||
```bash
|
```bash
|
||||||
git push origin feature-name
|
git push origin feature-name
|
||||||
```
|
```
|
||||||
5. Open a pull request. 🎮🔧🔦
|
5. Open a pull request.
|
||||||
|
|
||||||
## License 🌄🔍🎮
|
## License 🌄🔍🎮
|
||||||
This project is licensed under the MIT License. See the LICENSE file for details. 🌟🔄🌧️
|
This project is licensed under the AGPL License. See the LICENSE file for details.
|
||||||
|
|
||||||
## Acknowledgments 🌟🔗🔧
|
## Acknowledgments 🌟🔗🔧
|
||||||
- The GNU Project for `gdb` and `gcc`. 📝🎨🌄
|
- The GNU Project for `gdb` and `gcc`.
|
||||||
- Graphviz for the graph visualization tools. 🌧️🎨🌄
|
- Graphviz for the graph visualization tools.
|
||||||
|
|
||||||
## Contact 🌐📦🌎
|
## Contact 🌐📦🌎
|
||||||
For questions or feedback, please open an issue in the repository. 🔄🌟🎨
|
For questions or feedback, please open an issue in the repository.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue